From 843275a3acdbeb1fa98ae438a829696fafc03a8e Mon Sep 17 00:00:00 2001 From: alyssa Date: Thu, 29 Aug 2024 04:12:26 +0900 Subject: [PATCH] fix(bot): check if user has a system registered in proxy checks --- PluralKit.Bot/Commands/Checks.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/PluralKit.Bot/Commands/Checks.cs b/PluralKit.Bot/Commands/Checks.cs index caf51d80..8d88177a 100644 --- a/PluralKit.Bot/Commands/Checks.cs +++ b/PluralKit.Bot/Commands/Checks.cs @@ -240,6 +240,12 @@ public class Checks var context = await ctx.Repository.GetMessageContext(msg.Author.Id, channel.GuildId.Value, rootChannel.Id, msg.ChannelId); var members = (await ctx.Repository.GetProxyMembers(msg.Author.Id, channel.GuildId.Value)).ToList(); + if (await ctx.Repository.GetSystemByAccount(msg.Author.Id) == null) + { + await ctx.Reply("Your account does not have a system registered."); + return; + } + // for now this is just server var autoproxySettings = await ctx.Repository.GetAutoproxySettings(ctx.System.Id, channel.GuildId.Value, null);