Hello! I'm a verified Discord bot that can generate a random Minesweeper game using the new spoiler tags, for anyone to play!
Once I am in your server, you can use the command /minesweeper
to generate a game.
In servers, you can only use slash commands. Discord no longer allows text commands in servers, but you can still use them in a DM with me (the prefix is !
).
When you run the /minesweeper
command, I will reply with a grid of spoiler tags. It has four options:
game-width
andgame-height
tell me how many squares the game should be wide and tall, for a maximum of 24x20. Default is 8x8.num-mines
is how many mines there should be in the game; the more mines the more difficult it is. If omitted, I will pick a number based on the size of the game.- If you set
dont-start-uncovered
to true, all squares will start unopened. Otherwise, the first zeroes will have already been opened for you.
Here's the other commands I listen to:
/minesweeperraw
– same as/minesweeper
, but it gives you the raw text/copypasta so you can share the game./auto
– makes me send a new Minesweeper game at regular intervals in the channel. (Requires Manage Channel permissions. You can stop me again by setting the interval to 0.)/info
– displays info about me./howtoplay
– displays a tutorial about how to play the game./news
– displays info about my latest updates./ping
– displays my heartbeat ping.
When using text commands, you can also use the shorthands ms
or msraw
, and there is also a help
command that lists all text commands.
My creator is @JochCool#1314. If you have any feedback, questions or other remarks, you can DM him, create an issue on GitHub, or join my Discord support server.
Oh no! Please ping my creator so he can revive me (see the feedback section above)!
This may be because you do not have the "Use Application Commands" permission. Otherwise, try re-inviting me to the server (and verify that "Create commands in a server" is checked).
...asked no one ever. I mean, yes there is, because Discord forced my owner to make one, but it does not contain anything surprising because I am a bot that makes minesweeper games.
If you want to try my code out or run me on a private bot, that is allowed, as long as you remember that the code is published under an MIT license. This means that you must include the LICENSE file every time you distribute the code.
- If you haven't done so already, go to https://discord.com/developers/applications and create a new application and turn it into a bot. Take note of two things: the application ID, and the token (on the "Bot" page). You'll need them later.
- Clone the repository from GitHub. (Click the green button in the top right corner of the repo that says "code", and click "Download ZIP". Alternatively, if you have Git installed, you can use
git clone https://github.com/JochCool/minesweeper-bot.git
.) - Open the file "auth.json" and on the second line of that file (where it says
"bottoken": "CENSORED"
), replace the wordCENSORED
with the token from step 1. You can ignore the"topggtoken"
. - Download and install NodeJS.
- Open the command line and navigate (using the
cd
command) to the folder in which you unzipped the repo at step 2. Then typenpm install discord.js @discordjs/rest
. - If you want, you can change some of the bot's settings by editing the
settings.json
file. - To register the slash commands (optional), type
node setup.js <id>
, and where it says<id>
paste the application ID from step 1. Note that it may take up to an hour before the commands appear. - Run
node ./
to get me online. Have fun!
If you encounter an error, please open an issue and my creator will take a look.