aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Sebastiaan Zeeff <[email protected]>2020-09-20 12:04:56 +0200
committerGravatar Sebastiaan Zeeff <[email protected]>2020-09-20 12:52:55 +0200
commit9410194c058675428c4ed99f403e84cb65c18a71 (patch)
tree7f1585cafc7d0d7dd20ac87ba0354ffdcb5603bf
parentIgnore non-staff messages for our duckpond (diff)
Add channel blacklist for duckpond
As announcements already get a lot of exposure and have a high risk of getting "ducked", duckpond will now ignore those channels and never relay those announcements to our duckpond. Signed-off-by: Sebastiaan Zeeff <[email protected]>
-rw-r--r--bot/cogs/duck_pond.py4
-rw-r--r--bot/constants.py8
-rw-r--r--config-default.yml30
3 files changed, 38 insertions, 4 deletions
diff --git a/bot/cogs/duck_pond.py b/bot/cogs/duck_pond.py
index 66e862ab2..84c0c4265 100644
--- a/bot/cogs/duck_pond.py
+++ b/bot/cogs/duck_pond.py
@@ -125,6 +125,10 @@ class DuckPond(Cog):
amount of ducks specified in the config under duck_pond/threshold, it will
send the message off to the duck pond.
"""
+ # Was this reaction issued in a blacklisted channel?
+ if payload.channel_id in constants.DuckPond.channel_blacklist:
+ return
+
# Is the emoji in the reaction a duck?
if not self._payload_has_duckpond_emoji(payload.emoji):
return
diff --git a/bot/constants.py b/bot/constants.py
index f087fd96f..aec0ffce3 100644
--- a/bot/constants.py
+++ b/bot/constants.py
@@ -252,6 +252,7 @@ class DuckPond(metaclass=YAMLGetter):
section = "duck_pond"
threshold: int
+ channel_blacklist: List[int]
class Emojis(metaclass=YAMLGetter):
@@ -380,12 +381,14 @@ class Channels(metaclass=YAMLGetter):
section = "guild"
subsection = "channels"
+ admin_announcements: int
admin_spam: int
admins: int
announcements: int
attachment_log: int
big_brother_logs: int
bot_commands: int
+ change_log: int
cooldown: int
defcon: int
dev_contrib: int
@@ -397,9 +400,11 @@ class Channels(metaclass=YAMLGetter):
how_to_get_help: int
incidents: int
incidents_archive: int
+ mailing_lists: int
message_log: int
meta: int
mod_alerts: int
+ mod_announcements: int
mod_log: int
mod_spam: int
mods: int
@@ -408,7 +413,10 @@ class Channels(metaclass=YAMLGetter):
off_topic_2: int
organisation: int
python_discussion: int
+ python_events: int
+ python_news: int
reddit: int
+ staff_announcements: int
talent_pool: int
user_event_announcements: int
user_log: int
diff --git a/config-default.yml b/config-default.yml
index 8d13b2d11..4c1c7e483 100644
--- a/config-default.yml
+++ b/config-default.yml
@@ -130,9 +130,14 @@ guild:
modmail: 714494672835444826
channels:
- announcements: 354619224620138496
- user_event_announcements: &USER_EVENT_A 592000283102674944
- python_news: &PYNEWS_CHANNEL 704372456592506880
+ # Public announcement and news channels
+ change_log: &CHANGE_LOG 748238795236704388
+ announcements: &ANNOUNCEMENTS 354619224620138496
+ python_news: &PYNEWS_CHANNEL 704372456592506880
+ python_events: &PYEVENTS_CHANNEL 729674110270963822
+ mailing_lists: &MAILING_LISTS 704372456592506880
+ reddit: &REDDIT_CHANNEL 458224812528238616
+ user_event_announcements: &USER_EVENT_A 592000283102674944
# Development
dev_contrib: &DEV_CONTRIB 635950537262759947
@@ -163,7 +168,6 @@ guild:
# Special
bot_commands: &BOT_CMD 267659945086812160
esoteric: 470884583684964352
- reddit: 458224812528238616
verification: 352442727016693763
# Staff
@@ -178,6 +182,12 @@ guild:
mod_spam: &MOD_SPAM 620607373828030464
organisation: &ORGANISATION 551789653284356126
staff_lounge: &STAFF_LOUNGE 464905259261755392
+ duck_pond: &DUCK_POND 637820308341915648
+
+ # Staff announcement channels
+ staff_announcements: &STAFF_ANNOUNCEMENTS 464033278631084042
+ mod_announcements: &MOD_ANNOUNCEMENTS 372115205867700225
+ admin_announcements: &ADMIN_ANNOUNCEMENTS 749736155569848370
# Voice
admins_voice: &ADMINS_VOICE 500734494840717332
@@ -454,6 +464,18 @@ sync:
duck_pond:
threshold: 5
+ channel_blacklist:
+ - *ANNOUNCEMENTS
+ - *PYNEWS_CHANNEL
+ - *PYEVENTS_CHANNEL
+ - *MAILING_LISTS
+ - *REDDIT_CHANNEL
+ - *USER_EVENT_A
+ - *DUCK_POND
+ - *CHANGE_LOG
+ - *STAFF_ANNOUNCEMENTS
+ - *MOD_ANNOUNCEMENTS
+ - *ADMIN_ANNOUNCEMENTS
python_news:
mail_lists: