-
Notifications
You must be signed in to change notification settings - Fork 1
/
__main__.py
76 lines (69 loc) · 2.49 KB
/
__main__.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
import asyncio
import importlib
import sys
from pyrogram import idle
from pytgcalls.exceptions import NoActiveGroupCall
import config
from config import BANNED_USERS
from AnonX import LOGGER, app, userbot
from AnonX.core.call import Anon
from AnonX.plugins import ALL_MODULES
from AnonX.utils.database import get_banned_users, get_gbanned
loop = asyncio.get_event_loop()
async def init():
if (
not config.STRING1
and not config.STRING2
and not config.STRING3
and not config.STRING4
and not config.STRING5
):
LOGGER("AnonX").error(
"WTF Baby ! Atleast add a pyrogram string, How Cheap..."
)
return
if (
not config.SPOTIFY_CLIENT_ID
and not config.SPOTIFY_CLIENT_SECRET
):
LOGGER("AnonX").warning(
"Sur spotify id aur secret toh daala hi nahi aapne ab toh spotify se nahi chala paaoge gaane."
)
try:
users = await get_gbanned()
for user_id in users:
BANNED_USERS.add(user_id)
users = await get_banned_users()
for user_id in users:
BANNED_USERS.add(user_id)
except:
pass
await app.start()
for all_module in ALL_MODULES:
importlib.import_module("AnonX.plugins." + all_module)
LOGGER("AnonX.plugins").info(
"Necessary Modules Imported Successfully."
)
await userbot.start()
await Anon.start()
try:
await Anon.stream_decall("https://telegra.ph/file/de3464aa7d6bfafdd2dc3.mp4")
except:
pass
try:
await Anon.stream_call(
"https://te.legra.ph/file/29f784eb49d230ab62e9e.mp4"
)
except NoActiveGroupCall:
LOGGER("AnonX").error(
"[ERROR] - \n\nHey Baby, firstly open telegram and turn on voice chat in Logger Group else fu*k off. If you ever ended voice chat in log group i will stop working and users will fu*k you up."
)
sys.exit()
except:
pass
await Anon.decorators()
LOGGER("AnonX").info("\x41\x6e\x6f\x6e\x58\x20\x4d\x75\x73\x69\x63\x20\x42\x6f\x74\x20\x53\x74\x61\x72\x74\x65\x64\x20\x53\x75\x63\x63\x65\x73\x73\x66\x75\x6c\x6c\x79\x2e\x2e\x2e\n\n\x4e\x6f\x77\x20\x64\x72\x6f\x70\x20\x79\x6f\x75\x72\x20\x67\x69\x72\x6c\x66\x72\x69\x65\x6e\x64\'\x73\x20\x6e\x75\x64\x65\x73\x20\x61\x74\x20\x40\x44\x65\x76\x69\x6c\x73\x48\x65\x61\x76\x65\x6e\x4d\x46")
await idle()
if __name__ == "__main__":
loop.run_until_complete(init())
LOGGER("AnonX").info("Stopping Music Bot...")