client = TelegramClient('anon', api_id, api_hash)
async def main():
me = await client.get_me()
print(me.stringify())
with client:
client.loop.run_until_complete(main())
import datetime
context = {}
@bot.message_handler(commands=["cow"])
def cow_command(message):
last_command_use_time = context.get(message.user_id)
if not last_command_use_time or (datetime.datetime.now() - last_command_use_time).hour > 1:
# Логика команды /cow
context[message.user_id] = datetime.datetime.now()
else:
# Сообщение об ограничениях использования команды