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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user