Skip to content

[Plugins] Not inheriting from PluginCog causes an error which is not about the problem at all #62

@onerandomusername

Description

@onerandomusername

Is there an existing issue for this?

  • I have searched the existing issues and there is no existing issue.

Current Behavior

Error which has nothing to do with the root cause, and therefore, easy solution.

image

Expected Behavior

image

Steps To Reproduce

Minimally reproductive code:

import logging

from discord.ext import commands
from discord.ext.commands import Context

from modmail.plugin_helpers import ModmailBot, ModmailLogger

log: ModmailLogger = logging.getLogger(__name__)


class Planet(commands.Cog):
    """This is a planet."""

    def __init__(self, bot: ModmailBot):
        self.bot = bot

    @commands.command()
    async def world(self, ctx: Context):
        log.debug("The alien {0} has requested to know what planet they are on.".format(ctx.author))
        await ctx.send("earth")


def setup(bot: ModmailBot):
    bot.add_cog(Planet(bot))

Select your hosting method

local hosting

Anything else?

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions