python_bot/dicktxt/ForReadDict.py
Pavel_Duron b849bc26b2
All checks were successful
continuous-integration/drone/push Build is passing
add some dicks
2022-12-16 23:02:32 +10:00

16 lines
435 B
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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