Skip to content

feature request: New example for Cogs #53

@MysticMia

Description

@MysticMia

Something along the lines of this, perhaps?

import revolt
from revolt.ext import commands

class TestCog(commands.Cog):
    @commands.command()
    async def ping(self, ctx: commands.Context):
        await ctx.send("pong")

class Client(commands.CommandsClient):
    async def get_prefix(self, message: revolt.Message):
        return "!"
    
async def main():
    async with revolt.utils.client_session() as session:
        client = Client(session, "BOT TOKEN HERE")
        client.add_cog(TestCog()) # initialize your custom cog
        await client.start()

asyncio.run(main())

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions