diff --git a/Commands/LockdownCmds.cs b/Commands/LockdownCmds.cs index fd3babe..051010a 100644 --- a/Commands/LockdownCmds.cs +++ b/Commands/LockdownCmds.cs @@ -82,11 +82,13 @@ await thread.ModifyAsync(a => try { await LockdownHelpers.LockChannelAsync(user: ctx.User, channel: currentChannel, duration: lockDuration, reason: reason, lockThreads: lockThreads); - await ctx.FollowupAsync(new DiscordFollowupMessageBuilder().WithContent("Channel locked successfully.").AsEphemeral(true)); + if (ctx is SlashCommandContext) + await ctx.FollowupAsync(new DiscordFollowupMessageBuilder().WithContent("Channel locked successfully.").AsEphemeral(true)); } catch (ArgumentException) { - await ctx.FollowupAsync(new DiscordFollowupMessageBuilder().WithContent("Failed to lock this channel!").AsEphemeral(true)); + if (ctx is SlashCommandContext) + await ctx.FollowupAsync(new DiscordFollowupMessageBuilder().WithContent("Failed to lock this channel!").AsEphemeral(true)); } } @@ -175,11 +177,13 @@ public class UnlockCmds try { await LockdownHelpers.UnlockChannel(currentChannel, ctx.Member); - await ctx.FollowupAsync(new DiscordFollowupMessageBuilder().WithContent("Channel locked successfully.").AsEphemeral(true)); + if (ctx is SlashCommandContext) + await ctx.FollowupAsync(new DiscordFollowupMessageBuilder().WithContent("Channel locked successfully.").AsEphemeral(true)); } catch (ArgumentException) { - await ctx.FollowupAsync(new DiscordFollowupMessageBuilder().WithContent("Failed to lock this channel!").AsEphemeral(true)); + if (ctx is SlashCommandContext) + await ctx.FollowupAsync(new DiscordFollowupMessageBuilder().WithContent("Failed to lock this channel!").AsEphemeral(true)); } }