|
@ -10,6 +10,7 @@ from telegram import ParseMode |
|
|
from telegram.ext import Updater, CommandHandler |
|
|
from telegram.ext import Updater, CommandHandler |
|
|
|
|
|
|
|
|
from coding_love import send_coding_love_gif |
|
|
from coding_love import send_coding_love_gif |
|
|
|
|
|
from reddit import wrong_dog |
|
|
from db import Db |
|
|
from db import Db |
|
|
from mensa import mensa |
|
|
from mensa import mensa |
|
|
|
|
|
|
|
@ -187,7 +188,7 @@ def error(bot, update, error): |
|
|
def main(): |
|
|
def main(): |
|
|
"""Start the bot.""" |
|
|
"""Start the bot.""" |
|
|
# Create the EventHandler and pass it your bot's token. |
|
|
# Create the EventHandler and pass it your bot's token. |
|
|
token = open("token").read() |
|
|
|
|
|
|
|
|
token = open("test_token").read() |
|
|
updater = Updater(token.strip()) |
|
|
updater = Updater(token.strip()) |
|
|
|
|
|
|
|
|
# Get the dispatcher to register handlers |
|
|
# Get the dispatcher to register handlers |
|
@ -210,6 +211,7 @@ def main(): |
|
|
dp.add_handler(CommandHandler("simon", simon, pass_args=True)) |
|
|
dp.add_handler(CommandHandler("simon", simon, pass_args=True)) |
|
|
dp.add_handler(CommandHandler("graveyard", graveyard)) |
|
|
dp.add_handler(CommandHandler("graveyard", graveyard)) |
|
|
dp.add_handler(CommandHandler("codinglove", send_coding_love_gif)) |
|
|
dp.add_handler(CommandHandler("codinglove", send_coding_love_gif)) |
|
|
|
|
|
dp.add_handler(CommandHandler("wrongdog", wrong_dog)) |
|
|
|
|
|
|
|
|
# log all errors |
|
|
# log all errors |
|
|
dp.add_error_handler(error) |
|
|
dp.add_error_handler(error) |
|
|