-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
31 lines (20 loc) · 696 Bytes
/
Copy pathmain.py
File metadata and controls
31 lines (20 loc) · 696 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 asyncio
import os
from dotenv import load_dotenv
import discord
from discord.ext import commands
intents = discord.Intents(messages=True, guilds=True, reactions=True, message_content=True, voice_states=True)
bot = commands.Bot(command_prefix='!', intents=intents)
dotenv_path = os.path.join(os.path.dirname(__file__), '.env')
if os.path.exists(dotenv_path):
load_dotenv(dotenv_path)
async def setup():
print("Running setup...")
await bot.load_extension("cogs.music")
# bot.add_cog(player.Music(bot))
print("Setup complete.")
# @bot.command()
# async def ping(ctx):
# await ctx.send('pong')
asyncio.run(setup())
bot.run(os.getenv('TOKEN'), reconnect=True)