klaymon
v3.3.1
Published
A fun npm package to play games, have fun, and use some cool functions for Discord.js
Downloads
18
Readme
What is klaymon?
- A fun npm package to play games, have fun, and use some cool functions for Discord.js
- You can find examples here: Examples
Features
- 🧑 Beginner friendly
- 🎉 Easy to use
- 🔘 Discord Buttons
- 🤖 Supports Discord.js V13
Install the package 📥
npm install klaymon
Or
yarn add klaymon
Usage 📚
const { TicTacToe } = require("klaymon");
const opponent = message.mentions.users.first();
if (!opponent) return message.reply(`You must tag a user!`);
await TicTacToe({
message: message, // Message Parameter
opponent: opponent, // Opponent Parameter
xColor: 'DANGER', // X Buttons color / DEFAULT: DANGER
oColor: 'SUCCESS', // O Buttons color / DEFAULT: SUCCESS
xEmoji: '❌', // X Emoji // DEFAULT ❌
oEmoji: '⭕', // O Emoji // DEFAULT ⭕
embed: {
color: "BLACK" // Embed color / DEFAULT RANDOM
},
fightBot: "YOU CANT FIGHT A BOT!", // If the user tries to fight a bot / DEFAULT: "Awww, You can't fight a bot!"
fightEmoji: "<:taskete:898896594953469952>" // Emoji in the embed / DEFAULT: 🎮
})
});
Example For Discord.js v13.2.0
const Discord = require('discord.js');
const client = new Discord.Client({
intents: 32767,
});
const { TicTacToe } = require('klaymon');
client.on('ready', async () => {
console.log(`${client.user.tag} is now online!`);
});
client.on('messageCreate', async (message) => {
if (message.content === '$ttt') {
const opponent = message.mentions.users.first();
if (!opponent) return message.reply(`You must tag a user!`);
await TicTacToe({
message: message, // Message Parameter
opponent: opponent, // Opponent Parameter
xColor: 'DANGER', // X Buttons color / DEFAULT: DANGER
oColor: 'SUCCESS', // O Buttons color / DEFAULT: SUCCESS
xEmoji: '❌', // X Emoji // DEFAULT ❌
oEmoji: '⭕', // O Emoji // DEFAULT ⭕
embed: {
color: "BLACK" // Embed color / DEFAULT RANDOM
},
fightBot: "YOU CANT FIGHT A BOT!", // If the user tries to fight a bot / DEFAULT: "Awww, You can't fight a bot!"
fightEmoji: "<:taskete:898896594953469952>" // Emoji in the embed / DEFAULT: 🎮
})
}
});
client.login('DISCORD_BOT_TOKEN');
Result 📤
Contributing 🤝
- Contributions, issues and feature requests are welcome!
- Feel free to check issues page.