#!/usr/bin/env python3 import asyncio import discord from discord.ext import commands from dotenv import load_dotenv import os # Load credentials load_dotenv() TOKEN = os.getenv('DISCORD_TOKEN') # client = discord.Client() client = commands.Bot(command_prefix = '!', intents=discord.Intents.all()) # You need to import os for this method @client.event async def on_ready(): print(f'{client.user} is now running') # Load cogs for filename in os.listdir('./cogs'): if filename.endswith('.py'): await client.load_extension(f'cogs.{filename[:-3]}') print(f'Loaded {filename} cog') # player = music_player.setup(client) client.run(TOKEN)