birdbot/mastodon/toot.go
2023-03-31 20:49:50 +00:00

16 lines
265 B
Go

package mastodon
import (
"context"
"github.com/mattn/go-mastodon"
)
// Toot publishes a toot on Mastodon
func (m *Mastodon) Toot(message string) error {
_, err := m.client.PostStatus(context.Background(), &mastodon.Toot{
Status: message,
})
return err
}