bnotwbot — Slack bot for bnotw Tumblr blog + acronym game.
Setup:
pip install slack-bolt pytumblr python-dotenv
Required environment variables:
SLACK_BOT_TOKEN— Bot token (xoxb-...)SLACK_APP_TOKEN— App-level token for Socket Mode (xapp-...)TUMBLR_CONSUMER_KEYTUMBLR_CONSUMER_SECRETTUMBLR_OAUTH_TOKENTUMBLR_OAUTH_SECRET
Slack app configuration (at api.slack.com/apps):
- Enable Socket Mode
- Add slash commands:
- /acro
- /bnotw
- Bot Token Scopes:
- commands
- chat:write
- im:history
- channels:history
- groups:history
- app_mentions:read
- Subscribe to bot events:
- message.im
- message.channels
- message.groups
- app_mention
/acro — start a game of Acronyms Against Humanity
/bnotw add <text> — add a new bnotw. make it count!
/bnotw random — get a random bnotw
/bnotw search <query> — search for matching bnotws
/bnotw help — show this message