improved naming in stan.py

This commit is contained in:
Rykov7
2022-12-28 17:49:20 +03:00
parent fbf3dba2ae
commit 9747e00ab6
2 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -314,7 +314,7 @@ def handle_msg(message: types.Message):
else:
s['Messages'][message.from_user.id]['Count'] += 1
quote = stan.speak(25)
quote = stan.speak(30)
if quote:
threading.Thread(target=send_quote, args=(len(quote) * 0.13, message, quote)).start()
+5 -5
View File
@@ -1,10 +1,10 @@
""" Stan quote generator. """
import random
stan = [i.rstrip() for i in open('Stan.txt', 'r', encoding='utf8')]
quotes = [i.rstrip() for i in open('Stan.txt', 'r', encoding='utf8')]
def speak(chance):
chance = random.randint(0, chance)
if chance == 0:
return random.choice(stan)
def speak(chance_of):
number = random.randint(0, chance_of)
if number == 0:
return random.choice(quotes)