-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBot.py
More file actions
36 lines (27 loc) · 817 Bytes
/
Copy pathBot.py
File metadata and controls
36 lines (27 loc) · 817 Bytes
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
# Built In Library
import os
# 3rd Party Libraries
from dotenv import load_dotenv
import discord
from discord.ext import commands
intents = discord.Intents.default()
load_dotenv()
class TemplateBot(commands.Bot):
def __init__(self):
super().__init__(
command_prefix='!',
case_insensitive=True,
help_command=None,
intents=intents)
async def setup_hook(self):
for ext in os.listdir("./cogs"):
if ext.endswith(".py"):
await bot.load_extension(f"cogs.{ext[:-3]}")
print(ext)
await bot.tree.sync()
async def on_ready(self):
print(f"Connected to {self.user}")
print(discord.__version__)
if __name__ == "__main__":
bot = TemplateBot()
bot.run(os.getenv("Token"))