diff --git a/seautils/seautils.py b/seautils/seautils.py index 6790627..c575f6b 100644 --- a/seautils/seautils.py +++ b/seautils/seautils.py @@ -38,7 +38,7 @@ class SeaUtils(commands.Cog): ] return "\n".join(text) - def format_src(self, ctx: commands.Context, obj: Any) -> str: + def format_src(self, obj: Any) -> str: """A large portion of this code is repurposed from Zephyrkul's RTFS cog. https://github.com/Zephyrkul/FluffyCogs/blob/master/rtfs/rtfs.py""" obj = inspect.unwrap(obj) @@ -55,15 +55,15 @@ class SeaUtils(commands.Cog): @commands.command(aliases=["source", "src", "code", "showsource"]) @commands.is_owner() - async def showcode(self, ctx: commands.Context, *, object: str): + async def showcode(self, ctx: commands.Context, *, object: str): # pylint: disable=redefined-builtin """Show the code for a particular object.""" try: if object.startswith("/") and (obj := ctx.bot.tree.get_command(object[1:])): - text = self.format_src(ctx, obj) + text = self.format_src(obj) elif obj := ctx.bot.get_cog(object): - text = self.format_src(ctx, type(obj)) + text = self.format_src(type(obj)) elif obj := ctx.bot.get_command(object): - text = self.format_src(ctx, obj) + text = self.format_src(obj) temp_content = cf.pagify( text=cleanup_code(text), escape_mass_mentions=True,