diff options
| author | Mel <einebeere@gmail.com> | 2022-08-17 00:07:35 +0000 |
|---|---|---|
| committer | Mel <einebeere@gmail.com> | 2022-08-17 00:07:35 +0000 |
| commit | be6cd2217b6bb1bb411d46ebd9d003dfd928af96 (patch) | |
| tree | 94e5807aae0fb65d2768adce594e245052ecf578 /pkg/bot/output.go | |
| parent | d84c0f36afcde4e5af2907d70931de75957d5277 (diff) | |
| download | jinx-be6cd2217b6bb1bb411d46ebd9d003dfd928af96.tar.zst jinx-be6cd2217b6bb1bb411d46ebd9d003dfd928af96.zip | |
Add different "say" outputs to VM
Diffstat (limited to 'pkg/bot/output.go')
| -rw-r--r-- | pkg/bot/output.go | 19 |
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) +} |
