diff options
| author | 2022-06-22 14:17:49 +0100 | |
|---|---|---|
| committer | 2022-06-22 14:17:49 +0100 | |
| commit | af4339e1436bf554188205341a7b82becb573af1 (patch) | |
| tree | 4e521e76e1ee8aa3627291dfbe4d3c1883e7ec50 | |
| parent | Don't ping mods for autoban filters (diff) | |
Improved output format of guild autoban notifications
| -rw-r--r-- | bot/exts/filters/filter_lists.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bot/exts/filters/filter_lists.py b/bot/exts/filters/filter_lists.py index fe7a71e09..c643f9a84 100644 --- a/bot/exts/filters/filter_lists.py +++ b/bot/exts/filters/filter_lists.py @@ -64,9 +64,11 @@ class FilterLists(Cog): # to set a comment which includes [autoban]. # Having the guild name in the comment is still useful when reviewing # filter list, so prepend it to the set comment in case some mod forgets. + guild_name_part = f'Guild "{guild_data["name"]}"' if "name" in guild_data else None + comment = " - ".join( comment_part - for comment_part in (guild_data.get("name", ""), comment) + for comment_part in (guild_name_part, comment) if comment_part ) |