Documentation
¶
Index ¶
- func CleanUserID(input string) string
- func ColorRoles(s *discordgo.Session, guildID string) (colorRoles []*discordgo.Role)
- func CreationTime(ID string) (t time.Time, err error)
- func DeleteChunks(s *discordgo.Session, channelID string, messageIDs []string) (err error)
- func EscapeMarkdown(s string) string
- func FilterColorRoles(roles []*discordgo.Role) (colorRoles []*discordgo.Role)
- func GetChannelTypeName(channelType discordgo.ChannelType) string
- func MemberAdmin(s *discordgo.Session, guildID, userID string) (bool, error)
- func MemberHasPermission(s *discordgo.Session, guildID, userID, role string) (bool, error)
- func MemberInRoles(s *discordgo.Session, guildID, userID, role string) (bool, error)
- func MentionMember(member *discordgo.Member) string
- func MentionUser(s *discordgo.Session, guildID string, user *discordgo.User) string
- func MentionUserFromParts(s *discordgo.Session, guildID string, userID string, userName string, ...) string
- func RemoveNitroColors(s *discordgo.Session, guildID, userID string, colorRoles []*discordgo.Role) error
- func Reply(s *discordgo.Session, m *discordgo.MessageCreate, format string, ...) error
- func ReplyAuthor(s *discordgo.Session, channelID string, author *discordgo.User, format string, ...) error
- func ResolveInviteCode(content string) (inviteCode string, ok bool)
- func SendChunks(prefix, suffix string, chunks []string, channelID string, s *discordgo.Session)
- func SplitIntoChunks(chunkSize int, data []string) (chunks [][]string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanUserID ¶
func ColorRoles ¶
func CreationTime ¶
CreationTime returns the creation time of a Snowflake ID relative to the creation of Discord. Taken from https://github.com/Moonlington/FloSelfbot/blob/master/commands/commandutils.go#L117
func DeleteChunks ¶
DeleteChunks will take your list of message IDs, pair them in chunks of 100, and bulk delete them
func EscapeMarkdown ¶
func FilterColorRoles ¶
func GetChannelTypeName ¶
func GetChannelTypeName(channelType discordgo.ChannelType) string
GetChannelTypeName returns a readable name for a discordgo.ChannelType
func MemberAdmin ¶
MemberAdmin returns true if the given user has the Administrator permission, is the server owner, or has the role that's been tagged as "admin"
func MemberHasPermission ¶
MemberHasPermission returns true if the user is in the given role (meaning they have permisison to access/use whatever they are trying to access), or if the user is an administrator (meaning they should always have access to everything)
func MemberInRoles ¶
MemberInRoles returns true if the given user id is in one of the given roles
func MentionMember ¶
func MentionUser ¶
func MentionUserFromParts ¶
func RemoveNitroColors ¶
func ReplyAuthor ¶
func ResolveInviteCode ¶
func SendChunks ¶
SendChunks will take your list of chunks, pair them together, and send them to the given channel surrounded by your given prefix and suffix If your chunks paired together don't fit in a single discord message, it will split them up, ensuring both messages that are sent are surrounded by the prefix and suffix
func SplitIntoChunks ¶
SplitIntoChunks splits the data into chunks of chunkSize size
Types ¶
This section is empty.