Skip to content

Commit 4bfdcb6

Browse files
committed
Ignore certain event types in Discord webhook
1 parent fe98ed8 commit 4bfdcb6

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

etc/config.sample.json

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"discord": {
99
"forward_event_log": {
1010
"enabled": false,
11+
"ignore_event_types": [3,5,7,8,9,10,11],
1112
"webhook": null
1213
},
1314
"invite_code": "u87WVeu",

src/libraries/Logger.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,9 @@ protected static function dispatchDiscordWebhook($event_id) {
7373
$c = Common::$config->bnetdocs->discord->forward_event_log;
7474
if (!$c->enabled) return;
7575

76-
$event = new Event($event_id);
76+
$event = new Event($event_id);
77+
if (in_array($event->getEventTypeId(), $c->ignore_event_types)) return;
78+
7779
$webhook = new DiscordWebhook($c->webhook);
7880
$embed = new DiscordEmbed();
7981

0 commit comments

Comments
 (0)