Skip to content

feat: adding bot whitelist command to monitor 'enabled' channels#27

Open
0xDracula wants to merge 2 commits into
hackclub:mainfrom
0xDracula:feat/bot-whitelist-cmd
Open

feat: adding bot whitelist command to monitor 'enabled' channels#27
0xDracula wants to merge 2 commits into
hackclub:mainfrom
0xDracula:feat/bot-whitelist-cmd

Conversation

@0xDracula

Copy link
Copy Markdown
Member

Adds a system to prevent unauthorized bots from joining channels where the bot is enabled (I made this PR due to what happened yesterday Slack Thread)

Commands

  • /bot-whitelist status - View current settings for the channel.
  • /bot-whitelist enable - Start protection (Firehose will join automatically).
  • /bot-whitelist disable - Stop protection.
  • /bot-whitelist add @bot - Add a bot to the "safe list".
  • /bot-whitelist remove @bot - Remove from safe list (kicks them immediately if
    active).

What it does (in case it's enabled):

  • Kicks any bots that joins the channel and not in the whitelist
  • Removing a bot from whitelist triggers an immediate kick from the channel
  • FIrehose itself is exempt from all this rules

@0xDracula

Copy link
Copy Markdown
Member Author

What the last commit does?

  • deletes top-level messages in enabled channels where the bot isn't whitelisted
  • logs internally with a link to the marketplace to disable the bot

tested:

  • sent a message to the channel while bot is whitelisted, and protection enabled -> worked (nothing happened)

  • sent a message to a channel while the bot isn't whitelisted, and protection enabled -> bot kicked from channel, message deleted, logged internally

Bot Protection: Deleted top-level message from unauthorized bot Polls for Slack in #dev.
Original Message: https://hackclub.slack.com/archives/.....
Manage this bot: https://hackclub.slack.com/marketplace/<bot_id>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant