diff --git a/Commands/InteractionCommands/AnnouncementInteractions.cs b/Commands/InteractionCommands/AnnouncementInteractions.cs index 7c97a73c..4d77b21f 100644 --- a/Commands/InteractionCommands/AnnouncementInteractions.cs +++ b/Commands/InteractionCommands/AnnouncementInteractions.cs @@ -34,9 +34,9 @@ public async Task AnnounceBuildSlashCommand(InteractionContext ctx, [Option("lockdown", "Set 0 to not lock. Lock the channel for a certain period of time after announcing the build.")] string lockdownTime = "auto" ) { - if (Program.cfgjson.InsiderCommandLockedToChannel != 0 && ctx.Channel.Id != Program.cfgjson.InsiderCommandLockedToChannel) + if (Program.cfgjson.InsidersChannel != 0 && ctx.Channel.Id != Program.cfgjson.InsidersChannel) { - await ctx.RespondAsync($"{Program.cfgjson.Emoji.Error} This command only works in <#{Program.cfgjson.InsiderCommandLockedToChannel}>!", ephemeral: true); + await ctx.RespondAsync($"{Program.cfgjson.Emoji.Error} This command only works in <#{Program.cfgjson.InsidersChannel}>!", ephemeral: true); return; } diff --git a/Structs.cs b/Structs.cs index 16989aed..a32c7993 100644 --- a/Structs.cs +++ b/Structs.cs @@ -269,11 +269,16 @@ public class ConfigJson [JsonProperty("insiderAnnouncementChannel")] public ulong InsiderAnnouncementChannel { get; private set; } = 0; + private ulong insidersChannel; [JsonProperty("insidersChannel")] - public ulong InsidersChannel { get; private set; } + public ulong InsidersChannel + { + get => insidersChannel == 0 ? InsiderCommandLockedToChannel : insidersChannel; + private set => insidersChannel = value; + } [JsonProperty("insiderCommandLockedToChannel")] - public ulong InsiderCommandLockedToChannel { get; private set; } = 0; + private ulong InsiderCommandLockedToChannel { get; set; } = 0; [JsonProperty("dmAutoresponseTimeLimit")] public int DmAutoresponseTimeLimit { get; private set; } = 0; diff --git a/config.json b/config.json index 65068981..660dd1a9 100644 --- a/config.json +++ b/config.json @@ -318,7 +318,6 @@ "insiderAnnouncementChannel": 1043898319883219004, "insiderInfoChannel": 1279201622651572317, "insidersChannel": 187649467611086849, - "insiderCommandLockedToChannel": 187649467611086849, "dmAutoresponseTimeLimit": 6, "autoDeleteEmptyThreads": true, "insiderCanaryThread": 1082394217168523315,