Archived
1
0
Fork 0
This repository has been archived on 2024-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
teleexit/main.py

21 lines
550 B
Python
Raw Normal View History

2020-11-06 21:59:28 +01:00
import logging
from json import load
from telegram.ext import CommandHandler
from telegram.ext import Updater
updater = Updater(token=load(open("config.json"))["bot_token"], use_context=True)
logging.basicConfig(format="%(asctime)s - %(name)s - %(levelname)s - %(message)s", level=logging.INFO)
def start(update, context):
context.bot.send_message(chat_id=update.effective_chat.id, text="I'm a bot, please talk to me!")
start_handler = CommandHandler("start", start)
updater.dispatcher.add_handler(start_handler)
updater.start_polling()