about summary refs log tree commit diff
path: root/pkg/bot/output.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/bot/output.go')
-rw-r--r--pkg/bot/output.go19
1 files changed, 19 insertions, 0 deletions
diff --git a/pkg/bot/output.go b/pkg/bot/output.go
new file mode 100644
index 0000000..d29a625
--- /dev/null
+++ b/pkg/bot/output.go
@@ -0,0 +1,19 @@
+package bot
+
+import (
+	"jinx/pkg/discord"
+	"jinx/pkg/discord/entities"
+
+	"github.com/rs/zerolog"
+)
+
+type chatOutput struct {
+	logger  *zerolog.Logger
+	client  *discord.Discord
+	channel entities.Snowflake
+}
+
+func (c *chatOutput) Write(p string) error {
+	c.logger.Info().Msgf("writing lang output: %s", p)
+	return c.client.SendMessage(c.channel, p)
+}