Skip to content

Commit

Permalink
Add some additional migration changes for new code
Browse files Browse the repository at this point in the history
  • Loading branch information
Erisa committed Jun 24, 2024
1 parent 1366645 commit 52a9271
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Commands/InteractionCommands/SecurityActionInteractions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down Expand Up @@ -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?
Expand Down
2 changes: 1 addition & 1 deletion Events/ChannelEvents.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 52a9271

Please sign in to comment.