about summary refs log tree commit diff
path: root/pkg/bot/output.go
blob: d29a625fb5f61a7d631a1074a7f943a5a8099761 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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)
}