From 8e2c052a55e5e08c6e7ed643b399f1a7f69a2b25 Mon Sep 17 00:00:00 2001 From: Illia Date: Sun, 18 Dec 2016 10:18:22 -0800 Subject: Add framework config to ignore webhook messages --- src/ext/framework/mod.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/ext/framework/mod.rs') diff --git a/src/ext/framework/mod.rs b/src/ext/framework/mod.rs index fb8c05c..777736f 100644 --- a/src/ext/framework/mod.rs +++ b/src/ext/framework/mod.rs @@ -341,7 +341,11 @@ impl Framework { return; } - if !self.configuration.allow_dm { + if self.configuration.ignore_webhooks && message.is_webhook() { + return; + } + + if !self.configuration.allow_dm && message.is_private() { if let Some(ref message) = self.configuration.no_dm_message { let _ = context.say(message); } -- cgit v1.2.3