forked from Pavel_Durov/python_bot
now commands work onnly in groups except for adms
This commit is contained in:
parent
f49233b811
commit
8fc70c267d
@ -12,12 +12,15 @@ from pipisa_functions import pipisa_time
|
|||||||
#### https://docs.python-arango.com/en/main/
|
#### https://docs.python-arango.com/en/main/
|
||||||
from arango import ArangoClient
|
from arango import ArangoClient
|
||||||
|
|
||||||
|
admins = [317051301, 226765676]
|
||||||
|
|
||||||
|
|
||||||
@dp.message_handler(commands=["dick"])
|
@dp.message_handler(commands=["dick"])
|
||||||
async def up_dick(message: types.Message):
|
async def up_dick(message: types.Message):
|
||||||
#global size_change, dick_plus, dick_minus
|
#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')
|
arango_client = ArangoClient(hosts='https://arango.guaranteedstruggle.host')
|
||||||
pipisa_db = arango_client.db('pipisa', username='root', password='stolendick527')
|
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:
|
except Exception as e:
|
||||||
print('ошибка DB в /dick')
|
print('ошибка DB в /dick')
|
||||||
print(e)
|
print(e)
|
||||||
|
else:
|
||||||
|
await message.reply('Растить елду можно только в общих чатах!')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@dp.message_handler(commands=["topdick"])
|
@dp.message_handler(commands=["topdick"])
|
||||||
async def send_topchat(message: types.Message):
|
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')
|
arango_client = ArangoClient(hosts='https://arango.guaranteedstruggle.host')
|
||||||
pipisa_db = arango_client.db('pipisa', username='root', password='stolendick527')
|
pipisa_db = arango_client.db('pipisa', username='root', password='stolendick527')
|
||||||
@ -190,6 +196,9 @@ async def send_topchat(message: types.Message):
|
|||||||
i += 1
|
i += 1
|
||||||
|
|
||||||
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')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -226,3 +235,4 @@ async def send_global_top(message: types.Message):
|
|||||||
|
|
||||||
await bot.send_message(message.chat.id, '🏆Топ 10 пипис в мире🏆\n\n' + dickos)
|
await bot.send_message(message.chat.id, '🏆Топ 10 пипис в мире🏆\n\n' + dickos)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user