Skip to content

Commit

Permalink
Fix help and ping commands not taking enough parameters
Browse files Browse the repository at this point in the history
The help and ping command functions only took the channel parameter because they didn't use the message.
However, the message is still passed by the processing function, so we need to keep it in the function parameters.
  • Loading branch information
TimJentzsch committed Jan 27, 2022
1 parent 94c146a commit fa9bfb0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/slack/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def process_message(data: Dict) -> None:
)


def help_cmd(channel: str) -> None:
def help_cmd(channel: str, _message: str) -> None:
"""Post a help message to slack."""
client.chat_postMessage(channel=channel, text=i18n["slack"]["help_message"])

Expand Down Expand Up @@ -112,7 +112,7 @@ def info_cmd(channel: str, message: str) -> None:
client.chat_postMessage(channel=channel, text=msg)


def pong_cmd(channel: str) -> None:
def pong_cmd(channel: str, _message: str) -> None:
"""Respond to pings."""
client.chat_postMessage(channel=channel, text="PONG")

Expand Down

0 comments on commit fa9bfb0

Please sign in to comment.