Documentation
¶
Index ¶
- func FieldsN(s string, n int) []string
- func FormatUserList(userList []string) string
- func IsSenderInRole(session *discordgo.Session, message *discordgo.MessageCreate, role string) bool
- func IsUserInRole(session *discordgo.Session, guildID, userID, role string) bool
- func RandomString(length int) string
- func ReadFromUrl(url string) (string, error)
- func StringSliceContains(slice []string, string string) bool
- func StringSliceEquals(s1, s2 []string) bool
- func StringSliceIndexOf(element string, slice []string) int
- func Substring(s string, start, end int) string
- type Emailer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FieldsN ¶
Splits a string using FieldsFunc and a function that will only split n number of times
func IsSenderInRole ¶
Checks if a sender of a message is in a given role.
func IsUserInRole ¶
Checks if a user is in a specific role.
func RandomString ¶
Returns a random string of letters of a given length.
func StringSliceContains ¶
Checks if a slice of strings contains a given string
func StringSliceEquals ¶
Checks if two string slices have equal contents
func StringSliceIndexOf ¶
Gets the index of a string in a slice
Types ¶
type Emailer ¶
type Emailer struct {
// contains filtered or unexported fields
}
func (*Emailer) IsValidEmail ¶
Checks if an email is within the list of valid emails.
func (*Emailer) SendVerificationEmail ¶
Sends an email to an address
Click to show internal directories.
Click to hide internal directories.