forked from NTUDevSoc/Discord-Bot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbot.py
More file actions
33 lines (25 loc) · 1 KB
/
bot.py
File metadata and controls
33 lines (25 loc) · 1 KB
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
import discord
import os
from discord.ext import commands
intents = discord.Intents.default()
intents.members = True
intents.typing = True
intents.presences = True
intents.messages = True
intents.guilds = True
intents.reactions = True
client = commands.Bot(command_prefix=".", owner_id=153487284061077504, description="DevBot", intents=intents)
client.remove_command('help')
TOKEN = os.environ["TOKEN"]
@client.event
async def on_ready():
print(f"\n\nLogged in as: {client.user.name} - {client.user.id}\nVersion: {discord.__version__}\n")
print("Successfully logged in")
client.botLogChannel = await client.fetch_channel(814152479100633128)
client.botCommandChannel = await client.fetch_channel(517651663729852416)
client.roomChannel = await client.fetch_channel(892436503890915438)
for filename in os.listdir("./cogs"):
if filename.endswith(".py"):
client.load_extension(f"cogs.{filename[:-3]}")
print(f"Loaded Cog: {filename}")
client.run(TOKEN)