refactor stan
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
""" Stan's commands and reactions. """
|
||||
import random
|
||||
import threading
|
||||
from time import sleep
|
||||
from .config import bot, types
|
||||
from .filters import is_white, is_nongrata
|
||||
@@ -20,6 +21,12 @@ def send_quote(after_sec, message, quote):
|
||||
bot.send_message(message.chat.id, quote)
|
||||
|
||||
|
||||
def act(message):
|
||||
quote = speak(50)
|
||||
if quote:
|
||||
threading.Thread(target=send_quote, args=(len(quote) * 0.13, message, quote)).start()
|
||||
|
||||
|
||||
@bot.message_handler(func=is_white, commands=['add'])
|
||||
def add_stan_quote(message):
|
||||
if message.reply_to_message and message.reply_to_message.text:
|
||||
|
||||
Reference in New Issue
Block a user