birdbot/mastodon/toot.go

15 lines
228 B
Go
Raw Normal View History

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