This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

@nottca/weky
TypeScript icon, indicating that this package has built-in type declarations

4.0.5 • Public • Published

Weky


What is weky?

  • A fun npm package to play games within Discord with buttons!
  • Looking for examples? Click here!

Features

  • 🧑 Beginner friendly
  • 🎉 Easy to use
  • Simple
  • 🔘 Discord Buttons
  • 🤖 Supports Discord.js v12, v13, and v14!
  • and much more!

Install the package 📥

npm install @nottca/weky

Usage 📚

const { Calculator } = require("@nottca/weky");
await Calculator({
  message: message,
  embed: {
    title: "Calculator | Weky Development",
    color: "#5865F2",
    footer: "©️ Weky Development",
    timestamp: true,
  },
  disabledQuery: "Calculator is disabled!",
  invalidQuery: "The provided equation is invalid!",
  othersMessage: "Only <@{{author}}> can use the buttons!",
});

Example ✏️

Discord.js v12

const Discord = require("discord.js");
require("@weky/inlinereply");
const client = new Discord.Client();
const disbut = require("discord-buttons");
const { Calculator } = require("@nottca/weky");
disbut(client);

client.on("ready", async () => {
  console.log(`Logged in as ${client.user.tag}`);
});

client.on("message", async (message) => {
  if (message.content === "!calculator") {
    await Calculator({
      message: message,
      embed: {
        title: "Calculator | Weky Development",
        color: "#5865F2",
        footer: "©️ Weky Development",
        timestamp: true,
      },
      disabledQuery: "Calculator is disabled!",
      invalidQuery: "The provided equation is invalid!",
      othersMessage: "Only <@{{author}}> can use the buttons!",
    });
  }
});

client.login("DISCORD_BOT_TOKEN");

Discord.js v13

const Discord = require("discord.js");
const client = new Discord.Client({
  intents: ["GUILDS", "GUILD_MESSAGES"],
});
const { Calculator } = require("@nottca/weky");

client.on("ready", async () => {
  console.log(`Logged in as ${client.user.tag}`);
});

client.on("messageCreate", async (message) => {
  if (message.content === "!calculator") {
    await Calculator({
      message: message,
      embed: {
        title: "Calculator | Weky Development",
        color: "#5865F2",
        footer: "©️ Weky Development",
        timestamp: true,
      },
      disabledQuery: "Calculator is disabled!",
      invalidQuery: "The provided equation is invalid!",
      othersMessage: "Only <@{{author}}> can use the buttons!",
    });
  }
});

client.login("DISCORD_BOT_TOKEN");

Discord.js v14

const Discord = require("discord.js");
const client = new Discord.Client({
  intents: ["Guilds", "GuildMessages", "MessageContent"],
});
const { Calculator } = require("@nottca/weky");

client.on("ready", async () => {
  console.log(`Logged in as ${client.user.tag}`);
});

client.on("messageCreate", async (message) => {
  if (message.content === "!calculator") {
    await Calculator({
      message: message,
      embed: {
        title: "Calculator | Weky Development",
        color: "#5865F2",
        footer: "©️ Weky Development",
        timestamp: true,
      },
      disabledQuery: "Calculator is disabled!",
      invalidQuery: "The provided equation is invalid!",
      othersMessage: "Only <@{{author}}> can use the buttons!",
    });
  }
});

client.login("DISCORD_BOT_TOKEN");

Result 📤

Contributing 🤝

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

Developers 👨‍💻

Support

Readme

Keywords

Package Sidebar

Install

npm i @nottca/weky

Weekly Downloads

2

Version

4.0.5

License

CC BY-NC-ND 4.0

Unpacked Size

766 kB

Total Files

97

Last publish

Collaborators

  • nottca