python_bot_v2/dicktxt/ForReadDict.py

16 lines
435 B
Python
Raw Normal View History

import random
2022-12-16 23:02:32 +10:00
def RandomDick():
2022-12-16 23:02:32 +10:00
# Забирает рандомный синоним к слову хуй из dick_sinonims.txt
# у линуха и винды не забывай про разные \/
# когда указываешь путь
2022-12-16 22:20:11 +10:00
with open('dicktxt/dick_sinonims.txt', 'r', encoding='utf-8') as file:
words = file.readlines()
random_line = random.choice(words).strip()
return random_line