Compare commits
No commits in common. "ecbe419abb85cb4f88d7fb90b8c79284f633471a" and "e677591b976f22d03949972adadabad1dc61a927" have entirely different histories.
ecbe419abb
...
e677591b97
@ -4,7 +4,7 @@ import random
|
||||
|
||||
def ChangeWord(result): #выбирает рандомное слово для изменения размера пиписы
|
||||
|
||||
with open("dicktxt/dick_changes.yaml", 'r', encoding='utf-8') as f:
|
||||
with open("dicktxt/dick_changes.yaml", 'r') as f:
|
||||
words = yaml.load(f, Loader=yaml.Loader)
|
||||
|
||||
dick_inc = [ f'<b>{w}</b>' for w in words['increment'] ]
|
||||
|
@ -153,34 +153,20 @@ async def up_dick(message: types.Message):
|
||||
|
||||
|
||||
|
||||
@dp.message_handler(commands=['topdick','globaldick'])
|
||||
@dp.message_handler(commands=["topdick"])
|
||||
async def send_topchat(message: types.Message):
|
||||
if message.from_user.id in admins or message.chat.type != 'private':
|
||||
|
||||
top_ = False
|
||||
glob_ = False
|
||||
dicks_collection = get_dicks_collection()
|
||||
|
||||
if message['text'] == '/topdick':
|
||||
top_ = True
|
||||
try:
|
||||
dicks = dicks_collection.find({'chat_id': message.chat.id}, skip=0, limit=1100)
|
||||
dicks = [d for d in dicks]
|
||||
except Exception as e:
|
||||
print('ошибка DB в /topdick')
|
||||
print(e)
|
||||
elif message['text'] == '/globaldick':
|
||||
glob_ = True
|
||||
try:
|
||||
dicks = dicks_collection.all( )
|
||||
dicks = [d for d in dicks if d['user_id'] != d['chat_id']]
|
||||
except Exception as e:
|
||||
print('ошибка DB в /globaldick')
|
||||
print(e)
|
||||
else:
|
||||
print('вызывают хз что!')
|
||||
try:
|
||||
dicks = dicks_collection.find({'chat_id': message.chat.id}, skip=0, limit=1100)
|
||||
dicks = [d for d in dicks]
|
||||
except Exception as e:
|
||||
print('ошибка DB в /topdick')
|
||||
print(e)
|
||||
|
||||
top_dicks = sorted(dicks, key=lambda dick: dick['dick_size'], reverse=True)
|
||||
|
||||
dick_limit = min(len(top_dicks), 10)
|
||||
top_dicks = top_dicks[:dick_limit]
|
||||
|
||||
@ -194,10 +180,41 @@ async def send_topchat(message: types.Message):
|
||||
dickos += f' {emo[i]} {i+1}. {top_dicks[i]["user_fullname"]}: {top_dicks[i]["dick_size"]}см\n'
|
||||
i += 1
|
||||
|
||||
if top_:
|
||||
await bot.send_message(message.chat.id, '🏆Топ 10 бубылд чата🏆\n\n' + dickos)
|
||||
elif glob_:
|
||||
await bot.send_message(message.chat.id, '🏆Топ 10 пипис в мире🏆\n\n' + dickos)
|
||||
await bot.send_message(message.chat.id, '🏆Топ 10 бубылд чата🏆\n\n' + dickos)
|
||||
else:
|
||||
await message.reply('Работает только в общих чатах!\n'\
|
||||
'Вы можете посмотреть топ по миру /globaldick')
|
||||
'Вы мсжете посмотреть топ по миру /globaldick')
|
||||
|
||||
|
||||
|
||||
|
||||
@dp.message_handler(commands=["globaldick"])
|
||||
async def send_global_top(message: types.Message):
|
||||
dicks_collection = get_dicks_collection()
|
||||
|
||||
try:
|
||||
dicks = dicks_collection.all( )
|
||||
dicks = [d for d in dicks if d['user_id'] != d['chat_id']]
|
||||
except Exception as e:
|
||||
print('ошибка DB в /glovaldick')
|
||||
print(e)
|
||||
|
||||
top_dicks = sorted(dicks, key=lambda dick: dick['dick_size'], reverse=True)
|
||||
|
||||
|
||||
dick_limit = min(len(top_dicks), 10)
|
||||
top_dicks = top_dicks[:dick_limit]
|
||||
|
||||
dickos = ''
|
||||
emo = ['🏆','🚀','💫','🍆','🍌','🐍','🐎','🌭','🌶','👌']
|
||||
|
||||
if len(top_dicks) == 0:
|
||||
await bot.send_message(message.chat.id, '🍆 Никто ничего не нарастил! 🍌')
|
||||
else:
|
||||
for i in range(len(top_dicks)):
|
||||
dickos += f' {emo[i]} {i+1}. {top_dicks[i]["user_fullname"]}: {top_dicks[i]["dick_size"]}см\n'
|
||||
i += 1
|
||||
|
||||
await bot.send_message(message.chat.id, '🏆Топ 10 пипис в мире🏆\n\n' + dickos)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user