-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbot.py
36 lines (30 loc) · 967 Bytes
/
bot.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
from disnake.ext import commands
from disnake import Intents
import config
import setup
import asyncio
class Bot(commands.Bot):
def __init__(self, **kwargs):
super().__init__(
command_prefix=commands.when_mentioned_or('!'),
description='Third and final refactor',
test_guilds=[953357475254505592],
sync_commands_debug=True,
intents=Intents.all(),
)
for cog in setup.cogs:
try:
self.load_extension(cog)
except Exception as e:
print(f'Failed to load cog {cog}\n{e}')
async def on_ready(self):
print(f'Logged on as {self.user} (ID: {self.user.id})')
async def main() -> None:
# intents = Intents.default()
# intents.members = True
# intents.presences = True
# intents.messages = True
bot = Bot()
await bot.start(config.token)
if __name__ == '__main__':
asyncio.run(main())