Merge branch 'v3.3.3' of https://git.vfsh.dev/voidf1sh/nodbot into v3.3.3
This commit is contained in:
commit
e4c389be71
28
CustomModules/Embeds.js
Normal file
28
CustomModules/Embeds.js
Normal file
@ -0,0 +1,28 @@
|
||||
module.exports = {
|
||||
gifSearchAR() {
|
||||
// Setup the buttons
|
||||
const previousButton = new MessageButton()
|
||||
.setCustomId('prevGif')
|
||||
.setLabel('⬅️')
|
||||
.setStyle('SECONDARY');
|
||||
|
||||
const confirmButton = new MessageButton()
|
||||
.setCustomId('confirmGif')
|
||||
.setLabel('✅')
|
||||
.setStyle('PRIMARY');
|
||||
|
||||
const nextButton = new MessageButton()
|
||||
.setCustomId('nextGif')
|
||||
.setLabel('➡️')
|
||||
.setStyle('SECONDARY');
|
||||
|
||||
const cancelButton = new MessageButton()
|
||||
.setCustomId('cancelGif')
|
||||
.setLabel('❌')
|
||||
.setStyle('DANGER');
|
||||
|
||||
// Put the buttons into an ActionRow
|
||||
return new MessageActionRow()
|
||||
.addComponents(previousButton, confirmButton, nextButton, cancelButton);
|
||||
}
|
||||
}
|
@ -11,6 +11,7 @@ const { MessageActionRow, MessageButton } = require('discord.js');
|
||||
const fn = require('../functions.js');
|
||||
const strings = require('../strings.json');
|
||||
const { GifData } = require('../CustomModules/NodBot.js');
|
||||
const customEmbeds = require('../CustomModules/Embeds.js');
|
||||
const { emoji } = strings;
|
||||
|
||||
module.exports = {
|
||||
@ -142,16 +143,7 @@ module.exports = {
|
||||
// GIF Search
|
||||
case "gifsearch":
|
||||
// TODO Check on option names
|
||||
// Previous GIF button
|
||||
const prevButton = new MessageButton().setCustomId('prevGif').setLabel('Previous GIF').setStyle('SECONDARY').setDisabled(true);
|
||||
// Confirm GIF Button
|
||||
const confirmButton = new MessageButton().setCustomId('confirmGif').setLabel('Confirm').setStyle('PRIMARY');
|
||||
// Next GIF Button
|
||||
const nextButton = new MessageButton().setCustomId('nextGif').setLabel('Next GIF').setStyle('SECONDARY');
|
||||
// Cancel Button
|
||||
const cancelButton = new MessageButton().setCustomId('cancelGif').setLabel('Cancel').setStyle('DANGER');
|
||||
// Put all the above into an ActionRow to be sent as a component of the reply
|
||||
const actionRow = new MessageActionRow().addComponents(prevButton, confirmButton, nextButton, cancelButton);
|
||||
const actionRow = customEmbeds.gifSearchAR();
|
||||
|
||||
// Get the query
|
||||
const query = interaction.options.getString('query');
|
||||
|
Loading…
Reference in New Issue
Block a user