-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshards.js
36 lines (29 loc) · 1.25 KB
/
shards.js
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
const { DiscordMenus, ButtonBuilder, MenuBuilder } = require('discord-menus');
const { Client, MessageEmbed } = require('discord.js');
const client = new Client();
const MenusManager = new DiscordMenus(client);
const myCoolMenu = new MenuBuilder()
.addLabel('NPM', { description: 'Get npm package link', value: 'Comming-Soon'})
.addLabel('Github', { description: 'Get link of github.', value: 'https://github.com/dawgcodes'})
.addLabel('Server', { description: 'Get link of bot server.', value: 'https://discord.gg/evGhPdRJWH' })
.addLabel('Developers', {
description: 'See owners name', value: 'twodawg', emoji: {
name: '🎮'
}
})
.setMaxValues(1)
.setMinValues(1)
.setCustomID('cool-custom-id')
.setPlaceHolder('Choose a option');
client.on('message', async (message) => {
if (message.content === '?links') {
await MenusManager.sendMenu(message, new MessageEmbed().setDescription(`**${message.author.username}** Which link do you want?`), { menu: myCoolMenu }).then(msg => {
console.log(msg.id);
})
}
});
MenusManager.on('MENU_CLICKED', (menu) => {
menu.reply(`${menu.values}`)
console.log(menu.values);
});
client.login(process.env.TOKEN);