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:
parent
8281299369
commit
fda9a35f29
23 changed files with 75 additions and 70 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue