birdbot/mastodon/toot.go

16 lines
265 B
Go
Raw Normal View History

2022-11-04 07:45:20 +01:00
package mastodon
import (
"context"
"github.com/mattn/go-mastodon"
)
2023-03-31 22:49:50 +02:00
// Toot publishes a toot on Mastodon
2022-11-04 07:45:20 +01:00
func (m *Mastodon) Toot(message string) error {
_, err := m.client.PostStatus(context.Background(), &mastodon.Toot{
Status: message,
})
return err
}