forked from Pavel_Durov/python_bot
add sinonims for dickup test done
This commit is contained in:
parent
157833e41a
commit
9c91fc5420
13
bot.py
13
bot.py
@ -4,18 +4,17 @@ import graypy
|
||||
from aiogram import executor
|
||||
|
||||
from create_bot import dp
|
||||
from handlers import pipisa, time_new_year, sendalarm, start_help
|
||||
|
||||
import handlers
|
||||
|
||||
|
||||
|
||||
# logging.basicConfig(level=logging.DEBUG)
|
||||
logging.basicConfig(level=logging.DEBUG)
|
||||
|
||||
|
||||
logging.basicConfig(
|
||||
level = logging.DEBUG,
|
||||
handlers = [ graypy.GELFUDPHandler('localhost', 12201) ]
|
||||
)
|
||||
# logging.basicConfig(
|
||||
# level = logging.DEBUG,
|
||||
# handlers = [ graypy.GELFUDPHandler('localhost', 12201) ]
|
||||
# )
|
||||
|
||||
# pipisa.register_handlers_pipisa(dp)
|
||||
# time_new_year.register_handlers_time(dp)
|
||||
|
@ -1,13 +1,12 @@
|
||||
|
||||
import random
|
||||
def RandomDick():
|
||||
with open('tests\diction.txt', 'r', encoding='utf-8') as file:
|
||||
with open('dicktxt\dick_sinonims.txt', 'r', encoding='utf-8') as file:
|
||||
words = file.readlines()
|
||||
|
||||
random_line = random.choice(words).strip()
|
||||
return random_line
|
||||
|
||||
random_line = RandomDick()
|
||||
|
||||
|
||||
|
@ -0,0 +1 @@
|
||||
from . import ForReadDict
|
@ -73,4 +73,4 @@
|
||||
торчильник
|
||||
факало
|
||||
кочанчик
|
||||
усатая
|
||||
пипису
|
@ -5,7 +5,7 @@ from sqdb import user, session
|
||||
import random
|
||||
from random import randint
|
||||
import datetime
|
||||
|
||||
from dicktxt import ForReadDict
|
||||
|
||||
|
||||
@dp.message_handler(commands=["dick"])
|
||||
@ -31,6 +31,8 @@ async def up_dick(message: types.Message):
|
||||
if abs(diff) <= 0:
|
||||
try:
|
||||
current_dick = b.dick_size
|
||||
|
||||
|
||||
await bot.send_message(message.chat.id, f'@{message.from_user.username},🚫 вы уже крутили пипису, ее размер <b>{current_dick}</b> см! ')
|
||||
except:
|
||||
print('ошибка в if diff <=0')
|
||||
@ -46,9 +48,9 @@ async def up_dick(message: types.Message):
|
||||
a.datetimes = datetime.datetime.now()
|
||||
session.flush()
|
||||
session.commit() #обновляет запись
|
||||
randomword = ForReadDict.RandomDick()
|
||||
|
||||
|
||||
await bot.send_message(message.chat.id, f'@{message.from_user.username}, ваш писюн {size_change}\
|
||||
await bot.send_message(message.chat.id, f'@{message.from_user.username}, ваш {randomword} {size_change}\
|
||||
на <b>{abs(numb)}</b> см!\n\
|
||||
Теперь он равен <b>{updetedDick}</b> см! ')
|
||||
except:
|
||||
|
Loading…
Reference in New Issue
Block a user