This package has been deprecated

Author message:

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

mod-utils.js

1.0.1 • Public • Published

mod-utils.js

An simple package that will help your moderation systsm more advanced.


Basic Example

ConfirmButtons

// Define the module
const { confirmButtons } = require("mod-utils.js");
const { EmbedBuilder, ButtonStyle } = require("discord.js")
await interaction.deferReply();

const embed = new EmbedBuilder()
.setTitle("OH HI")
.setDescription("hmmmm")
.setColor("#303136")

confirmButtons(interaction, {
            embed: embed,
            authorOnly: `Only <@${interaction.member.id}> can use these buttons`,
            yes: {
                style: ButtonStyle.Primary,
                label: "Yes",
                emoji: "✔️",
            },
            no: {
                style: ButtonStyle.Secondary,
                label: "No",
                emoji: "🛑",
            },
        }).then(async (confirm) => {
            if (confirm === "yes") {
                interaction.editReply({
                    content: `Content to show when pressed yes`,
                });
            if (confirm === "no") {
                interaction.editReply({
                    content: `Content to show when pressed no`,
                });
            }
            if (confirm === "time") {
                interaction.editReply({
                    content: `Time up content`,
                });
            }
        });

more examples should be added soon....

Package Sidebar

Install

npm i mod-utils.js

Weekly Downloads

0

Version

1.0.1

License

SEE LICENSE IN mod-utils.js/package.json

Unpacked Size

7.88 kB

Total Files

4

Last publish

Collaborators

  • einzi