base-discord-bot/boywife_bot.py

33 lines
833 B
Python
Executable File

#!/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')
@commands.command(name='boywife', aliases=['bb', 'bw', 'bot'], description="Command for chatting with chatbot.")
async def chat(self, ctx):
pass
# player = music_player.setup(client)
client.run(TOKEN)