1.0.2 • Published 3 years ago
dsc-game v1.0.2
UnusualAbsurd Dsc-Game
This is an npm-package built with TypeScript and is a copy of https://npmjs.com/package/discord-gamecord. It has an interface that gives the options while you are setting up the games.
GAMECORD
Discord Gamecord is a powerful module that allows you to play games within Discord :)
⚙️ Installation
npm i dsc-game
✨ Features
- Super simple and easy to use.
- Beginner friendly.
- Easy to Implement.
- Supports Slash Commands.
📚 Usage
const { Snake } = require('discord-gamecord')
new Snake({
message: message,
slash_command: false,
embed: {
title: 'Snake Game',
color: '#5865F2',
overTitle: 'Game Over',
},
snake: { head: '🟢', body: '🟩', tail: '🟢' },
emojis: {
board: '⬛',
food: '🍎',
up: '⬆️',
right: '➡️',
down: '⬇️',
left: '⬅️',
},
}).startGame()
✏️ Example
Looking for Examples? click here: Examples!
const Discord = require('discord.js');
const client = new Discord.Client();
const { Snake } = require('discord-gamecord');
client.on('messageCreate', async (message) => {
if(message.content === '!snake') {
new Snake({
message: message,
slash_command: false,
embed: {
title: 'Snake Game',
color: '#5865F2',
OverTitle: 'Game Over',
},
snake: { head: '🟢', body: '🟩', tail: '🟢' },
emojis: {
board: '⬛',
food: '🍎',
up: '⬆️',
down: '⬇️',
right: '➡️',
left: '⬅️',
}
}).startGame();
}
});
client.login('YOUR_COOL_DISCORD_BOT_TOKEN');
Docs
For more information about the Games and how to use them, refer the Docs!