#8 надеюсь не сломается
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -3,6 +3,4 @@ from handlers import pipisa
|
||||
from handlers import start_help
|
||||
|
||||
from handlers import time_new_year
|
||||
from handlers import sendalarm
|
||||
#from handlers import davinci
|
||||
|
||||
|
@@ -1,14 +1,14 @@
|
||||
import openai
|
||||
from aiogram import types, Dispatcher
|
||||
from aiogram import types
|
||||
from create_bot import dp, bot
|
||||
import logging
|
||||
from global_conf import CONFIG
|
||||
|
||||
|
||||
|
||||
token = '5947963644:AAF_GKgMmU5ovqMpc1KXIpcf4aN0JMyKPqc'
|
||||
#openai.api_key = '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'
|
||||
openai.api_key = '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'
|
||||
ban_comands = ['/dick','/topdick']
|
||||
token = CONFIG['openai']['token']
|
||||
openai.api_key = CONFIG['openai']['api_key']
|
||||
ban_comands = ['/dick','/topdick']
|
||||
|
||||
# Image_promt =['тупица сгенерируй','тупица сгенерируй картинку',\
|
||||
# 'тупица отправь картинку', 'тупица отправь картинку']
|
||||
|
@@ -1,17 +1,17 @@
|
||||
from aiogram import types, Dispatcher
|
||||
from aiogram import types
|
||||
from create_bot import bot, dp
|
||||
#from sqdb import user, session
|
||||
import random
|
||||
from random import randint
|
||||
import datetime
|
||||
from dicktxt import ForReadDict
|
||||
from pipisa_functions import pipisa_time
|
||||
|
||||
from global_conf import CONFIG
|
||||
|
||||
#### https://docs.python-arango.com/en/main/
|
||||
from arango import ArangoClient
|
||||
|
||||
admins = [317051301, 226765676]
|
||||
admins = CONFIG['telegram_admins_ids']
|
||||
|
||||
|
||||
@dp.message_handler(commands=["dick"])
|
||||
@@ -21,9 +21,13 @@ async def up_dick(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')
|
||||
dicks_collection = pipisa_db.collection('dicks')
|
||||
arango_client = ArangoClient(hosts=CONFIG['databaso']['host'] )
|
||||
pipisa_db = arango_client.db(
|
||||
CONFIG['databaso']['base'],
|
||||
username=CONFIG['databaso']['user'],
|
||||
password=CONFIG['databaso']['pass']
|
||||
)
|
||||
dicks_collection = pipisa_db.collection(CONFIG['databaso']['collection'])
|
||||
|
||||
|
||||
#### TODO уплатить нолог с 100 см для самого нищего
|
||||
@@ -171,9 +175,13 @@ async def up_dick(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')
|
||||
pipisa_db = arango_client.db('pipisa', username='root', password='stolendick527')
|
||||
dicks_collection = pipisa_db.collection('dicks')
|
||||
arango_client = ArangoClient(hosts=CONFIG['databaso']['host'] )
|
||||
pipisa_db = arango_client.db(
|
||||
CONFIG['databaso']['base'],
|
||||
username=CONFIG['databaso']['user'],
|
||||
password=CONFIG['databaso']['pass']
|
||||
)
|
||||
dicks_collection = pipisa_db.collection(CONFIG['databaso']['collection'])
|
||||
|
||||
try:
|
||||
dicks = dicks_collection.find({'chat_id': message.chat.id}, skip=0, limit=1100)
|
||||
@@ -209,9 +217,13 @@ async def send_topchat(message: types.Message):
|
||||
async def send_global_top(message: types.Message):
|
||||
|
||||
|
||||
arango_client = ArangoClient(hosts='https://arango.guaranteedstruggle.host')
|
||||
pipisa_db = arango_client.db('pipisa', username='root', password='stolendick527')
|
||||
dicks_collection = pipisa_db.collection('dicks')
|
||||
arango_client = ArangoClient(hosts=CONFIG['databaso']['host'] )
|
||||
pipisa_db = arango_client.db(
|
||||
CONFIG['databaso']['base'],
|
||||
username=CONFIG['databaso']['user'],
|
||||
password=CONFIG['databaso']['pass']
|
||||
)
|
||||
dicks_collection = pipisa_db.collection(CONFIG['databaso']['collection'])
|
||||
|
||||
try:
|
||||
dicks = dicks_collection.all( )
|
||||
|
@@ -1,24 +0,0 @@
|
||||
|
||||
from create_bot import dp, bot
|
||||
from aiogram import types, Dispatcher
|
||||
|
||||
@dp.message_handler(commands=['sendall'])
|
||||
async def sendall(message: types.Message):
|
||||
print('команда прошла')
|
||||
if message.chat.type == 'private':
|
||||
if message.from_user.id == 226765676:
|
||||
text = message.text[9:]
|
||||
try:
|
||||
chats_id = -1001355646177
|
||||
|
||||
try:
|
||||
await bot.send_message(chats_id, text)
|
||||
except:
|
||||
print('вероятно бота нет в чате')
|
||||
await bot.send_message(message.from_user.id, 'Сообщение успешно отправлено во все чаты')
|
||||
except:
|
||||
print('eror sendall')
|
||||
|
||||
|
||||
# def register_handlers_test(dp: Dispatcher):
|
||||
# dp.register_message_handler(send_welcome)
|
@@ -1,4 +1,4 @@
|
||||
from aiogram import types, Dispatcher
|
||||
from aiogram import types
|
||||
from aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
|
||||
from create_bot import dp, bot
|
||||
|
||||
|
Reference in New Issue
Block a user