#Cog module missing?
1 messages · Page 1 of 1 (latest)
Heads up @dawn kite!
We've deleted your bot's (Select Assistant#2988) token because you've accidentially shared it.
Please regenerate it at https://discord.com/developers/applications/1028019098011058196/bot to be safe
has the bot worked before this?
you have client.start
client.run()
the class name of the cog is on_ready
also you use files and not cogs, so it would be files.{}
you don't have a folder named cogs
load_extension takes a path. and cogs isn't a folder and doesn't exist
send file structure
you search for files folder and not for the cogs folder
remove await. load_extension isn't async
remove await from run
remove async from main and remove asyncio.run
remove async from load_files
remove all the async and await in the main file
Done with your help thread?
Please close your own help thread by using </close:882631512829329448> with @ebon glade.
This thread was archived by the user that opened it.
I am getting a similar error
import os
import discord
from discord.ext import commands
import logging
##setting up logging
logger = logging.getLogger('discord')
logger.setLevel(logging.DEBUG)
handler = logging.FileHandler(filename='birdy.log', encoding='utf-8', mode='w')
handler.setFormatter(logging.Formatter('%(asctime)s:%(levelname)s:%(name)s: %(message)s'))
logger.addHandler(handler)
intents = discord.Intents.default()
intents.message_content = True
bot = commands.Bot(command_prefix='/', intents=intents)
@bot.command()
async def ping(ctx):
await ctx.send("Pong!")
#load extension
bot.load_extension('voice')
my_secret = os.environ['TOKEN']
bot.run(my_secret)
main.py:23: RuntimeWarning: coroutine 'BotBase.load_extension' was never awaited
bot.load_extension('voice')
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
I am not able to load the extension without using the await keyword
please uninstall discord and discord.py also, reinstall py-cord