forked from Galactic/galactic-bot
delete method & cleanup
This commit is contained in:
parent
bfd1c8f1a6
commit
ba81db17f9
@ -69,25 +69,6 @@ class InteractionWrapper {
|
||||
return this.interaction.editReply(options);
|
||||
}
|
||||
|
||||
// async promptInteraction(opts = {}, time = 30) {
|
||||
// if (!opts.components) throw new Error('Missing components. Use promptMessage');
|
||||
// let message = null;
|
||||
// if (this.replied || this.deferred) message = await this.editReply(opts);
|
||||
// else message = await this.reply(opts);
|
||||
|
||||
// return new Promise((resolve) => {
|
||||
// message.createMessageComponentCollector({
|
||||
// time: time*1000,
|
||||
// componentType: opts.componentType || 'BUTTON',
|
||||
// max: 1,
|
||||
// filter: (i) => i.user.id === this.user.id
|
||||
// }).on('collect', resolve)
|
||||
// .on('end', (collected) => {
|
||||
// if (!collected.size) resolve(null);
|
||||
// });
|
||||
// });
|
||||
// }
|
||||
|
||||
replyEmbed(embed) {
|
||||
if (!embed.color) embed.color = EmbedDefaultColor;
|
||||
return this.reply({ embeds: [embed] });
|
||||
@ -110,6 +91,10 @@ class InteractionWrapper {
|
||||
return this.interaction.deleteReply();
|
||||
}
|
||||
|
||||
delete() {
|
||||
return this.interaction.delete();
|
||||
}
|
||||
|
||||
update(...args) {
|
||||
return this.interaction.update(...args);
|
||||
}
|
||||
|
@ -98,6 +98,10 @@ class InvokerWrapper {
|
||||
return this.target.deleteReply();
|
||||
}
|
||||
|
||||
delete() {
|
||||
return this.target.delete();
|
||||
}
|
||||
|
||||
async promptMessage(str, opts = {}) {
|
||||
|
||||
if (str instanceof Object) {
|
||||
|
@ -99,6 +99,10 @@ class MessageWrapper {
|
||||
// throw new Error('Message not replied to');
|
||||
}
|
||||
|
||||
delete() {
|
||||
return this.message.delete();
|
||||
}
|
||||
|
||||
awaitReactions(...opts) {
|
||||
return this.message.awaitReactions(...opts);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user