Documentation ¶
Index ¶
- type AllowedToVote
- type Discord
- type DiscordImpl
- func (d *DiscordImpl) BanUser(userID string, reason string, days int) error
- func (d *DiscordImpl) GetAllGuildMembers() ([]UserRoles, error)
- func (d *DiscordImpl) GetGuildMemberUsername(userID string) (string, error)
- func (d *DiscordImpl) SendChannelMessage(channelID string, content string) error
- func (d *DiscordImpl) SendDM(userID string, message string) error
- func (d *DiscordImpl) SendDMEmbed(userID, content, description, titleText, buttonLabel, buttonID string) error
- type DiscordImplArgs
- type Twilio
- type TwilioImpl
- type TwilioImplArgs
- type UserRoles
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AllowedToVote ¶
type Discord ¶
type Discord interface { BanUser(userID string, reason string, days int) error SendChannelMessage(channelID string, message string) error SendDMEmbed(userID, content, description, titleText, buttonLabel, buttonID string) error SendDM(userID string, message string) error GetAllGuildMembers() ([]UserRoles, error) GetGuildMemberUsername(userID string) (string, error) }
type DiscordImpl ¶
type DiscordImpl struct {
// contains filtered or unexported fields
}
func NewDiscord ¶
func NewDiscord(args *DiscordImplArgs) (*DiscordImpl, error)
func (*DiscordImpl) BanUser ¶
func (d *DiscordImpl) BanUser(userID string, reason string, days int) error
func (*DiscordImpl) GetAllGuildMembers ¶
func (d *DiscordImpl) GetAllGuildMembers() ([]UserRoles, error)
func (*DiscordImpl) GetGuildMemberUsername ¶
func (d *DiscordImpl) GetGuildMemberUsername(userID string) (string, error)
func (*DiscordImpl) SendChannelMessage ¶
func (d *DiscordImpl) SendChannelMessage(channelID string, content string) error
func (*DiscordImpl) SendDMEmbed ¶
func (d *DiscordImpl) SendDMEmbed(userID, content, description, titleText, buttonLabel, buttonID string) error
type DiscordImplArgs ¶
type DiscordImplArgs struct { AllowedToVote AllowedToVote BotToken string GuildID string PrimaryChannelID string Logger *log.Logger Session *discordgo.Session EmbedReactionCallback func(userID, buttonID string) PanicAlertCallback func(message string) PanicBanCallback func(userID, targetUserID, reason string, days float64) RoleRemovedCallback func(user, role string) }
type TwilioImpl ¶
type TwilioImpl struct {
// contains filtered or unexported fields
}
func NewTwilio ¶
func NewTwilio(args *TwilioImplArgs) (*TwilioImpl, error)
func (*TwilioImpl) SendMessage ¶
func (Twilio *TwilioImpl) SendMessage(toNumber, body string) error
type TwilioImplArgs ¶
Click to show internal directories.
Click to hide internal directories.