This repository was archived by the owner on Apr 28, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathpaginator.js
More file actions
43 lines (41 loc) · 1.78 KB
/
paginator.js
File metadata and controls
43 lines (41 loc) · 1.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
const { ReactionCollector } = require('discord.js-collector')
const { Client, MessageEmbed } = require("discord.js");
const client = new Client();
client.on("ready", () => {
console.log("ready");
});
// Paginate embeds, util for music queue list, simple lists like warn-list and etc.
client.on("message", async (message) => {
if (message.content.startsWith('>help')) {
const botMessage = await message.reply('Need help? Here list with all my commands!');
ReactionCollector.paginator({
botMessage,
user: message.author,
pages: [
new MessageEmbed()
.setTitle('Moderation')
.addField('Kick', 'Kick one member from the server')
.addField('Ban', 'Ban one member from server')
.addField('Mute', 'Remove permissions from member to talk in chats while is muted')
.addField('Clear', 'Clear messages from text channel'),
new MessageEmbed()
.setTitle('Util')
.addField('Ping', 'Bot ping latency')
.addField('Botinfo', 'Ban one member from server')
.addField('Avatar', 'Show a user avatar'),
new MessageEmbed()
.setTitle('Economy')
.addField('Daily', 'Pick up daily reward')
.addField('Pay', 'Pay some amount to other user'),
new MessageEmbed()
.setTitle('Administration')
.addField('Autorole', 'Configure autorole in this server')
.addField('Prefix', 'Change bot prefix')
],
collectorOptions: {
time: 60000
}
});
}
});
client.login('Token');