Versions in this module Expand all Collapse all v1 v1.0.2 May 30, 2025 Changes in this version + var GlobalCache = cache.New(time.Second * 30, time.Second * 30) + func CheckIsAdmin(userID string) (isAdmin bool) + func FindByCacheFunc[T any](model T, keyFunc func(T) string) (res []T, hitCache bool) + func FindByCache[T any](model T) (modelList []T, hitCache bool) + func FindFuncNoCache[T any](model T) (res []T) + func GetAdminLevel(userID string) int + func GetDbConnection() *gorm.DB + type Administrator struct + Level int64 + UserID int64 + UserName string + type AlertList struct + EmailAddress string + type ChannelLogExt struct + ChannelID string + ChannelName string + GuildID string + ISUpdate bool + JoinedTime string + LeftTime string + MsgID string + UserID string + UserName string + func (cl *ChannelLogExt) AddJoinedRecord() error + func (cl *ChannelLogExt) UpdateLeftTime() (newChanLog *ChannelLogExt, err error) + type ChatContextRecord struct + SessionID string + UserID string + type ChatRecordLog struct + AuthorID string + RecordStr string + type CommandInfo struct + CommandDesc string + CommandName string + CommandParamLen int + CommandType string + CreatedAt time.Time + UpdatedAt time.Time + func GetCommandInfo(command string) (commandInfoList []*CommandInfo, err error) + func GetCommandInfoWithOpt(optionf string) (commandInfoList []*CommandInfo, err error) + type CopyWritingCustom struct + Content pq.StringArray + Endpoint string + GuildID string + type CopyWritingGeneral struct + Content pq.StringArray + Endpoint string + type DynamicConfig struct + Key string + Value string + type FunctionEnabling struct + Function consts.LarkFunctionEnum + GuildID string + type General struct + CreatedAt time.Time + DeletedAt gorm.DeletedAt + UpdatedAt time.Time + type GeneralConf struct + ConfigKey string + ConfigVar string + type ImitateRateCustom struct + GuildID string + Rate int + type InteractionStats struct + ActionType consts.LarkInteraction + CreatedAt time.Time + GuildID string + OpenID string + UserName string + type LarkImg struct + ImgKey string + SongID string + type MsgTraceLog struct + CreatedAt time.Time + MsgID string + TraceID string + type PromptConf struct + PromptKey string + SystemPromptTpl string + UserPromptTpl string + type PromptTemplateArgs struct + Constraints string + HistoryRecords []string + PromptID int + Task string + TemplateStr string + UserInput []string + type QuoteReplyMsg struct + Keyword string + MatchType consts.WordMatchType + type QuoteReplyMsgCustom struct + GuildID string + Keyword string + MatchType consts.WordMatchType + type ReactImageMeterial struct + FileID string + GuildID string + Type string + type ReactionWhitelist struct + GuildID string + type RepeatWhitelist struct + GuildID string + type RepeatWordsRate struct + Rate int + Word string + type RepeatWordsRateCustom struct + GuildID string + Rate int + Word string + type ReplyNType struct + Reply string + ReplyType consts.ReplyType + type StickerMapping struct + ImageKey string + StickerKey string + type TemplateVersion struct + CreatedAt time.Time + TemplateID string + TemplateSrc string + TemplateVersion string + UpdatedAt time.Time