Skip to content

Commit

Permalink
Add disable_header to watchchannel to disable talentpool headers
Browse files Browse the repository at this point in the history
We need to disable this, because new format of nominations
don't match with it.
  • Loading branch information
ks129 committed Mar 3, 2021
1 parent 29ab19b commit 54952d1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion bot/exts/moderation/watchchannels/_watchchannel.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ def __init__(
webhook_id: int,
api_endpoint: str,
api_default_params: dict,
logger: logging.Logger
logger: logging.Logger,
*,
disable_header: bool = False
) -> None:
self.bot = bot

Expand All @@ -66,6 +68,7 @@ def __init__(
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())

Expand Down Expand Up @@ -267,6 +270,9 @@ async def relay_message(self, msg: Message) -> None:

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)
Expand Down

0 comments on commit 54952d1

Please sign in to comment.