#reloading cogs error
1 messages · Page 1 of 1 (latest)
Have you considered defining cogs
cogs = [ext[:-3] for ext in listdir("./cogs/") if ext.endswith(".py")]
is it defined in the same file?
Yes
i already got it
👍
.tag close
1 messages · Page 1 of 1 (latest)
im trying to reload my cogs but im getting this error
@bot.slash_command(name="reload", description="reloads commands")
async def reload(ctx):
if ctx.author.id == 647371029458452482:
await ctx.respond("reloading")
bot.reload_extension(f'cogs.{cogs}')
await ctx.respond(f"reloaded {cogs}")
Have you considered defining cogs
cogs = [ext[:-3] for ext in listdir("./cogs/") if ext.endswith(".py")]
is it defined in the same file?
Yes
i already got it
👍
.tag close