refactor stan

This commit is contained in:
Rykov7
2023-02-10 23:46:19 +03:00
parent c88bf46e87
commit 8a0fffba19
3 changed files with 26 additions and 16 deletions
+7
View File
@@ -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: