1.0.2 • Published 6 years ago

discord-paging v1.0.2

Weekly downloads
2
License
ISC
Repository
github
Last release
6 years ago

Light Discord Paging System

Links

Installation

npm install discord-paging

Example for simple guild list

const Discord = require("discord.js")
const Paging = require("discord-paging")
const client = new Discord.Client()

var book;

client.login("token")

client.on("ready", () => {

	// Array of embeds (src.map(=>embed))
	const embeds = client.guilds.map( (guild, index) => {
		const embed = new Discord.RichEmbed()
			.setTitle(guild.name)
			.setImage(guild.iconURL)
			.setFooter(
				`Page : ${index} / ${client.guilds.size}`,
				client.user.avatarURL
			)
		return embed
	})

	// Destination channel (TextChannel)
	const channel = client.channels.first()

	// Start system
	book |= new Paging( embeds, channel)

})
1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago