mastodon-group-bot/utils.go

24 lines
474 B
Go
Raw Normal View History

2022-09-08 12:26:25 +00:00
package main
import "github.com/mattn/go-mastodon"
// Posting function
func postToot(toot string, vis string) (*mastodon.Status, error) {
conToot := mastodon.Toot{
Status: toot,
Visibility: vis,
}
status, err := c.PostStatus(ctx, &conToot)
return status, err
}
2022-09-08 18:28:32 +00:00
// Check following
func check_following(followers []*mastodon.Account, acct string) bool {
for i := range followers {
if acct == string(followers[i].Acct) {
return true
}
}
return false
}