Documentation ¶
Index ¶
- Constants
- type Notifier
- func (n *Notifier) EnableDiscord(token string, channel string) error
- func (n *Notifier) EnableMastodon(server, accessToken, clientID, clientSecret, user, pass string) error
- func (n *Notifier) EnableTwitter(accessToken, accessTokenSecret, consumerKey, consumerKeySecret string) error
- func (n *Notifier) Notify() error
Constants ¶
View Source
const ( // MessageSizeLimit will be the maximum size of a message // that we can send with our notification system. // The limit is caused by Twitter's maximum tweet size. // // We believe Twitter has the SMALLEST constraint of all of our // integrations, and therefore sets the bar. MessageSizeLimit int = 280 EnableDiscordSend bool = false EnableTwitterSend bool = false EnableMastodonSend bool = true )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Notifier ¶
type Notifier struct { Message string Discord *discordgo.Session Twitter *anaconda.TwitterApi Mastodon *madon.Client // contains filtered or unexported fields }
func (*Notifier) EnableDiscord ¶
EnableDiscord will use the Bot API to communicate with Discord. You must pass the RAW token data to this function in order to create a new client.
More: https://discord.com/developers/
The bot must be linked to a specific server which can be done via:
https://discord.com/oauth2/authorize?client_id=YOUR_ID_HERE&scope=bot&permissions=2048
func (*Notifier) EnableMastodon ¶
func (*Notifier) EnableTwitter ¶
Click to show internal directories.
Click to hide internal directories.