Created
November 13, 2021 02:51
-
-
Save lucaspolo/d094953c78aeac9ac613caa220c2a9db to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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