diff options
| author | 2023-02-28 13:23:23 +0200 | |
|---|---|---|
| committer | 2023-02-28 13:23:23 +0200 | |
| commit | ddcf2c6e122c5f58c00bca7bc7dda98316c4d3ba (patch) | |
| tree | 0c004f614062da816eb06fcab15662d8c760d310 | |
| parent | Properly parameterize type hints in filter context (diff) | |
Use literals as defaults where possible
Co-authored-by: wookie184 <[email protected]>
| -rw-r--r-- | bot/exts/filtering/_filter_context.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/bot/exts/filtering/_filter_context.py b/bot/exts/filtering/_filter_context.py index c5ebd3997..9faa16b53 100644 --- a/bot/exts/filtering/_filter_context.py +++ b/bot/exts/filtering/_filter_context.py @@ -35,14 +35,14 @@ class FilterContext: before_message: Message | None = None message_cache: MessageCache | None = None # Output context - dm_content: str = field(default_factory=str) # The content to DM the invoker - dm_embed: str = field(default_factory=str) # The embed description to DM the invoker - send_alert: bool = field(default=False) # Whether to send an alert for the moderators - alert_content: str = field(default_factory=str) # The content of the alert + dm_content: str = "" # The content to DM the invoker + dm_embed: str = "" # The embed description to DM the invoker + send_alert: bool = False # Whether to send an alert for the moderators + alert_content: str = "" # The content of the alert alert_embeds: list[Embed] = field(default_factory=list) # Any embeds to add to the alert action_descriptions: list = field(default_factory=list) # What actions were taken matches: list[str] = field(default_factory=list) # What exactly was found - notification_domain: str = field(default_factory=str) # A domain to send the user for context + notification_domain: str = "" # A domain to send the user for context filter_info: dict['Filter', str] = field(default_factory=dict) # Additional info from a filter. # Additional actions to perform additional_actions: list[Callable[[FilterContext], Coroutine]] = field(default_factory=list) |