ppls = [('user1', 73), ('user2', 43), ('user3', 39), ('user4', 37), ('user5', 27),
('user6', 22), ('user7', 11), ('user8', 10), ('user9', 10), ('user10', 9)]
string = 'ТОП 10 ИГРОКОВ:\n'
for ppl in ppls:
string += f'{ppl[0]} - {ppl[1]}\n'
print(string)
UPDATE winka SET losse = losse + 1 WHERE user_id = 1;
UPDATE winka SET win = win + 1 WHERE user_id = 1;
from aiogram.dispatcher.filters import BoundFilter
class MyFilter(BoundFilter):
key = 'is_admin'
def __init__(self, is_admin):
self.is_admin = is_admin
async def check(self, message: types.Message):
member = await bot.get_chat_member(message.chat.id, message.from_user.id)
return member.is_chat_admin()
dp.filters_factory.bind(MyFilter)
@dp.message_handler(is_admin=True)
async def ...