forked from Pavel_Durov/python_bot
21 lines
776 B
Python
21 lines
776 B
Python
import yaml
|
|
import random
|
|
|
|
|
|
def ChangeWord(result): #выбирает рандомное слово для изменения размера пиписы
|
|
|
|
with open("dicktxt/dick_changes.yaml", 'r', encoding='utf-8') as f:
|
|
words = yaml.load(f, Loader=yaml.Loader)
|
|
|
|
dick_inc = [ f'<b>{w}</b>' for w in words['increment'] ]
|
|
dick_static = [ f'<b>{w}</b>' for w in words['nothing'] ]
|
|
dick_decr = [ f'<b>{w}</b>' for w in words['decrement'] ]
|
|
|
|
if result > 0:
|
|
size_change = random.choice(dick_inc) + '🚀'
|
|
elif result == 0:
|
|
size_change = random.choice(dick_static) + '🤨'
|
|
else:
|
|
size_change = random.choice(dick_decr) + '✂'
|
|
|
|
return size_change |