-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy path__main__.py
More file actions
35 lines (25 loc) · 1.01 KB
/
__main__.py
File metadata and controls
35 lines (25 loc) · 1.01 KB
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
from index import *
from commands import *
from guildSettings.guildSettings import *
print(f'Starting up: Skybot {version}')
@client.event
async def on_ready():
await client.change_presence(activity=discord.Game(f'({version}) {botInfo["statusMessage"]}'))
print('logged in as {0.user}\n\n'.format(client))
@client.event
async def on_message(message):
settings = guildSettings(message)
if message.author == client.user:
return
await settingsCommands(message, settings)
if (not settings['enableBot']):
return
if settings['allowMessageResponses']:
await messageResponses(message)
if message.content.startswith(settings['commandChar']):
args = shlex.split(message.content.lower().replace(settings['commandChar'],''))
command = args.pop(0)
await userCommands(message, command, args, settings)
if settings['allowJapeCommands']:
await japeCommands(message, command, args, settings)
client.run(config['token'])