A fun npm package to play games within Discord with buttons!
Latest stable Version: v10.0.0
π via NPM
npm install --save @m3rcena/weky
Check out the Documentation
-
π§ Beginner friendly
-
π Easy to use
-
π Discord Buttons
-
π€ Supports Discord.js v14
-
β Fully Customizable
-
and much more!
π CommonJS
const { Client, GatewayIntentBits } = require("discord.js");
const { WekyManager }= require("@m3rcena/weky");
const client = new Client({
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.MessageContent,
]
});
client.on("ready", async (cl) => {
console.log("Bot is ready");
client.wekyManager = new WekyManager(cl); // Initialize Weky Manager
});
client.on("messageCreate", async (message) => {
if (message.author.bot) return;
if (message.content === "w!calculator") {
client.wekyManager.createCalculator({
interaction: message,
client: client,
embed: {
color: "Blurple",
title: "Calculator | M3rcena Development",
timestamp: new Date(),
}
})
};
});
client.login('Your bot Token');
π ESM (Module)
import { Client, GatewayIntentBits } from "discord.js";
import { WekyManager } from "@m3rcena/weky";
export interface ExtendedClient extends Client {
wekyManager: WekyManager;
};
const client = new Client({
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.MessageContent,
]
}) as ExtendedClient;
client.on("ready", async (cl) => {
console.log("Bot is ready");
client.wekyManager = new WekyManager(cl); // Initialize Weky Manager
});
client.on("messageCreate", async (message) => {
if (message.author.bot) return;
if (message.content === "w!calculator") {
client.wekyManager.createCalculator({
interaction: message,
client: client,
embed: {
color: "Blurple",
title: "Calculator | M3rcena Development",
}
})
};
});
client.login("Your bot token");
- Contributions, issues and feature requests are welcome!
- Feel free to check issues page