discord-modmail / discord-modmail/modmail
[Plugins] Not inheriting from PluginCog causes an error which is not about the problem at all
Open
a: addon system
l: beginner
p: normal
t: bug
- Dominant language
- Python
- Stars
- 14
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Description
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.

Expected Behavior

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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.