mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-07 21:53:07 -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
|
@ -2,6 +2,9 @@ const { createEmbed } = require('#utils/embed');
|
|||
const { editOrReply } = require('#utils/message');
|
||||
const { getUserAvatar } = require('#utils/users');
|
||||
|
||||
const { PERMISSION_GROUPS } = require('#constants');
|
||||
const { acknowledge } = require('#utils/interactions');
|
||||
|
||||
const { InteractionCallbackTypes, ApplicationCommandTypes } = require('detritus-client/lib/constants');
|
||||
|
||||
module.exports = {
|
||||
|
@ -16,9 +19,9 @@ module.exports = {
|
|||
1
|
||||
],
|
||||
run: async (context, args) => {
|
||||
try{
|
||||
await context.respond({ data: {}, type: InteractionCallbackTypes.DEFERRED_CHANNEL_MESSAGE_WITH_SOURCE })
|
||||
await acknowledge(context, false, [...PERMISSION_GROUPS.baseline_slash]);
|
||||
|
||||
try{
|
||||
return editOrReply(context, createEmbed("default", context, {
|
||||
image: {
|
||||
url: getUserAvatar(args.user)
|
||||
|
|
|
@ -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."));
|
||||
|
|
|
@ -5,6 +5,9 @@ const { smallIconPill, highlight, smallPill, icon, timestamp } = require('#utils
|
|||
const { editOrReply } = require('#utils/message');
|
||||
const { renderBadges, getUserAvatar } = require('#utils/users');
|
||||
|
||||
const { PERMISSION_GROUPS } = require('#constants');
|
||||
const { acknowledge } = require('#utils/interactions');
|
||||
|
||||
const { InteractionCallbackTypes, ApplicationCommandTypes, UserFlags } = require('detritus-client/lib/constants');
|
||||
|
||||
module.exports = {
|
||||
|
@ -20,7 +23,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]);
|
||||
|
||||
const { user, member } = args;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue