From 0c3f4ce74a2cc6536b815838d607ba3046acce8b Mon Sep 17 00:00:00 2001
From: Rudi <rudi@nightmare.haus>
Date: Thu, 12 May 2022 22:17:04 -0400
Subject: [PATCH] Allow filtering by guild

---
 tools/listen.go | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tools/listen.go b/tools/listen.go
index 6466aee..75eec4f 100644
--- a/tools/listen.go
+++ b/tools/listen.go
@@ -38,6 +38,11 @@ func main() {
 }
 
 func messageCreate(s *discordgo.Session, m *discordgo.MessageCreate) {
+	if guild != "" {
+		if m.GuildID != guild {
+			return
+		}
+	}
 	jsonMsg, err := json.Marshal(m)
 	if err != nil {
 		jsonMsg = append(jsonMsg, '0')