fix(bot): correct error for pk;debug proxy pointing to a DM channel message
This commit is contained in:
parent
de9cae0cbd
commit
74d621455a
@ -230,6 +230,9 @@ public class Checks
|
|||||||
if (channel == null)
|
if (channel == null)
|
||||||
throw new PKError("Unable to get the channel associated with this message.");
|
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
|
// 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 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();
|
var members = (await ctx.Repository.GetProxyMembers(msg.Author.Id, channel.GuildId.Value)).ToList();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user