mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-21 12:27:03 -04:00
pride 2024
This commit is contained in:
parent
561cecdfdc
commit
de373c55e7
5 changed files with 58 additions and 10 deletions
46
commands/interaction/user/pride.js
Normal file
46
commands/interaction/user/pride.js
Normal file
|
@ -0,0 +1,46 @@
|
|||
const { prideborder } = require("../../../labscore/api");
|
||||
const { createEmbed } = require("../../../labscore/utils/embed");
|
||||
const { editOrReply } = require("../../../labscore/utils/message");
|
||||
|
||||
const { Constants } = require('detritus-client');
|
||||
const { InteractionCallbackTypes, ApplicationCommandTypes } = Constants;
|
||||
|
||||
module.exports = {
|
||||
name: 'Create Pride 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 })
|
||||
|
||||
try{
|
||||
let pride = await prideborder(context, args.user.avatarUrl + '?size=512')
|
||||
|
||||
return editOrReply(context, {
|
||||
embeds: [createEmbed("image", context, {
|
||||
url: "pride.png"
|
||||
})],
|
||||
files: [{ filename: "pride.png", value: pride.response.body }]
|
||||
})
|
||||
}catch(e){
|
||||
console.log(e)
|
||||
return editOrReply(context, createEmbed("error", context, "Unable to generate overlay."))
|
||||
}
|
||||
|
||||
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