mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-09 14:43:05 -04:00
user-related slash commands
This commit is contained in:
parent
fdff2960a3
commit
6456a68fbb
4 changed files with 213 additions and 0 deletions
31
commands/interaction/user/avatar.js
Normal file
31
commands/interaction/user/avatar.js
Normal 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)
|
||||
}
|
||||
},
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue