diff --git a/PluralKit.Bot/Commands/Checks.cs b/PluralKit.Bot/Commands/Checks.cs index 0dd86fbd..362e6aca 100644 --- a/PluralKit.Bot/Commands/Checks.cs +++ b/PluralKit.Bot/Commands/Checks.cs @@ -230,6 +230,9 @@ public class Checks if (channel == null) throw new PKError("Unable to get the channel associated with this message."); + if (channel.GuildId == null) + throw new PKError("PluralKit is not able to proxy messages in DMs."); + // using channel.GuildId here since _rest.GetMessage() doesn't return the GuildId var context = await ctx.Repository.GetMessageContext(msg.Author.Id, channel.GuildId.Value, msg.ChannelId); var members = (await ctx.Repository.GetProxyMembers(msg.Author.Id, channel.GuildId.Value)).ToList();