-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
36 lines (25 loc) · 827 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
import os
import traceback
from typing import Any
import discord
from discord.ext import commands
from dotenv import load_dotenv
from cogs import EXTENSIONS
class EmbedBot(commands.Bot):
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
async def setup_hook(self) -> None:
for cog in EXTENSIONS:
try:
await self.load_extension(f"{cog}")
except commands.errors.ExtensionError:
traceback.print_exc()
await self.load_extension("jishaku")
bot = EmbedBot(command_prefix=commands.when_mentioned_or("e$"), intents=discord.Intents.all(), strip_after_prefix=True)
@bot.event
async def on_ready():
print(bot.user)
print(bot.user.id)
# so far this.
load_dotenv()
bot.run(os.environ["TOKEN"])