Documentation
¶
Index ¶
- func GetLimitationExpiration(userID disgord.Snowflake, command string) (*time.Time, error)
- func ReadLimitations(file string) (map[string]*UserLimitations, error)
- func SetLimitationExpiration(userID disgord.Snowflake, command string, expiration time.Time) error
- func SetLimitationsFile(file string)
- type UserLimitations
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetLimitationExpiration ¶
func ReadLimitations ¶
func ReadLimitations(file string) (map[string]*UserLimitations, error)
ReadLimitations reads the user limitations contained inside the given file
func SetLimitationExpiration ¶
func SetLimitationsFile ¶
func SetLimitationsFile(file string)
SetLimitationsFile sets the file path where the limitations will be written
Types ¶
type UserLimitations ¶
type UserLimitations struct {
CommandsLimitations map[string]time.Time `json:"commands_limitations"` // Map of limitations for each command
}
UserLimitations contains the data about the limitations of a single user
func NewUserLimitations ¶
func NewUserLimitations() *UserLimitations
NewUserLimitations returns a new UserLimitations object
func (*UserLimitations) Equal ¶
func (u *UserLimitations) Equal(v *UserLimitations) bool
Equal tells whether u and v contain the same data
Click to show internal directories.
Click to hide internal directories.