Skip to content
This repository has been archived by the owner on Sep 10, 2024. It is now read-only.

Commit

Permalink
修复重复请求
Browse files Browse the repository at this point in the history
  • Loading branch information
Yushu2606 authored Nov 20, 2023
1 parent 5e2e063 commit 9b710e5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Functions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,15 @@ public static async Task OnCallback(this CallbackQuery callbackQuery)
}
public static async Task OnRequest(this ChatJoinRequest chatJoinRequest)
{
Internationalization lang = Program.I18n.GetI18n(chatJoinRequest.From.LanguageCode);
if (!Program.GroupData.ContainsKey(chatJoinRequest.Chat.Id))
{
Program.GroupData[chatJoinRequest.Chat.Id] = new();
}
else if (Program.GroupData[chatJoinRequest.Chat.Id].ContainsKey(chatJoinRequest.From.Id))
{
return;
}
Internationalization lang = Program.I18n.GetI18n(chatJoinRequest.From.LanguageCode);
int min = 3; // TODO:群组管理员自定义时长
Message msg = await Program.BotClient.SendTextMessageAsync(
chatJoinRequest.Chat.Id,
Expand Down

0 comments on commit 9b710e5

Please sign in to comment.