Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kartikesingh/discord-minesweeper
minesweeper game for discord bots
https://github.com/kartikesingh/discord-minesweeper
Last synced: 24 days ago
JSON representation
minesweeper game for discord bots
- Host: GitHub
- URL: https://github.com/kartikesingh/discord-minesweeper
- Owner: KartikeSingh
- Created: 2022-01-23T06:11:23.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2023-02-09T08:04:19.000Z (almost 2 years ago)
- Last Synced: 2024-12-09T22:36:42.227Z (30 days ago)
- Language: TypeScript
- Size: 21.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Installations
```
npm i discord-minesweeper-game
```## What ?
This package is to make a minesweeper game for your discord bot.
Now `only` supports `discord JS 14`## Why ?
- Easy to use.
- Highly Customizable. ( works with 0 configuration too )
- Fast and advanced.
- Supports [email protected]## How ?
```js
const game = require('discord-minesweeper-game').default;
// import game from 'discord-minesweeper'; // for ts// interaction = command interaction, we get on slash commands
// for options check below
const result = await game.start(interaction, options);/* Example result object
* {
* endReason: 0, // -1 => time (took too long to respond), 0 => lost the game, 1 => won the game
* score: 10, // Amount of points they won
* win: true, // Whether they won or not
* board: "the game board in string format (the game window made via emojis)"
* }
*/
```## Customization with options
- #### Settings
```js
game.start(interaction, {
size: 3, // Size of game board
bombs: 3, // Number of bombs
prefix: "", // The prefix
timer: 60000, // Time after which game ends
})
```
- #### Custom replies
```js
game.start(ineraction, {
// Message to add just below the game board
embedMessage: "ey nerd, use \`{prefix} block-id\` to open a block, block id is like \`A1\`, you just have {timer} time left"// Message when bomb is blasted
bombMessage: "the bombs blasted, you died/lost xd nerddd",// Message when timer ends
timerMessage: "The bomb timer ended, you ded nerd",// Message when user wins the game
winMessage: "You successfully digged the area, gg boi",
})
```## Images
- #### Gameboard
![image](https://media.discordapp.net/attachments/814009062219317318/1042340314884603905/image.png)- #### Win Message
![image](https://media.discordapp.net/attachments/814009062219317318/1042340314511323156/image.png)- #### Bomb Message
![image](https://media.discordapp.net/attachments/814009062219317318/1042340314079318097/image.png)## Supports
For support or issues or queries contace me on my [discord server](https://discord.gg/YayNfuEkFU).