python_bot_v2/dicktxt/ForReadDict.py
2024-01-22 02:59:25 +10:00

13 lines
400 B
Python
Raw 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()
return random.choice(words).strip()