aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar ks129 <[email protected]>2021-03-03 15:58:50 +0200
committerGravatar ks129 <[email protected]>2021-03-03 15:58:50 +0200
commit54952d11339ce4e065f061064098e76a780d5644 (patch)
treefcabc1801e1bc01b7b88996b98828968fec2864d
parentMerge pull request #1440 from bast0006/master (diff)
Add disable_header to watchchannel to disable talentpool headers
We need to disable this, because new format of nominations don't match with it.
-rw-r--r--bot/exts/moderation/watchchannels/_watchchannel.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/bot/exts/moderation/watchchannels/_watchchannel.py b/bot/exts/moderation/watchchannels/_watchchannel.py
index f9fc12dc3..0793a66af 100644
--- a/bot/exts/moderation/watchchannels/_watchchannel.py
+++ b/bot/exts/moderation/watchchannels/_watchchannel.py
@@ -47,7 +47,9 @@ class WatchChannel(metaclass=CogABCMeta):
webhook_id: int,
api_endpoint: str,
api_default_params: dict,
- logger: logging.Logger
+ logger: logging.Logger,
+ *,
+ disable_header: bool = False
) -> None:
self.bot = bot
@@ -66,6 +68,7 @@ class WatchChannel(metaclass=CogABCMeta):
self.channel = None
self.webhook = None
self.message_history = MessageHistory()
+ self.disable_header = disable_header
self._start = self.bot.loop.create_task(self.start_watchchannel())
@@ -267,6 +270,9 @@ class WatchChannel(metaclass=CogABCMeta):
async def send_header(self, msg: Message) -> None:
"""Sends a header embed with information about the relayed messages to the watch channel."""
+ if self.disable_header:
+ return
+
user_id = msg.author.id
guild = self.bot.get_guild(GuildConfig.id)