Fix [p]diagnoseissues edge case for commands without a cog (#6237)

This commit is contained in:
Jakub Kuczys 2023-09-14 04:04:21 +02:00 committed by GitHub
parent 5069f464cc
commit 1132498f6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -485,9 +485,7 @@ class DetailedCommandChecksMixin(IssueDiagnoserBase):
return await self._check_requires(_("Permissions verification"), self.ctx.command) return await self._check_requires(_("Permissions verification"), self.ctx.command)
async def _check_requires_cog(self) -> CheckResult: async def _check_requires_cog(self) -> CheckResult:
label = _("Permissions verification for {cog} cog").format( label = _("Cog permissions verification")
cog=inline(self.ctx.cog.qualified_name)
)
if self.ctx.cog is None: if self.ctx.cog is None:
return CheckResult(True, label) return CheckResult(True, label)
return await self._check_requires(label, self.ctx.cog) return await self._check_requires(label, self.ctx.cog)