Replies: 1 comment 2 replies
-
|
To add a cog, create a discord.py-self cog and add it under line Example Discord Cog code: from discord.ext import commands
class ExampleCog(commands.Cog):
def __init__(self, bot):
self.bot = bot
self.description = "Example commands"
@commands.command(name="example")
async def example(self, ctx):
await ctx.send("Hello World!")
def setup(bot):
bot.add_cog(ExampleCog(bot))How to add the cog to Ghost, this line would go in the await ghost.add_cog(ghost_commands.ExampleCog(ghost)) # If the cog is in the commands folder
await ghost.add_cog(ghost_events.ExampleCog(ghost)) # If the cog is in the events folder |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
How would one go around adding another categories to this sb? Nothin i do seems to work
Beta Was this translation helpful? Give feedback.
All reactions