|
|
@ -1,6 +1,6 @@ |
|
|
|
#!/usr/bin/env python |
|
|
|
# -*- coding: utf-8 -*- |
|
|
|
|
|
|
|
import datetime |
|
|
|
import logging |
|
|
|
import random |
|
|
|
|
|
|
@ -10,7 +10,7 @@ from telegram import ParseMode |
|
|
|
from telegram.ext import Updater, CommandHandler |
|
|
|
|
|
|
|
from coding_love import send_coding_love_gif |
|
|
|
from reddit import wrong_dog, hamster, reddit, reddit_img |
|
|
|
from reddit import wrong_dog, hamster, reddit, reddit_img, toggle_four_twenty, four_twenty |
|
|
|
from schneiderbot_twitter import toggle_pepito_for_group, check_pepito_and_post_auto, check_pepito_and_post_manually |
|
|
|
from db import Db |
|
|
|
from mensa import mensa |
|
|
@ -209,6 +209,7 @@ def init_commands(dp): |
|
|
|
dp.add_handler(CommandHandler("reddit_img", reddit_img, pass_args=True)) |
|
|
|
dp.add_handler(CommandHandler("pepito", check_pepito_and_post_manually)) |
|
|
|
dp.add_handler(CommandHandler("tpepito", toggle_pepito_for_group)) |
|
|
|
dp.add_handler(CommandHandler("lightitup", toggle_four_twenty)) |
|
|
|
|
|
|
|
|
|
|
|
def main(): |
|
|
@ -224,7 +225,8 @@ def main(): |
|
|
|
dp = updater.dispatcher |
|
|
|
init_commands(dp) |
|
|
|
|
|
|
|
job_minute = jq.run_repeating(check_pepito_and_post_auto, interval=180, first=0) |
|
|
|
jq.run_repeating(check_pepito_and_post_auto, interval=180, first=0) |
|
|
|
jq.run_daily(four_twenty, datetime.time(4, 20, 0), days=(0, 1, 2, 3, 4, 5, 6)) |
|
|
|
|
|
|
|
# on different commands - answer in Telegram |
|
|
|
|
|
|
|