mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-12 00:30:11 +00:00
fix(bot): only allow proxying in known-supported channel types
This is so that new channel types added by Discord (that may or may not support the features we need for proxying to work) don't throw piles of error codes at users when they try to proxy.
This commit is contained in:
parent
a0fa03599b
commit
6b14c50f09
4 changed files with 44 additions and 10 deletions
|
|
@ -248,10 +248,10 @@ public class Checks
|
|||
// Run everything through the checks, catch the ProxyCheckFailedException, and reply with the error message.
|
||||
try
|
||||
{
|
||||
_proxy.ShouldProxy(channel, msg, context);
|
||||
_proxy.ShouldProxy(channel, rootChannel, msg, context);
|
||||
_matcher.TryMatch(context, autoproxySettings, members, out var match, msg.Content, msg.Attachments.Length > 0, true, ctx.Config.CaseSensitiveProxyTags);
|
||||
|
||||
var canProxy = await _proxy.CanProxy(channel, msg, context);
|
||||
var canProxy = await _proxy.CanProxy(channel, rootChannel, msg, context);
|
||||
if (canProxy != null)
|
||||
{
|
||||
await ctx.Reply(canProxy);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue