Skip to content
Notifications You must be signed in to change notification settings

TechPandaPro/slack-wordle-bot

Repository files navigation

slack-wordle-bot

Play Wordle in Slack. Written in TypeScript and powered by Bolt.

Special thanks to webrender/slack-wordle for the inspiration to use threads and Create slackbot using slack bolt API and Node.js for reference in the early stages of the project.

Daily Wordles are retrieved directly from the NYT API.

Usage within Slack

After installing the app, simply run the /wordle command! From there, the bot will reply with the Wordle board, and everyone can guess the word in the thread created by the bot. If this is your first time playing Wordle, consider checking out the official NYT Wordle game!

Wordle sample

Self-Hosting

You can also run your own instance of the bot:

Slack Bot Configuration

First, you will need to create a Slack app.

There are also some specific configurations required. Note that a slack_manifest.json file is included for convenience. However, if you prefer to create the app manually, you can do so:

  • Enable Socket Mode
    • This project was built without the expectation of a public HTTP Request URL, and thus the code architecture utilizes Socket Mode.
  • Add the following scopes ("OAuth & Permissions" > "Bot Token Scopes"): pes"):
    • channels:history
      • Allows the bot to read guesses within threads.
    • chat:write
      • Allows the bot to reply to guesses within threads.
    • commands
      • Allows the bot to create the /wordle command.
    • files:write
      • Allows the bot to upload the Wordle board images to Slack.
  • Create a /wordle command. (Slack docs)
    • This is the command that will be used to start Wordle games. "Command" is the only pertinent field.

You will need to install the app to your workspace ("Install App") after modifying these values.

Project Installation

These instructions require that you have already installed Git and Node.js.

git clone https://github.com/TechPandaPro/slack-wordle-bot.git

cd slack-wordle-bot
npm installl

Configuration

Before running the app, you must first create a .env file with all the necessary values.

You can copy the example with:

cp .env.example .env

Now that you have the example copied, you can fill in each value within the .env file from your Slack bot.

Running

After everything is installed and configured, you can run the bot with:

npm start

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published