Code Monkey home page Code Monkey logo

discordeasypages's Introduction

NPM Info

❔ About

❔ About DiscordEasyPages

An effective and easy-to-use package for making discord.js button pages for Discord bots. Each page supplied must be a message embed. Inspired by Discord-pagnation.

Demo DiscordEasyPages in action!

📋 Information

❕ Required Programs and Dependencies

This package REQUIRES node.js. Without it, this package cannot run nor download. You'll also need the package Discord.js. When done, run npm install discordeasypages in your terminal. If you need help, view the example below.

❗ Example

Need help using my package? Simple! You must get your discord bot token for this to work.

// Librarys //
const Discord = require("discord.js")
const DiscordEasyPages = require("discordeasypages")

// Bot //
const Bot = new Discord.Client({
  partials: ["MESSAGE", "CHANNEL", "REACTION"],

  presence: {
    activity: {
      name: `Example bot for the package DiscordEasyPages!`,
      type: "PLAYING"
    },
    status: "online"
  }
})

const Prefix = "^"

// Code //
Bot.on("message", (message) => {
    if (message.author.bot) return

    if (!message.content.startsWith(Prefix)) return

    const Arguments = message.content
        .slice(Prefix.length)
        .trim()
        .split(/ +/g)
    const command = Arguments.shift()

    if (command.toLowerCase() == "page"){
        const Embed = new Discord.MessageEmbed()
            .setTitle("Page 1")
            .setDescription("Welcome to page 1!")

        const Embed2 = new Discord.MessageEmbed()
            .setTitle("Page 2")
            .setDescription("Welcome to page 2!")

        DiscordEasyPages(message, [Embed, Embed2])
    }
})

console.log("---------- Logging into Bot ----------") 
Bot.login("YourBotTokenFromDiscordDeveloperHubGoesHere")

⁉ Support

If you acquire help, we ask that you join KingCh1ll's Discord Server & open a ticket. If you don't have discord, you may open up a discussion in our github!

discordeasypages's People

Contributors

kingch1ll avatar dependabot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.