Don't cache empty close reasons
This commit is contained in:
parent
ff2a9e54e4
commit
df2f2e63c9
1 changed files with 9 additions and 6 deletions
|
@ -46,6 +46,8 @@ public class CloseCommand
|
|||
|
||||
await command.RespondAsync(confirmation);
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(reason))
|
||||
{
|
||||
if (closeReasons.TryGetValue(command.Channel.Id, out _))
|
||||
{
|
||||
closeReasons[command.Channel.Id] = reason;
|
||||
|
@ -55,6 +57,7 @@ public class CloseCommand
|
|||
closeReasons.Add(command.Channel.Id, reason);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static async Task OnConfirmed(DiscordInteraction interaction)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue