mirror of
https://github.com/Bubuni-Team/telegram-bot.git
synced 2026-07-31 00:29:24 +03:00
fix: build and lots of obsolete warnings
This commit is contained in:
@@ -60,17 +60,11 @@ public class Ban : CommonHandler
|
||||
return;
|
||||
}
|
||||
|
||||
await Bot.RestrictChatMemberAsync(Chat.Id, RepliedUser!.Id,
|
||||
await Bot.RestrictChatMember(Chat.Id, RepliedUser!.Id,
|
||||
new ChatPermissions
|
||||
{
|
||||
CanSendMessages = true,
|
||||
CanChangeInfo = true,
|
||||
CanInviteUsers = true,
|
||||
CanPinMessages = true,
|
||||
CanSendPolls = true,
|
||||
CanSendMediaMessages = true,
|
||||
CanSendOtherMessages = true,
|
||||
CanAddWebPagePreviews = true
|
||||
});
|
||||
|
||||
await Reply($"{From.ToHtml()} <code>разблокировал</code> {RepliedUser!.ToHtml()}");
|
||||
|
||||
@@ -46,7 +46,7 @@ public class Greet : BotEventHandler
|
||||
reply.Text("Пожалуйста, ознакомьтесь с правилами. /rules");
|
||||
}
|
||||
|
||||
await Bot.SendTextMessageAsync(Chat.Id, string.Format(reply.ToString(), membersHtml),
|
||||
parseMode: ParseMode.Html, replyToMessageId: message.MessageId);
|
||||
await Bot.SendMessage(Chat.Id, string.Format(reply.ToString(), membersHtml),
|
||||
parseMode: ParseMode.Html, replyParameters: message.MessageId);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user