Skip to content

Instantly share code, notes, and snippets.

@lucaspolo
Created November 13, 2021 02:51
Show Gist options
  • Save lucaspolo/d094953c78aeac9ac613caa220c2a9db to your computer and use it in GitHub Desktop.
Save lucaspolo/d094953c78aeac9ac613caa220c2a9db to your computer and use it in GitHub Desktop.
import os
from telegram.ext import Updater, CommandHandler
def hello_world(update, context):
update.message.reply_text(
"Olá Mundo! Sou o novo bot."
)
def main():
token = os.getenv('TELEGRAM_TOKEN')
updater = Updater(token=token)
dispatcher = updater.dispatcher
dispatcher.add_handler(CommandHandler('start', hello_world));
updater.start_polling()
if __name__ == '__main__':
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment