mirror of
https://github.com/Bubuni-Team/telegram-bot.git
synced 2026-07-31 00:29:24 +03:00
[core] add support of new bot api
This commit is contained in:
@@ -49,7 +49,7 @@ namespace UserGroupTag
|
||||
if (memberList.Contains(fromId))
|
||||
{
|
||||
await Bot.SendTextMessageAsync(chatId, $"{from.ToHtml()} уже находится в группе {groupName}",
|
||||
ParseMode.Html);
|
||||
parseMode: ParseMode.Html);
|
||||
return;
|
||||
}
|
||||
memberList.Add(repliedMessage.From.Id);
|
||||
@@ -60,7 +60,7 @@ namespace UserGroupTag
|
||||
|
||||
_userCache.SetValue(repliedMessage.From.Id, repliedMessage.From, Int32.MaxValue);
|
||||
await Bot.SendTextMessageAsync(chatId, $"{from.ToHtml()} добавлен в группу {groupName}",
|
||||
ParseMode.Html);
|
||||
parseMode: ParseMode.Html);
|
||||
}
|
||||
|
||||
[ParametrizedCommand(InChat.Public, "tag_group", CommandParseMode.Both)]
|
||||
@@ -88,7 +88,7 @@ namespace UserGroupTag
|
||||
msg.UserMention(await GetUser(userId, Chat)).Text(", ");
|
||||
}
|
||||
|
||||
await Bot.SendTextMessageAsync(Chat.Id, msg.ToString().TrimEnd(',', ' '), ParseMode.Html);
|
||||
await Bot.SendTextMessageAsync(Chat.Id, msg.ToString().TrimEnd(',', ' '), parseMode: ParseMode.Html);
|
||||
}
|
||||
|
||||
protected async Task<User> GetUser(long userId, Chat chat)
|
||||
|
||||
Reference in New Issue
Block a user