mirror of
https://github.com/yasirarism/MissKatyPyro.git
synced 2026-01-03 11:04:51 +00:00
update
This commit is contained in:
parent
937015ff4a
commit
1def3cae1b
3 changed files with 3 additions and 5 deletions
|
|
@ -1,5 +1,3 @@
|
||||||
build:
|
build:
|
||||||
docker:
|
docker:
|
||||||
worker: Dockerfile
|
worker: Dockerfile
|
||||||
run:
|
|
||||||
worker: python3 -m misskaty
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
import time
|
import time
|
||||||
import pyromod.listen
|
import pyromod.listen
|
||||||
from database.nightmode_db import scheduler
|
|
||||||
from logging import ERROR, INFO, FileHandler, StreamHandler, basicConfig, getLogger
|
from logging import ERROR, INFO, FileHandler, StreamHandler, basicConfig, getLogger
|
||||||
|
|
||||||
from pyrogram import Client
|
from pyrogram import Client
|
||||||
|
|
@ -36,8 +35,6 @@ user = Client(
|
||||||
|
|
||||||
app.start()
|
app.start()
|
||||||
user.start()
|
user.start()
|
||||||
if bool(scheduler.get_jobs()):
|
|
||||||
scheduler.start()
|
|
||||||
bot = app.get_me()
|
bot = app.get_me()
|
||||||
ubot = user.get_me()
|
ubot = user.get_me()
|
||||||
BOT_ID = bot.id
|
BOT_ID = bot.id
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@ from pyrogram.raw.all import layer
|
||||||
from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup
|
from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup
|
||||||
|
|
||||||
from database.users_chats_db import db
|
from database.users_chats_db import db
|
||||||
|
from database.nightmode_db import scheduler
|
||||||
from misskaty import (
|
from misskaty import (
|
||||||
BOT_NAME,
|
BOT_NAME,
|
||||||
BOT_USERNAME,
|
BOT_USERNAME,
|
||||||
|
|
@ -76,6 +77,8 @@ async def start_bot():
|
||||||
chat_id, message_id = pickle.load(status)
|
chat_id, message_id = pickle.load(status)
|
||||||
os.remove("restart.pickle")
|
os.remove("restart.pickle")
|
||||||
await app.edit_message_text(chat_id=chat_id, message_id=message_id, text="<b>Bot restarted successfully!</b>")
|
await app.edit_message_text(chat_id=chat_id, message_id=message_id, text="<b>Bot restarted successfully!</b>")
|
||||||
|
if bool(scheduler.get_jobs()):
|
||||||
|
scheduler.start()
|
||||||
asyncio.create_task(auto_clean())
|
asyncio.create_task(auto_clean())
|
||||||
await idle()
|
await idle()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue