user-related slash commands

This commit is contained in:
derpystuff 2024-04-16 23:33:46 +02:00
parent fdff2960a3
commit 6456a68fbb
4 changed files with 213 additions and 0 deletions

View file

@ -0,0 +1,31 @@
const { Constants } = require('detritus-client');
const { InteractionCallbackTypes, ApplicationCommandTypes } = Constants;
const { createEmbed } = require('../../../labscore/utils/embed');
const { editOrReply } = require('../../../labscore/utils/message');
module.exports = {
name: 'Get User Avatar',
type: ApplicationCommandTypes.USER,
contexts: [
0,
1,
2
],
integrationTypes: [
1
],
run: async (context, args) => {
try{
await context.respond({ data: {}, type: InteractionCallbackTypes.DEFERRED_CHANNEL_MESSAGE_WITH_SOURCE })
return editOrReply(context, createEmbed("default", context, {
image: {
url: args.user.avatarUrl + '?size=4096'
}
}))
}catch(e){
console.log(e)
}
},
};