diff options
| author | 2021-03-03 15:58:50 +0200 | |
|---|---|---|
| committer | 2021-03-03 15:58:50 +0200 | |
| commit | 54952d11339ce4e065f061064098e76a780d5644 (patch) | |
| tree | fcabc1801e1bc01b7b88996b98828968fec2864d | |
| parent | Merge 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.py | 8 |
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) |