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 aiogram import executor
|
||||||
|
|
||||||
from create_bot import dp
|
from create_bot import dp
|
||||||
from handlers import pipisa, time_new_year, sendalarm, start_help
|
|
||||||
import handlers
|
import handlers
|
||||||
|
|
||||||
|
|
||||||
|
logging.basicConfig(level=logging.DEBUG)
|
||||||
# logging.basicConfig(level=logging.DEBUG)
|
|
||||||
|
|
||||||
|
|
||||||
logging.basicConfig(
|
# logging.basicConfig(
|
||||||
level = logging.DEBUG,
|
# level = logging.DEBUG,
|
||||||
handlers = [ graypy.GELFUDPHandler('localhost', 12201) ]
|
# handlers = [ graypy.GELFUDPHandler('localhost', 12201) ]
|
||||||
)
|
# )
|
||||||
|
|
||||||
# pipisa.register_handlers_pipisa(dp)
|
# pipisa.register_handlers_pipisa(dp)
|
||||||
# time_new_year.register_handlers_time(dp)
|
# time_new_year.register_handlers_time(dp)
|
||||||
|
@ -1,13 +1,12 @@
|
|||||||
|
|
||||||
import random
|
import random
|
||||||
def RandomDick():
|
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()
|
words = file.readlines()
|
||||||
|
|
||||||
random_line = random.choice(words).strip()
|
random_line = random.choice(words).strip()
|
||||||
return random_line
|
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
|
import random
|
||||||
from random import randint
|
from random import randint
|
||||||
import datetime
|
import datetime
|
||||||
|
from dicktxt import ForReadDict
|
||||||
|
|
||||||
|
|
||||||
@dp.message_handler(commands=["dick"])
|
@dp.message_handler(commands=["dick"])
|
||||||
@ -31,6 +31,8 @@ async def up_dick(message: types.Message):
|
|||||||
if abs(diff) <= 0:
|
if abs(diff) <= 0:
|
||||||
try:
|
try:
|
||||||
current_dick = b.dick_size
|
current_dick = b.dick_size
|
||||||
|
|
||||||
|
|
||||||
await bot.send_message(message.chat.id, f'@{message.from_user.username},🚫 вы уже крутили пипису, ее размер <b>{current_dick}</b> см! ')
|
await bot.send_message(message.chat.id, f'@{message.from_user.username},🚫 вы уже крутили пипису, ее размер <b>{current_dick}</b> см! ')
|
||||||
except:
|
except:
|
||||||
print('ошибка в if diff <=0')
|
print('ошибка в if diff <=0')
|
||||||
@ -46,9 +48,9 @@ async def up_dick(message: types.Message):
|
|||||||
a.datetimes = datetime.datetime.now()
|
a.datetimes = datetime.datetime.now()
|
||||||
session.flush()
|
session.flush()
|
||||||
session.commit() #обновляет запись
|
session.commit() #обновляет запись
|
||||||
|
randomword = ForReadDict.RandomDick()
|
||||||
|
|
||||||
|
await bot.send_message(message.chat.id, f'@{message.from_user.username}, ваш {randomword} {size_change}\
|
||||||
await bot.send_message(message.chat.id, f'@{message.from_user.username}, ваш писюн {size_change}\
|
|
||||||
на <b>{abs(numb)}</b> см!\n\
|
на <b>{abs(numb)}</b> см!\n\
|
||||||
Теперь он равен <b>{updetedDick}</b> см! ')
|
Теперь он равен <b>{updetedDick}</b> см! ')
|
||||||
except:
|
except:
|
||||||
|
Loading…
Reference in New Issue
Block a user