From 5934506c8af7de87d35d483cd61988791af1c113 Mon Sep 17 00:00:00 2001 From: cswimr Date: Fri, 23 Aug 2024 14:54:06 -0400 Subject: [PATCH] fix(aurora): make `silent` an optional argument in `Aurora.moderate()` --- aurora/aurora.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/aurora/aurora.py b/aurora/aurora.py index 2e35ac7..1d13b98 100644 --- a/aurora/aurora.py +++ b/aurora/aurora.py @@ -46,7 +46,7 @@ class Aurora(commands.Cog): This cog stores all of its data in an SQLite database.""" __author__ = ["[cswimr](https://www.coastalcommits.com/cswimr)"] - __version__ = "3.0.0-indev23" + __version__ = "3.0.0-indev24" __git__ = "https://www.coastalcommits.com/cswimr/SeaCogs" __documentation__ = "https://seacogs.coastalcommits.com/aurora/" @@ -114,16 +114,16 @@ class Aurora(commands.Cog): self.handle_expiry.cancel() @staticmethod - async def moderate(ctx: Union[commands.Context, discord.Interaction], target: discord.Member | discord.User | discord.abc.Messageable, silent: bool | None, permissions: List[str], moderation_type: Type | str, **kwargs) -> None | Type: + async def moderate(ctx: Union[commands.Context, discord.Interaction], target: discord.Member | discord.User | discord.abc.Messageable, permissions: List[str], moderation_type: Type | str, silent: bool | None = None, **kwargs) -> None | Type: """This function is used to moderate users. It checks if the target can be moderated, then calls the handler method of the moderation type specified. Args: ctx (Union[commands.Context, discord.Interaction]): The context of the command. If this is a `discord.Interaction` object, it will be converted to a `commands.Context` object. Additionally, if the interaction orignated from a context menu, the `ctx.author` attribute will be overriden to `interaction.user`. target (discord.Member, discord.User, discord.abc.Messageable): The target user or channel to moderate. - silent (bool | None): Whether to send the moderation action to the target. permissions (List[str]): The permissions required to moderate the target. moderation_type (Type): The moderation type (handler) to use. See `aurora.models.moderation_types` for some examples. + silent (bool, optional): Whether or not to message the target. Defaults to None. **kwargs: The keyword arguments to pass to the handler method. """ if isinstance(moderation_type, str):