improved naming in stan.py
This commit is contained in:
+1
-1
@@ -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
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user