Documentation
¶
Index ¶
- Constants
- func AStringContains(a []string, b string) bool
- func ComesFromDM(s *discordgo.Session, id string) (bool, error)
- func FetchGuildUser(s *discordgo.Session, guildID string) []*discordgo.Member
- func GetTimestampFromId(id string) (time.Time, error)
- func HoursOfUnix(unix int64) uint
- func NewTimers(d time.Duration, fn func(chan struct{}))
- func SendAlert(pos string, message string)
- func SendDebug(message ...any)
- func SendError(err error)
- func SendSuccess(message string)
- func SendWarn(message string)
- func TrimMessage(s string) string
Constants ¶
View Source
const ( StrongGreen = 0x09D67C Green = 0x10E6AD LightGreen = 0x9DDDCD DarkRed = 0x831010 Red = 0xF74D53 LightBlue = 0x34A6F4 Blue = 0x10889E Rose = 0xF8C7DA Camel = 0xF4D694 Violet = 0xC5A2FF Error = DarkRed Alert = Red Success = Green GreatSuccess = StrongGreen Neutral = Camel Nice = Rose )
Variables ¶
This section is empty.
Functions ¶
func AStringContains ¶
AStringContains checks if a slice "a" contains a "b" string
func ComesFromDM ¶
ComesFromDM returns true if a message comes from a DM channel
func FetchGuildUser ¶
FetchGuildUser returns the list of member in a guild
func HoursOfUnix ¶
HoursOfUnix returns the hours of a unix timestamp
func NewTimers ¶
NewTimers produce a new async ticker.
d is for the duration between two ticks and fn is the functions called at each tick: it takes a chan in parameter, and you can put anything here to disable the ticker
func TrimMessage ¶
TrimMessage trims a "s" string and remove bad chars, links and pings
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.