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(guildId, channelId, ask string) (err error)
- func LearnSave(ask, guildId, channelId, adminId string, answer null.String, ...) (err error)
- func PBlockSave(guildId, userId, adminId string, ispblock bool, gmtModified time.Time) (err error)
- func PluginNameToIntent(s string) intent
- func SDBGIACI(guildId, channelId string) (err error)
- func SwitchSave(guildId, channelId, adminId string, isCloseOrGuard int64, ...) (err error)
- type CuberPrice
- type Info
- type JudgeKeys
- type JudgekeysSync
- type Learn
- type LearnSync
- type PBlock
- type PBlockSync
- type PeopleInfo
- type PeopleRankInfo
- type RankInfo
- type Scramble
- 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
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 Info ¶
type Info struct { Msg string `json:"msg"` PageLast bool `json:"pageLast"` PageEmpty bool `json:"pageEmpty"` Data []PeopleInfo TotalPages int `json:"totalPages"` PageFirst bool `json:"pageFirst"` PageSize int `json:"pageSize"` PageNumberOfElements int `json:"pageNumberOfElements"` PageNum int `json:"pageNum"` Retcode int `json:"retcode"` TotalElements int `json:"totalElements"` }
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 GuildId string ChannelId string AdminId string Answer null.String GmtModified time.Time Pass bool }
func (*Learn) LDBGIAAACI ¶
LearnDeleteByGuildIdAndAskAndChannelId
func (*Learn) LearnCreate ¶
func (*Learn) LearnUpdate ¶
type PBlock ¶
type PBlock struct { Id int `json:"id"` GuildId string `json:"guild_id"` UserId string `json:"user_id"` IsPBlock bool `json:"ispblock"` AdminId string `json:"admin_id"` GmtModified time.Time `json:"gmt_modified"` }
func (*PBlock) PBlockCreate ¶
func (*PBlock) PBlockUpdate ¶
type PBlockSync ¶
func PBlockGet ¶
func PBlockGet(guildId, userId string) (pblockSync PBlockSync, err error)
type PeopleInfo ¶
type PeopleRankInfo ¶
type RankInfo ¶
type RankInfo struct { Msg string `json:"msg"` PageLast bool `json:"pageLast"` PageEmpty bool `json:"pageEmpty"` Data []PeopleRankInfo TotalPages int `json:"totalPages"` PageFirst bool `json:"pageFirst"` PageSize int `json:"pageSize"` PageNumberOfElements int `json:"pageNumberOfElements"` PageNum int `json:"pageNum"` Retcode int `json:"retcode"` TotalElements int `json:"totalElements"` }
type Switch ¶
type Switch struct { Id int `json:"id"` GuildId string `json:"guild_id"` ChannelId string `json:"channel_id"` IsCloseOrGuard int64 `json:"is_close_or_guard"` AdminId string `json:"admin_id"` GmtModified time.Time `json:"gmt_modified"` }
func (*Switch) SwitchCreate ¶
type SwitchSync ¶
func SGBGIACI ¶
func SGBGIACI(guildId, channelId string) (bot_switch_sync SwitchSync, err error)
SGBGI SwitchGetByGuildIdAndChannelId
Click to show internal directories.
Click to hide internal directories.