Fix remaining cog -> extension renames
This commit is contained in:
parent
263fb7dda9
commit
3bb7090a6d
3 changed files with 6 additions and 4 deletions
|
@ -775,10 +775,12 @@ class Jarvis(Client):
|
||||||
async def on_button(self, event: Button) -> None:
|
async def on_button(self, event: Button) -> None:
|
||||||
"""Process button events."""
|
"""Process button events."""
|
||||||
context = event.context
|
context = event.context
|
||||||
|
|
||||||
|
if not context.custom_id.startswith("modcase|"):
|
||||||
|
return # await super().on_button(event)
|
||||||
|
|
||||||
if not context.deferred and not context.responded:
|
if not context.deferred and not context.responded:
|
||||||
await context.defer(ephemeral=True)
|
await context.defer(ephemeral=True)
|
||||||
if not context.custom_id.startswith("modcase|"):
|
|
||||||
return await super().on_button(event)
|
|
||||||
|
|
||||||
if not context.author.has_permission(Permissions.MODERATE_MEMBERS):
|
if not context.author.has_permission(Permissions.MODERATE_MEMBERS):
|
||||||
return
|
return
|
||||||
|
|
|
@ -20,7 +20,7 @@ class BotutilCog(Extension):
|
||||||
def __init__(self, bot: Client):
|
def __init__(self, bot: Client):
|
||||||
self.bot = bot
|
self.bot = bot
|
||||||
self.logger = logging.getLogger(__name__)
|
self.logger = logging.getLogger(__name__)
|
||||||
self.add_cog_check(self.is_owner)
|
self.add_ext_check(self.is_owner)
|
||||||
|
|
||||||
async def is_owner(self, ctx: PrefixedContext) -> bool:
|
async def is_owner(self, ctx: PrefixedContext) -> bool:
|
||||||
"""Checks if author is bot owner."""
|
"""Checks if author is bot owner."""
|
||||||
|
|
|
@ -20,7 +20,7 @@ class ModcaseCog(Extension):
|
||||||
def __init__(self, bot: Client):
|
def __init__(self, bot: Client):
|
||||||
self.bot = bot
|
self.bot = bot
|
||||||
self.logger = logging.getLogger(__name__)
|
self.logger = logging.getLogger(__name__)
|
||||||
self.add_cog_postrun(self.log)
|
self.add_extension_postrun(self.log)
|
||||||
|
|
||||||
async def log(self, ctx: InteractionContext, *_args: list, **kwargs: dict) -> None:
|
async def log(self, ctx: InteractionContext, *_args: list, **kwargs: dict) -> None:
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Add table
Reference in a new issue