Neodymium Plated Magnet

    utilsfordiscordjs

    1.1.8 • Public • Published

    Utils for Discord

    🛠️ Handy utilities for Discord bots.


    📃 Table of Contents

    Features

    • 📦 No third-party libraries
    • 📥 Easy to install & use
    • 🛠️ Utilities that make sense

    Installation

    npm install utilsfordiscord

    or

    yarn add utilsfordiscord

    Examples

    Pages

    Pages You can also have custom buttons

    Note This codeblock has been shortened.

    new Utils.Pages()
        .setEmbeds([
            new Discord.EmbedBuilder()
            .setTitle("Embed 1")
            .setDescription("This is an embed page you can put anything you want on it!"),
            new Discord.EmbedBuilder()
            .setTitle("Embed 2")
            .setDescription("Pages also supports Discord.js v14!")
        ])
        .setComponents([
            new Discord.ButtonBuilder()
            .setLabel("Custom Button")
            .setStyle(ButtonStyle.Success)
            .setCustomId("custom-button"),
            new Discord.ButtonBuilder()
            .setLabel("Learn More")
            .setStyle(ButtonStyle.Link)
            .setURL("https://npm.im/utilsfordiscordjs")
        ])
        .setEventListener(i => i.reply("You clicked a custom button!"))
        .send(i, {
            disableCustomButtons: false
        });

    Roadmap

    • 📦 In progress - Add more utilities

    Changelog

    Note Format: Fixes -> Additions -> Updates -> Removals

    11/11/2022

    • Fix bug data.components[1].components[BASE_TYPE_REQUIRED]: This field is required
    • Remove all //@ts-expect-error

    6/24/2022

    • Add support for custom components
    • Add custom component events listeners

    6/20/2022

    • Added Pages class
    • Add tests
    • Add base stuff

    Install

    npm i utilsfordiscordjs

    DownloadsWeekly Downloads

    30

    Version

    1.1.8

    License

    MIT

    Unpacked Size

    263 kB

    Total Files

    24

    Last publish

    Collaborators

    • turtlepaw