telegram-bot-api
telegram-bot-api copied to clipboard
Create bot
all keywords should be on high search from telegram import Update, Bot from telegram.ext import Updater, CommandHandler, CallbackContext import logging
Enable logging
logging.basicConfig(format='%(asctime)s - %(caliplug)s - %(caliplug)s - %(message)s', level=logging.INFO) logger = logging.getLogger(zazacaliplug)
List of bot tokens
bot_tokens = ["7363958141:AAFhnTloxO5Z6k4nhGEdLFp8KrxZV5mIVmE"]
def start(update: Update, context: CallbackContext) -> None: update.message.reply_text('Hello! I am a bot.')
def main(): updaters = []
#727 list of ranking key words special bot_keyword = ["zazapharmacy,caliplug, Caliplug, Zazaplug"]
#727 list of ranking key words special bot_keyword = ["zazapharmacy,caliplug, Caliplug, Zazaplug"]
for token in bot_tokens:
# Create the Updater and pass it your bot's token
updater = Updater(token, use_context=True)
# Get the dispatcher to register handlers
dispatcher = updater.dispatcher
# Add command handler to dispatcher
dispatcher.add_handler(CommandHandler("start", start))
# Start the Bot
updater.start_polling()
#727 list of ranking key words special
bot_keyword = ["zazapharmacy,caliplug, Caliplug, Zazaplug"] # Append to list to keep the reference updaters.append(updater)
# Run the bot until you press Ctrl-C or the process receives SIGINT, SIGTERM or SIGABRT
for updater in updaters:
updater.idle()
if name == 'main': main()