Skip to content

M3rcena/m3rcena-weky

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Weky

A fun npm package to play games within Discord with buttons!


Made with love in Greece Made with TypeScript
NPM version NPM downloads Get Started Now
npm install lavalink-client



Install

Latest stable Version: v10.0.0

πŸ‘‰ via NPM
npm install --save @m3rcena/weky

Documentation

Check out the Documentation

Used in:

Features

  • πŸ§‘ Beginner friendly

  • πŸŽ‰ Easy to use

  • πŸ”˜ Discord Buttons

  • πŸ€– Supports Discord.js v14

  • βœ‚ Fully Customizable

  • and much more!

Usage πŸ“š

πŸ‘‰ 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");

Result πŸ“€

Contributing 🀝

  • Contributions, issues and feature requests are welcome!
  • Feel free to check issues page

Support ❔

<iframe src="https://discord.com/widget?id=1224358764463783987&theme=dark" width="350" height="350" allowtransparency="true" frameborder="0" sandbox="allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts"></iframe>

Developers πŸ‘¨β€πŸ’»

Contributors