3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-25 18:25:03 +00:00

migrate permissions

Signed-off-by: GitHub <noreply@github.com>
This commit is contained in:
metal 2023-03-11 14:31:59 +00:00 committed by GitHub
parent 8281299369
commit fda9a35f29
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 75 additions and 70 deletions

View file

@ -1,4 +1,4 @@
import { ChannelType, GuildTextBasedChannel, Permissions, TextChannel, ThreadChannel, Util } from "discord.js";
import { ChannelType, GuildTextBasedChannel, PermissionsBitField, TextChannel, ThreadChannel, Util } from "discord.js";
import humanizeDuration from "humanize-duration";
import { commandTypeHelpers as ct } from "../../../commandTypes";
import { sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
@ -88,7 +88,7 @@ export const SlowmodeSetCmd = slowmodeCmd({
if (mode === "native") {
const missingPermissions = getMissingPermissions(
channelPermissions ?? new Permissions(),
channelPermissions ?? new PermissionsBitField(),
NATIVE_SLOWMODE_PERMISSIONS,
);
if (missingPermissions) {
@ -103,7 +103,7 @@ export const SlowmodeSetCmd = slowmodeCmd({
if (mode === "bot") {
const missingPermissions = getMissingPermissions(
channelPermissions ?? new Permissions(),
channelPermissions ?? new PermissionsBitField(),
BOT_SLOWMODE_PERMISSIONS,
);
if (missingPermissions) {