Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
1 task done
onerandomusername opened this issue Aug 23, 2021 · 0 comments · May be fixed by #69
Open
1 task done
Assignees
Labels
a: addon system Involving the system for addons to utlise l: beginner p: normal Normal Priority t: bug Something isn't working

Comments

@onerandomusername
Copy link
Member

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

@onerandomusername onerandomusername added a: bot t: bug Something isn't working s: needs triage Needs labels assigned labels Aug 23, 2021
@onerandomusername onerandomusername self-assigned this Aug 23, 2021
@onerandomusername onerandomusername added a: addon system Involving the system for addons to utlise l: beginner p: normal Normal Priority and removed s: needs triage Needs labels assigned labels Aug 23, 2021
@onerandomusername onerandomusername linked a pull request Sep 19, 2021 that will close this issue
@onerandomusername onerandomusername linked a pull request Sep 19, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a: addon system Involving the system for addons to utlise l: beginner p: normal Normal Priority t: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants