Added a button to cancel the search

master
masterhc 1 year ago
parent 5937cbbeab
commit e794d7870f

@ -36,6 +36,12 @@ class anime extends Command{
.setStyle(ButtonStyle.Success)
);
}
row.addComponents(
new ButtonBuilder()
.setCustomId(randomID+4)
.setLabel('Cancel')
.setStyle(ButtonStyle.Danger)
)
embed.setTitle(`First ${data.length>=4?'4':(data.length + ' and only')} result${data.length>1?'s':''} of search:`)
.setAuthor({name:"Rem-chan", iconURL:"https://i.imgur.com/g6FSNhL.png",url:'https://rem.wordfights.com/addtodiscord'})
.setColor(0x003284)
@ -50,7 +56,7 @@ class anime extends Command{
{
message.delete();
m.message.delete();
sendMessage(data[m.customId[m.customId.length-1]].id);
if(m.customId[m.customId.length-1]!=4) sendMessage(data[m.customId[m.customId.length-1]].id);
});
/**
* @param {Number} id

@ -34,6 +34,12 @@ class char extends Command{
.setStyle(ButtonStyle.Success)
);
}
row.addComponents(
new ButtonBuilder()
.setCustomId(randomID+4)
.setLabel('Cancel')
.setStyle(ButtonStyle.Danger)
)
embed.setTitle(`First ${data.length>=4?'4':(data.length + ' and only')} result${data.length>1?'s':''} of search:`)
.setAuthor({name:"Rem-chan", iconURL:"https://i.imgur.com/g6FSNhL.png",url:'https://rem.wordfights.com/addtodiscord'})
.setColor(0x003284)
@ -51,7 +57,7 @@ class char extends Command{
{
message.delete();
m.message.delete();
sendMessage(data[m.customId[m.customId.length-1]].id);
if(m.customId[m.customId.length-1]!=4) sendMessage(data[m.customId[m.customId.length-1]].id);
});
/**
* @param {Number} id

@ -35,7 +35,12 @@ class manga extends Command{
.setStyle(ButtonStyle.Success)
);
}
row.addComponents(
new ButtonBuilder()
.setCustomId(randomID+4)
.setLabel('Cancel')
.setStyle(ButtonStyle.Danger)
)
embed.setTitle(`First ${data.length>=4?'4':(data.length + ' and only')} result${data.length>1?'s':''} of search:`)
.setAuthor({name:"Rem-chan", iconURL:"https://i.imgur.com/g6FSNhL.png",url:'https://rem.wordfights.com/addtodiscord'})
.setColor(0x003284)
@ -53,7 +58,7 @@ class manga extends Command{
{
message.delete();
m.message.delete();
sendMessage(data[m.customId[m.customId.length-1]].id);
if(m.customId[m.customId.length-1]!=4) sendMessage(data[m.customId[m.customId.length-1]].id);
});
/**
* @param {Number} id

Loading…
Cancel
Save