1.0.3 • Published 2 years ago

@sharkdjokovic/theocean v1.0.3

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

Features:

𓂃 ៸៸ Simple for beginners 𓂃 ៸៸ Easy to use 𓂃 ៸៸ Implments Discord v13

Install the package:

npm install @sharkdjokovic/theocean

Usage:

const {
    Client,
    MessageEmbed
} = require("discord.js")

const {
    MessagePagination
} = require("@sharkdjokovic/theocean") //Calls for the package.

const client = new Client({
    intents: 32767,
    partials: ['MESSAGE', 'CHANNEL', 'REACTION']
}); //Creates a new client.

client.on("messageCreate", (message) => {
    if (message.content === "pagination") {
        let sampleEmbed1 = new MessageEmbed() //Creates an embed.
            .setTitle(`1`)
        let sampleEmbed2 = new MessageEmbed() //Creates an embed.
            .setTitle('2')

        const pagination = new MessagePagination({ //Starts the pagination.
            message,
            time: 300000,
            author: message.author,
            channel: message.channel,
            embeds: [sampleEmbed1, sampleEmbed2],
            replyOptions: {
                mention: true,
                message,
            },
            content: 'Hello!',
            fastSkip: true,
            pageTravel: true, //Newest feature.
            resetTimerOnClick: true
        });
        //Automatically sends the paginated embeds.
    }
});

client.login(process.env["TOKEN"]);