Spaces:
Paused
Paused
taslim19
commited on
Commit
·
544053d
1
Parent(s):
3e77365
add: import top of the dev.py & for userbot
Browse files
DragMusic/plugins/tools/dev.py
CHANGED
|
@@ -13,6 +13,7 @@ from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup, Message,
|
|
| 13 |
from DragMusic import app
|
| 14 |
from config import OWNER_ID
|
| 15 |
from DragMusic.core.mongo import mongodb
|
|
|
|
| 16 |
|
| 17 |
async def aexec(code, client, message):
|
| 18 |
afkdb = mongodb.afk
|
|
@@ -22,6 +23,7 @@ async def aexec(code, client, message):
|
|
| 22 |
"client": client,
|
| 23 |
"message": message,
|
| 24 |
"afkdb": afkdb,
|
|
|
|
| 25 |
"get_afk_users": lambda: afkdb.find({"user_id": {"$gt": 0}}).to_list(1000),
|
| 26 |
}
|
| 27 |
|
|
|
|
| 13 |
from DragMusic import app
|
| 14 |
from config import OWNER_ID
|
| 15 |
from DragMusic.core.mongo import mongodb
|
| 16 |
+
from DragMusic import userbot # Ensure userbot is imported
|
| 17 |
|
| 18 |
async def aexec(code, client, message):
|
| 19 |
afkdb = mongodb.afk
|
|
|
|
| 23 |
"client": client,
|
| 24 |
"message": message,
|
| 25 |
"afkdb": afkdb,
|
| 26 |
+
"userbot": userbot, # Add userbot to the eval environment
|
| 27 |
"get_afk_users": lambda: afkdb.find({"user_id": {"$gt": 0}}).to_list(1000),
|
| 28 |
}
|
| 29 |
|