Documentation ¶
Index ¶
- Constants
- Variables
- func GetScramble(s string) string
- func IDBGAN(guildId, channelId, item string) (err error)
- func IntentMean(intent intent) string
- func ItemSave(guildId, channelId string, brand null.String, item string, price null.String, ...) (err error)
- func Judge(str string, key JudgeKeys) string
- func JudgeIndex(str string, key JudgeKeys) int
- func LDBGAA(groupId int64, ask string) (err error)
- func LearnSave(ask string, groupId int64, adminId int64, answer null.String, ...) (err error)
- func PBlockSave(userId int64, ispblock bool, adminId int64, gmtModified time.Time) (err error)
- func PluginNameToIntent(s string) intent
- func SDBGI(groupId int64) (err error)
- func SubDeleteByGroupId(groupId int64) (err error)
- func SubSave(orgin_group_id int64, replace_group_id int64, admin_id int64) (err error)
- func SwitchSave(groupId int64, isCloseOrGuard int64, isClose bool) (err error)
- type CuberPrice
- type JudgeKeys
- type JudgekeysSync
- type Learn
- type LearnSync
- type PBlock
- type PBlockSync
- type Scramble
- type Subscribe
- type SubscribeSync
- type Switch
- type SwitchSync
Constants ¶
View Source
const ( PluginGuard intent = 1 << iota // 守卫 PluginBlock // 个人屏蔽 PluginSwitch // 开关 PluginRepeat // 复读 PluginReply // 回复 PluginAdmin // 群管 PluginSubscribe //查价订阅 PluginPrice // 查价 PluginScramble // 打乱 PluginLearn // 群学习 )
Variables ¶
View Source
var Db *sql.DB
View Source
var IntentMap = map[intent]string{ PluginGuard: "守卫", PluginBlock: "屏蔽", PluginSwitch: "开关", PluginRepeat: "复读", PluginReply: "回复", PluginAdmin: "群管", PluginSubscribe: "订阅", PluginPrice: "查价", PluginScramble: "打乱", PluginLearn: "学习", }
View Source
var Pool *redis.Pool
View Source
var SwitchMap = map[string]intent{ "守卫": PluginGuard, "屏蔽": PluginBlock, "开关": PluginSwitch, "复读": PluginRepeat, "回复": PluginReply, "群管": PluginAdmin, "订阅": PluginSubscribe, "查价": PluginPrice, "打乱": PluginScramble, "学习": PluginLearn, }
Functions ¶
func GetScramble ¶
func IntentMean ¶
func IntentMean(intent intent) string
func JudgeIndex ¶
func PBlockSave ¶
func PluginNameToIntent ¶
func PluginNameToIntent(s string) intent
func SubDeleteByGroupId ¶
Types ¶
type CuberPrice ¶
type CuberPrice struct { Id int64 `json:"id"` GuildId string `json:"guild_id"` ChannelId string `json:"channel_id"` Brand null.String `json:"brand"` Item string `json:"item"` Price null.String `json:"price"` Shipping null.String `json:"shipping"` Updater string `json:"updater"` GmtModified null.Time `json:"gmt_modified"` }
func (*CuberPrice) ItemCreate ¶
func (cp *CuberPrice) ItemCreate() (err error)
func (*CuberPrice) ItemDeleteById ¶
func (cp *CuberPrice) ItemDeleteById() (err error)
func (*CuberPrice) ItemUpdate ¶
func (cp *CuberPrice) ItemUpdate(price null.String, shipping null.String) (err error)
type JudgeKeys ¶
type JudgeKeys struct {
Keys []string
}
func JudgeKeysRead ¶
func (*JudgeKeys) JudgeKeysCreate ¶
type JudgekeysSync ¶
func GetJudgeKeys ¶
func GetJudgeKeys() (key JudgekeysSync, err error)
func (*JudgekeysSync) JudgeKeysDelete ¶
func (k *JudgekeysSync) JudgeKeysDelete(dk ...string)
func (*JudgekeysSync) JudgeKeysUpdate ¶
func (k *JudgekeysSync) JudgeKeysUpdate(uk ...string) error
type Learn ¶
type Learn struct { Id int64 Ask string GroupId int64 AdminId int64 Answer null.String GmtModified time.Time }
func (*Learn) LearnCreate ¶
func (*Learn) LearnDeleteByGroupIdAndAsk ¶
func (*Learn) LearnUpdate ¶
type PBlockSync ¶
func PBlockGet ¶
func PBlockGet(userId int64) (pblockSync PBlockSync, err error)
type SubscribeSync ¶
func GetSubscribe ¶
func GetSubscribe(groupId int64) (sub_sync SubscribeSync, err error)
type Switch ¶
type Switch struct { Id int `json:"id"` GroupId int64 `json:"group_id"` IsCloseOrGuard int64 `json:"is_close_or_guard"` }
func (*Switch) SwitchCreate ¶
func (*Switch) SwitchUpdate ¶
type SwitchSync ¶
func SGBGI ¶
func SGBGI(groupId int64) (bot_switch_sync SwitchSync, err error)
SGBGI SwitchGetByGroupId
Click to show internal directories.
Click to hide internal directories.