|
|
|
@ -1,6 +1,6 @@
|
|
|
|
|
const path = require('path');
|
|
|
|
|
const find = require('findit');
|
|
|
|
|
const {Client,ClientOptions,GatewayIntentBits,Message, Partials, ActivityType,EmbedBuilder, ActionRowBuilder, ButtonBuilder, ButtonStyle} = require('discord.js')
|
|
|
|
|
const {Client,ClientOptions,GatewayIntentBits,Message, Partials, ActivityType,EmbedBuilder, ActionRowBuilder, ButtonBuilder, ButtonStyle, PermissionsBitField, PermissionFlagsBits } = require('discord.js')
|
|
|
|
|
const roleRulesM = require('./models/autoRoleRule');
|
|
|
|
|
const feedM = require('./models/feeds');
|
|
|
|
|
const xmlparser = require('xml-js')
|
|
|
|
@ -16,6 +16,8 @@ module.exports.ActionRowBuilder = ActionRowBuilder;
|
|
|
|
|
module.exports.ButtonBuilder = ButtonBuilder;
|
|
|
|
|
module.exports.ButtonStyle = ButtonStyle;
|
|
|
|
|
module.exports.Message = Message;
|
|
|
|
|
module.exports.PermissionsBitField = PermissionsBitField;
|
|
|
|
|
module.exports.PermissionFlagsBits = PermissionFlagsBits;
|
|
|
|
|
|
|
|
|
|
//@ts-check
|
|
|
|
|
class CommandOptions
|
|
|
|
@ -198,7 +200,7 @@ class _Client extends Client
|
|
|
|
|
let isAdmin =false;
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
isAdmin = this.guilds.cache.get(message.guild.id).members.cache.get(message.author.id).permissions.has('ADMINISTRATOR');
|
|
|
|
|
isAdmin = this.guilds.cache.get(message.guild.id).members.cache.get(message.author.id).permissions.has(PermissionFlagsBits.Administrator);
|
|
|
|
|
} catch (error)
|
|
|
|
|
{
|
|
|
|
|
console.log('Lib: Command: Permission Verification: Failed')
|
|
|
|
|