birdbot/mastodon/toot.go

16 lines
265 B
Go
Raw Normal View History

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