now commands work onnly in groups except for adms
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Pavel_Durov 2023-07-17 23:24:10 +03:00
parent f49233b811
commit 8fc70c267d

View File

@ -12,12 +12,15 @@ from pipisa_functions import pipisa_time
#### https://docs.python-arango.com/en/main/
from arango import ArangoClient
admins = [317051301, 226765676]
@dp.message_handler(commands=["dick"])
async def up_dick(message: types.Message):
#global size_change, dick_plus, dick_minus
if message.from_user.id in admins or message.chat.type != 'private':
arango_client = ArangoClient(hosts='https://arango.guaranteedstruggle.host')
pipisa_db = arango_client.db('pipisa', username='root', password='stolendick527')
@ -155,13 +158,16 @@ async def up_dick(message: types.Message):
except Exception as e:
print('ошибка DB в /dick')
print(e)
else:
await message.reply('Растить елду можно только в общих чатах!')
@dp.message_handler(commands=["topdick"])
async def send_topchat(message: types.Message):
if message.from_user.id in admins or message.chat.type != 'private':
arango_client = ArangoClient(hosts='https://arango.guaranteedstruggle.host')
pipisa_db = arango_client.db('pipisa', username='root', password='stolendick527')
@ -190,6 +196,9 @@ async def send_topchat(message: types.Message):
i += 1
await bot.send_message(message.chat.id, '🏆Топ 10 бубылд чата🏆\n\n' + dickos)
else:
await message.reply('Работает только в общих чатах!\n'\
'Вы мсжете посмотреть топ по миру /globaldick')
@ -226,3 +235,4 @@ async def send_global_top(message: types.Message):
await bot.send_message(message.chat.id, '🏆Топ 10 пипис в мире🏆\n\n' + dickos)