Skip to content

feature request: New example for Cogs #53

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())

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions