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.ext import Updater, CommandHandler, MessageHandler, Filters
from telegram import ParseMode from telegram import ParseMode
import logging import logging
import os
import random import random
import requests import requests
import datetime import datetime
import cat
MENSA_URL = { MENSA_URL = {
"zentral": "zentralmensa", "zentral": "zentralmensa",
@ -123,10 +125,11 @@ def help(bot, update):
/help - this help text""", parse_mode=ParseMode.MARKDOWN) /help - this help text""", parse_mode=ParseMode.MARKDOWN)
def cat(bot, update):
def ccat(bot, update):
"""CUTE""" """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): def magie(bot, update):
"""MAGIEEEEEE""" """MAGIEEEEEE"""
@ -206,7 +209,7 @@ def main():
dp.add_handler(CommandHandler("magie", magie)) dp.add_handler(CommandHandler("magie", magie))
dp.add_handler(CommandHandler("manta", manta)) dp.add_handler(CommandHandler("manta", manta))
dp.add_handler(CommandHandler("mensa", mensa, pass_args=True)) dp.add_handler(CommandHandler("mensa", mensa, pass_args=True))
dp.add_handler(CommandHandler("cat", cat))
dp.add_handler(CommandHandler("cat", ccat))
# log all errors # log all errors

Loading…
Cancel
Save