Advertisement
Guest User

Untitled

a guest
Jul 20th, 2020
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.79 KB | None | 0 0
  1. from aiogram import Bot, types
  2. from aiogram.dispatcher import Dispatcher
  3. from aiogram.utils import executor
  4. import random
  5.  
  6. from config import TOKEN, QST_LIST
  7.  
  8. bot = Bot(token=TOKEN)
  9. dp = Dispatcher(bot)
  10.  
  11. dp.message_handler(commands=['startneverhaveiever'])
  12. async def process_startnhie_command(message: types.Message):
  13.     await bot.send_poll(message.chat.id, question=random.choice(config.QST_LIST), options=['+', '-'], is_anonymous=False)
  14.  
  15. dp.message_handler(commands=['start'])
  16. async def process_start_command(msg: types.Message):
  17.     await bot.send_message('123\n')
  18.  
  19. dp.message_handler(commands=['join'])
  20. async def process_join_command(edit: types.Message):
  21.     await  bot.edit_message_text(msg.chat.id, msg.message.id, '456\n')
  22.  
  23. if __name__ == '__main__':
  24.     executor.start_polling(dp)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement