-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
executable file
·60 lines (49 loc) · 1.21 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
import discord
import asyncio
import aiohttp
import utils
cogs = [
'cogs.info',
'cogs.mod',
'cogs.reminder',
'cogs.misc',
'cogs.game',
'cogs.dev',
'cogs.utility',
'cogs.image',
'cogs.config',
'cogs.events',
'cogs.error',
'cogs.randomc'
]
headers = {
'User-Agent': 'DoggieBot (Doggie#0189); "A Discord bot")'
}
intents = discord.Intents(
message_content=True,
reactions=True,
messages=True,
members=True,
guilds=True,
emojis=True,
bans=True
)
async def startup():
bot = utils.CustomBot(
activity=discord.Game(name='Default prefixes: "@Doggie Bot" or "doggie."'),
allowed_mentions=discord.AllowedMentions(replied_user=False),
command_prefix=utils.CustomBot.get_custom_prefix,
help_command=utils.CustomHelp(),
strip_after_prefix=True,
case_insensitive=True,
max_messages=20000,
intents=intents,
)
bot.cogs_list = cogs
for cog in cogs:
await bot.load_extension(cog)
async with aiohttp.ClientSession(headers=headers) as session:
bot.session = session
await bot.start(bot.config['bot_token'])
if __name__ == '__main__':
asyncio.run(startup())