From 52a92714fb384cef17b22e177ca2ee333bb89db6 Mon Sep 17 00:00:00 2001 From: Erisa A Date: Mon, 24 Jun 2024 23:20:12 +0100 Subject: [PATCH] Add some additional migration changes for new code --- Commands/InteractionCommands/SecurityActionInteractions.cs | 4 ++-- Events/ChannelEvents.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Commands/InteractionCommands/SecurityActionInteractions.cs b/Commands/InteractionCommands/SecurityActionInteractions.cs index e9d60605..3cfcf598 100644 --- a/Commands/InteractionCommands/SecurityActionInteractions.cs +++ b/Commands/InteractionCommands/SecurityActionInteractions.cs @@ -3,7 +3,7 @@ namespace Cliptok.Commands.InteractionCommands public class SecurityActionInteractions : ApplicationCommandModule { [SlashCommand("pausedms", "Temporarily pause DMs between server members.", defaultPermission: false)] - [HomeServer, SlashRequireHomeserverPerm(ServerPermLevel.Moderator), SlashCommandPermissions(Permissions.ModerateMembers)] + [HomeServer, SlashRequireHomeserverPerm(ServerPermLevel.Moderator), SlashCommandPermissions(DiscordPermissions.ModerateMembers)] public async Task SlashPauseDMs(InteractionContext ctx, [Option("time", "The amount of time to pause DMs for. Cannot be greater than 24 hours.")] string time) { // need to make our own api calls because D#+ can't do this natively? @@ -51,7 +51,7 @@ public async Task SlashPauseDMs(InteractionContext ctx, [Option("time", "The amo } [SlashCommand("unpausedms", "Unpause DMs between server members.", defaultPermission: false)] - [HomeServer, SlashRequireHomeserverPerm(ServerPermLevel.Moderator), SlashCommandPermissions(Permissions.ModerateMembers)] + [HomeServer, SlashRequireHomeserverPerm(ServerPermLevel.Moderator), SlashCommandPermissions(DiscordPermissions.ModerateMembers)] public async Task SlashUnpauseDMs(InteractionContext ctx) { // need to make our own api calls because D#+ can't do this natively? diff --git a/Events/ChannelEvents.cs b/Events/ChannelEvents.cs index 02aac154..091a7a8d 100644 --- a/Events/ChannelEvents.cs +++ b/Events/ChannelEvents.cs @@ -37,7 +37,7 @@ public static async Task ChannelUpdated(DiscordClient _, ChannelUpdatedEventArgs // Try to fetch member. If it fails, they are not in the guild. If this is a voice channel, remove the override. // (if they are not in the guild & this is not a voice channel, skip; otherwise, code below handles removal) - if (!e.Guild.Members.ContainsKey((ulong)userOverwrites.Name) && e.ChannelAfter.Type != ChannelType.Voice) + if (!e.Guild.Members.ContainsKey((ulong)userOverwrites.Name) && e.ChannelAfter.Type != DiscordChannelType.Voice) continue; // User could be fetched, so they are in the server and their override was removed. Remove from db.