A Discord bot that lets you play Hangman in both single-player and multiplayer modes. Challenge yourself or invite friends to compete in guessing words — all powered by Discord.js and JavaScript.
- Single Player Mode: Play hangman solo.
- Multiplayer Mode: Challenge other users in your server.
- Word Bank: Randomized words for replayability.
- Interactive Gameplay: Real-time updates with embeds/messages.
- Discord.js — for Discord API interactions
- Node.js — runtime environment
- JavaScript — core language
- Clone the repository:
git clone https://github.com/open-devhub/hangmanbot.git cd hangmanbot - Install dependencies:
npm install
- Create a
.envfile and add your bot token:DISCORD_TOKEN=your-bot-token-here
- Start the bot:
npm start
-
Start a game:
/play→ begins a single-player game.
/challenge <@user> <word> [hint]→ challenge another user. -
Gameplay:
Guess letters by selecting from select menu.
The bot updates the word, lives remaining, and progress.