Browse Source

random kittens!

master
angerstoner 7 years ago
parent
commit
1b2cf1d7ed
  1. 11
      schneiderbot.py

11
schneiderbot.py

@ -4,9 +4,11 @@
from telegram.ext import Updater, CommandHandler, MessageHandler, Filters
from telegram import ParseMode
import logging
import os
import random
import requests
import datetime
import cat
MENSA_URL = {
"zentral": "zentralmensa",
@ -123,10 +125,11 @@ def help(bot, update):
/help - this help text""", parse_mode=ParseMode.MARKDOWN)
def cat(bot, update):
def ccat(bot, update):
"""CUTE"""
bot.send_photo(chat_id=update.message.chat_id, photo='http://78.media.tumblr.com/tumblr_lxqp5pDJuv1qejbiro1_1280.jpg')
catfile = cat.getCat();
bot.send_photo(chat_id=update.message.chat_id, photo=open(catfile, 'rb'))
os.remove(catfile)
def magie(bot, update):
"""MAGIEEEEEE"""
@ -206,7 +209,7 @@ def main():
dp.add_handler(CommandHandler("magie", magie))
dp.add_handler(CommandHandler("manta", manta))
dp.add_handler(CommandHandler("mensa", mensa, pass_args=True))
dp.add_handler(CommandHandler("cat", cat))
dp.add_handler(CommandHandler("cat", ccat))
# log all errors

Loading…
Cancel
Save