I've been following tutorials with no experience, and am stuck in making a Slack Bot. My goal is to create a Slack Bot that listens to every message sent within a channel in my workspace, and to detect/ delete any messages that have swearing or profanity in the text. So far I created an app that's running on socket mode, I enabled Events Subscription and assigned all permissions needed (chat.read, chat.write, chat.delete, ect). The bot is installed to the workspace and should have everything it needs to get up and running. I have also created a project in glitch.com and connected the app so that I can input any needed Bolt coding, but I can't figure out what to do to actually get the Bot to start reading messages, and how I can set a list of trigger words for it to know which messgaes to delete.
Thank you in advance for your help!
It sounds like you're on your way to getting your app set up!
Depending on what kind of channel you want to monitor, you should subscribe to the appropriate event. As an example, if you want to receive messages from a channel, you'd subscribe to the
message.channelsevent: https://api.slack.com/events/message.channels.Within the event itself, you should look at the
textvalue, compare it to a list of profanity words and then do some kind of action based on that.I hope that gets you unstuck!