Skip to content

Instantly share code, notes, and snippets.

@TheOnlyWayUp
Created February 13, 2022 08:39
Show Gist options
  • Select an option

  • Save TheOnlyWayUp/387b75bb1da523b535cc8c38c4566554 to your computer and use it in GitHub Desktop.

Select an option

Save TheOnlyWayUp/387b75bb1da523b535cc8c38c4566554 to your computer and use it in GitHub Desktop.
Creates a list of all loaded cogs, made in response to https://discord.com/channels/434207294184620043/434352882507317250/942336370544898088 in the r/discord_bots discord server.
def setup(bot):
bot.loadedCogs.append('cog name')
def teardown(bot):
bot.loadedCogs.remove('cog name')
# https://discordpy.readthedocs.io/en/stable/ext/commands/extensions.html?highlight=load#cleaning-up
bot = commands.Bot()
bot.loadedCogs = []
# load cogs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment