-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbot.py
More file actions
31 lines (23 loc) · 722 Bytes
/
bot.py
File metadata and controls
31 lines (23 loc) · 722 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
import discord
from discord.ext import commands
import json
import config
import os
intents = discord.Intents.all()
bot = commands.Bot(command_prefix='m!', intents=intents)
@bot.event
async def on_ready():
print(f'Logged in as {bot.user.name}')
print(f'Bot ID: {bot.user.id}')
await bot.change_presence(
activity=discord.Game(name="with your mom 😏"),
status=discord.Status.online
)
await bot.tree.sync()
print('Commands synced!')
# Load all cogs from the 'cogs' directory
for filename in os.listdir('./cogs'):
if filename.endswith('.py'):
bot.load_extension(f'cogs.{filename[:-3]}')
if __name__ == '__main__':
bot.run(config.TOKEN)