Documentation ¶
Index ¶
- func CreateAndStart() bool
- func GuildCreate(guild structure.Guild) bool
- func GuildExist(guild structure.Guild) (bool, error)
- func GuildGet(guild structure.Guild) (structure.Guild, error)
- func HCooldownGet(user structure.Member, command string, exp time.Duration) (bool, error)
- func HCooldownset(user structure.Member, command string)
- func LCooldownGet(user structure.Member, command string, exp time.Duration) (bool, error)
- func LCooldownset(user structure.Member, command string)
- func MessageCreate(s *discordgo.Session, m *discordgo.MessageCreate)
- type BotCache
- func (BotCache *BotCache) GetGuild(id string) (bool, structure.Guild)
- func (BotCache *BotCache) GetHcooldown(id string, cooldowncmd string) (bool, time.Time)
- func (BotCache *BotCache) GetLcooldown(id string, cooldowncmd string) (bool, time.Time)
- func (BotCache *BotCache) GetMember(id string) (bool, structure.Member)
- func (botcache *BotCache) LockAllCache() bool
- func (botcache *BotCache) SetGuild(guildobj structure.Guild)
- func (botcache *BotCache) SetHcool(memberobj structure.Member, cooldowncmd string, t time.Time)
- func (botcache *BotCache) SetLcool(memberobj structure.Member, cooldowncmd string, t time.Time)
- func (botcache *BotCache) SetMember(memberobj structure.Member)
- func (botcache *BotCache) UnlockAllCache() bool
- type BotStruct
- type Cmd
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GuildCreate ¶
func HCooldownGet ¶ added in v0.2.0
func HCooldownset ¶ added in v0.2.0
func LCooldownGet ¶ added in v0.2.0
Exp is in sec => true cooldown active / false cooldown expired
func LCooldownset ¶ added in v0.2.0
func MessageCreate ¶
func MessageCreate(s *discordgo.Session, m *discordgo.MessageCreate)
Types ¶
type BotCache ¶
type BotCache struct { sync.RWMutex GuildCache *bigcache.BigCache MemberCache *bigcache.BigCache ConfigCache *bigcache.BigCache Lcooldown *bigcache.BigCache Hcooldown *bigcache.BigCache // contains filtered or unexported fields }
func NewBotCache ¶
func NewBotCache() BotCache
func (*BotCache) GetHcooldown ¶ added in v0.2.0
func (*BotCache) GetLcooldown ¶ added in v0.2.0
func (*BotCache) LockAllCache ¶
func (*BotCache) UnlockAllCache ¶
Click to show internal directories.
Click to hide internal directories.