Versions in this module Expand all Collapse all v1 v1.24.19 Mar 7, 2021 Changes in this version type Plugin + func (p *Plugin) AllFeatureFlags() []string + func (p *Plugin) UpdateFeatureFlags(guildID int64) ([]string, error) v1.20.6 Sep 3, 2019 Changes in this version + var DBSchemas = []string + var ErrBlacklistedGive = UserError("Blacklisted from giving points") + var ErrBlacklistedReceive = UserError("Blacklisted from receiving points") + var ErrCooldown = UserError("You're still on cooldown") + var ErrMissingRequiredGiveRole = UserError("You don't have any of the required roles to give points") + var ErrMissingRequiredReceiveRole = UserError("Target don't have any of the required roles to receive points") + var ErrUserNotFound = errors.New("User not found") + func CanModifyRep(conf *models.ReputationConfig, sender, receiver *dstate.MemberState) error + func CheckSetCooldown(conf *models.ReputationConfig, senderID int64) (bool, error) + func ClearCooldown(guildID, senderID int64) error + func CmdGiveRep(parsed *dcmd.Data) (interface{}, error) + func DefaultConfig(guildID int64) *models.ReputationConfig + func DelRep(ctx context.Context, gid int64, userID int64) error + func GetConfig(ctx context.Context, guildID int64) (*models.ReputationConfig, error) + func GetUserStats(guildID, userID int64) (score int64, rank int, err error) + func HandleGetReputation(w http.ResponseWriter, r *http.Request) interface + func HandleLeaderboardJson(w http.ResponseWriter, r *http.Request) interface + func HandleLogsJson(W http.ResponseWriter, r *http.Request) interface + func HandlePostReputation(w http.ResponseWriter, r *http.Request) (templateData web.TemplateData, err error) + func HandleResetReputation(w http.ResponseWriter, r *http.Request) (templateData web.TemplateData, err error) + func IsAdmin(gs *dstate.GuildState, member *dstate.MemberState, ...) bool + func KeyCooldown(guildID, userID int64) string + func ModifyRep(ctx context.Context, conf *models.ReputationConfig, guildID int64, ...) (err error) + func RegisterPlugin() + func SetRep(ctx context.Context, gid int64, senderID, userID int64, points int64) error + type LeaderboardEntry struct + Avatar string + Bot bool + Username string + func DetailedLeaderboardEntries(guildID int64, ranks []*RankEntry) ([]*LeaderboardEntry, error) + type Plugin struct + func (p *Plugin) AddCommands() + func (p *Plugin) BotInit() + func (p *Plugin) InitWeb() + func (p *Plugin) LoadServerHomeWidget(w http.ResponseWriter, r *http.Request) (web.TemplateData, error) + func (p *Plugin) PluginInfo() *common.PluginInfo + type PostConfigForm struct + AdminRoles []int64 + BlacklistedGiveRoles []int64 + BlacklistedReceiveRoles []int64 + Cooldown int + EnableThanksDetection bool + Enabled bool + MaxGiveAmount int64 + MaxRemoveAmount int64 + PointsName string + RequiredGiveRoles []int64 + RequiredReceiveRoles []int64 + func (p PostConfigForm) RepConfig() *models.ReputationConfig + type RankEntry struct + Points int64 + Rank int + UserID int64 + func TopUsers(guildID int64, offset, limit int) ([]*RankEntry, error) + type UserError string + func (b UserError) Error() string