mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-14 09:03:04 -04:00
fix permissions for user ctx
This commit is contained in:
parent
2b9904788a
commit
a68f5ab3e7
3 changed files with 13 additions and 4 deletions
|
@ -1,6 +1,9 @@
|
|||
const { createEmbed } = require('#utils/embed');
|
||||
const { editOrReply } = require('#utils/message');
|
||||
|
||||
const { PERMISSION_GROUPS } = require('#constants');
|
||||
const { acknowledge } = require('#utils/interactions');
|
||||
|
||||
const { InteractionCallbackTypes, ApplicationCommandTypes } = require('detritus-client/lib/constants');
|
||||
|
||||
module.exports = {
|
||||
|
@ -16,7 +19,7 @@ module.exports = {
|
|||
],
|
||||
run: async (context, args) => {
|
||||
try{
|
||||
await context.respond({ data: {}, type: InteractionCallbackTypes.DEFERRED_CHANNEL_MESSAGE_WITH_SOURCE })
|
||||
await acknowledge(context, false, [...PERMISSION_GROUPS.baseline_slash]);
|
||||
|
||||
let u = await context.client.rest.fetchUser(args.user.id);
|
||||
if(!u.bannerUrl) return editOrReply(context, createEmbed("warning", context, "User doesn't have a banner set."));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue