-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
66 lines (49 loc) · 1.72 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
"""
Jeff the eGod here,
"""
import os, sys, time, requests, discord, threading
intents = discord.Intents.default()
intents.members = True
# Importing submodules
from src.bot.command_handler import *
from src.config.main import *
from src.config.config_cmds import *
from src.config.configure import *
from src.discord_utils.embed_msg import *
from src.utils.custom_utils import *
from src.blacklist.main import *
"""
Skrillec Moderation Bot
"""
class MyClient(discord.Client):
async def on_ready(self):
print('Logged on as {0}!'.format(self.user))
async def on_join(self, client):
print("works 1")
async def on_member_join(self, client):
print("works 2")
async def on_message(self, client):
if url_block(client.content) == 0 and str(client.author.id) != "942812551362777088":
await client.delete()
return await embed(client, "Error", "No Links Skid")
if (client.content).startswith(Config.bot_prefix):
full_cmd = client.content
cmd_args = (client.content).split(" ")
cmd = (cmd_args[0])[1:]
print(cmd)
all_cmds = get_cmds()
if cmd in all_cmds:
await handle_cmd(client, full_cmd, cmd, cmd_args)
else:
await embed(client, "Error", "Command not found!")
print('client from {0.author}: {0.content}'.format(client))
"""
Skrillec DDOS Bot
"""
class Skrillec_DDOS(discord.Client):
async def on_ready(self):
print('Logged on as {0}!'.format(self.user))
async def on_message(self, client):
print('client from {0.author}: {0.content}'.format(client))
client = MyClient(intents=intents)
client.run(sys.argv[1])