Simple Telegram Bot Library, example:
import telegram
token = '0123456789:YourToken'
bot = telegram.Bot(token)
# Register Commands
@bot.command('/start', 'Hello World')
async def start(conversation):
conversation.send('Hello World!')
@bot.command('/name', 'What\'s your Name?')
async def name(conversation):
conversation.send('What\'s your Name?')
while True:
response = await asyncio.create_task(conversation.get_response())
if response.text:
conversation.send(f'Hello {response.text}')
break
else:
conversation.send('Please enter your Name.')
bot.update_commands()
# Run it..
bot.start()
pip install requests
pip install git+https://github.com/MaximilianClemens/pytelegram.git