Documentation
¶
Index ¶
- type Discord
- func (d *Discord) AddReceivers(channelIDs ...string)
- func (d *Discord) AuthenticateWithBotToken(token string) error
- func (d *Discord) AuthenticateWithCredentials(email, password string) error
- func (d *Discord) AuthenticateWithCredentialsFull(email, password, token string, isOAuthToken bool) error
- func (d *Discord) AuthenticateWithOAuth2Token(token string) error
- func (d Discord) Send(ctx context.Context, subject, message string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Discord ¶
type Discord struct {
// contains filtered or unexported fields
}
Discord struct holds necessary data to communicate with the Discord API.
func (*Discord) AddReceivers ¶
AddReceivers takes Discord channel IDs and adds them to the internal channel ID list. The Send method will send a given message to all those channels.
func (*Discord) AuthenticateWithBotToken ¶
AuthenticateWithBotToken authenticates you as a bot to Discord via the given access token. For more info, see here: https://pkg.go.dev/github.com/bwmarrin/discordgo@v0.22.1#New
func (*Discord) AuthenticateWithCredentials ¶
AuthenticateWithCredentials authenticates you to Discord via your email and password. Note that this is highly discouraged by Discord. Please use an authentication token. For more info, see here: https://pkg.go.dev/github.com/bwmarrin/discordgo@v0.22.1#New
func (*Discord) AuthenticateWithCredentialsFull ¶
func (d *Discord) AuthenticateWithCredentialsFull(email, password, token string, isOAuthToken bool) error
AuthenticateWithCredentialsFull authenticates you to Discord via your email, password and access token. This is what discord recommends. For more info, see here: https://pkg.go.dev/github.com/bwmarrin/discordgo@v0.22.1#New
func (*Discord) AuthenticateWithOAuth2Token ¶
AuthenticateWithOAuth2Token authenticates you to Discord via the given OAUTH2 token. For more info, see here: https://pkg.go.dev/github.com/bwmarrin/discordgo@v0.22.1#New