mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-07 21:53:07 -04:00
disable ephemeral
This commit is contained in:
parent
9e44aceac8
commit
9b9fbd4956
1 changed files with 6 additions and 7 deletions
|
@ -1,5 +1,5 @@
|
||||||
const { Constants } = require('detritus-client');
|
const { Constants } = require('detritus-client');
|
||||||
const { InteractionCallbackTypes, ApplicationCommandTypes, MessageFlags } = Constants;
|
const { InteractionCallbackTypes, ApplicationCommandTypes } = Constants;
|
||||||
|
|
||||||
const { createEmbed } = require('../../../labscore/utils/embed')
|
const { createEmbed } = require('../../../labscore/utils/embed')
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ module.exports = {
|
||||||
type: ApplicationCommandTypes.MESSAGE,
|
type: ApplicationCommandTypes.MESSAGE,
|
||||||
run: async (context, args) => {
|
run: async (context, args) => {
|
||||||
try{
|
try{
|
||||||
await context.respond({data: { flags: MessageFlags.EPHEMERAL }, type: InteractionCallbackTypes.DEFERRED_CHANNEL_MESSAGE_WITH_SOURCE})
|
await context.respond({data: {}, type: InteractionCallbackTypes.DEFERRED_CHANNEL_MESSAGE_WITH_SOURCE})
|
||||||
|
|
||||||
const { message } = args;
|
const { message } = args;
|
||||||
|
|
||||||
|
@ -35,18 +35,17 @@ module.exports = {
|
||||||
text: `powered by song.link • ${context.application.name}`
|
text: `powered by song.link • ${context.application.name}`
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
], components: btns, flags: MessageFlags.EPHEMERAL })
|
], components: btns })
|
||||||
}catch(e){
|
}catch(e){
|
||||||
return context.editOrRespond({ embeds: [createEmbed("warning", context, "No results found.")], flags: MessageFlags.EPHEMERAL })
|
return context.editOrRespond({ embeds: [createEmbed("warning", context, "No results found.")] })
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return context.editOrRespond({ embeds: [createEmbed("warning", context, "No urls found.")], flags: MessageFlags.EPHEMERAL })
|
return context.editOrRespond({ embeds: [createEmbed("warning", context, "No urls found.")] })
|
||||||
}
|
}
|
||||||
}catch(e){
|
}catch(e){
|
||||||
console.log(e)
|
console.log(e)
|
||||||
await context.editOrRespond({
|
await context.editOrRespond({
|
||||||
embeds: [createEmbed("error", context, "Unable to look up song url.")],
|
embeds: [createEmbed("error", context, "Unable to look up song url.")]
|
||||||
flags: MessageFlags.EPHEMERAL
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue