mirror of
https://github.com/lyx0/nourybot-matrix.git
synced 2024-11-13 19:49:54 +01:00
15 lines
349 B
Go
15 lines
349 B
Go
|
package main
|
||
|
|
||
|
import "maunium.net/go/mautrix/event"
|
||
|
|
||
|
func (app *Application) SendText(evt *event.Event, message string) {
|
||
|
room := evt.RoomID
|
||
|
|
||
|
resp, err := app.Mc.SendText(room, message)
|
||
|
if err != nil {
|
||
|
app.Log.Error().Err(err).Msg("Failed to send event")
|
||
|
} else {
|
||
|
app.Log.Info().Str("event_id", resp.EventID.String()).Msg("Event sent")
|
||
|
}
|
||
|
}
|