-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
39 lines (31 loc) · 1018 Bytes
/
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
import datetime
import discord
from discord.ext import commands
import openai
import events
import basecmds
import modcmds
import othercmds
import voicecmds
starttime = datetime.datetime.utcnow()
openai.api_key = 'your token'
token = 'your token'
intents = discord.Intents.all()
intents.members = True
client = commands.Bot(command_prefix='x!', intents=intents)
async def start():
await client.add_cog(events.Events(client))
await client.add_cog(basecmds.BaseCommands(client, starttime))
await client.add_cog(modcmds.ModCommands(client))
await client.add_cog(voicecmds.VoiceCommands(client))
await client.add_cog(othercmds.OtherCommands(client))
# do things while we are ready
@client.event
async def on_ready():
client.remove_command('help')
await start()
print('Servers connected to:')
for guild in client.guilds:
print(guild.name)
await client.change_presence(activity=discord.Activity(type=discord.ActivityType.listening, name=f" x!help"))
client.run(token)