Answer the question
In order to leave comments, you need to log in
Bug in python aiogram telegram?
Error in python aiogram, repeats messages 30 times
#import
import Config
import logging
from aiogram import Bot, Dispatcher, executor, types
import front as nav
#logs
logging.basicConfig(level=logging.INFO)
#log
bot = Bot(token = Config.TOKEN)
dp = Dispatcher(bot)
#backand
#command
@dp.message_handler(commands=['start'])
async def choose(message: types.Message):
await bot.send_message(message.from_user.id, ' \nChoose your Language: '.format(message.from_user),reply_markup = nav.mainMenu)
@dp.message_handler(commands=['help'])
async def help(message: types.Message):
await bot.send_message(message.from_user.id, "test")
#else
@dp.message_handler()
async def mes(msg: types.Message):
await bot.send_message(msg.from_user.id, "I don't understand about what are you, use command: /help")
#run
if __name__ == '__main__':
executor.start_polling(dp, skip_updates=True)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question