Documentation
¶
Index ¶
- Constants
- func Ack(ctx context.Context, redis *redis.Client, connCode string)
- func AckSubscribe(ctx context.Context, redis *redis.Client, connCode string) *redis.PubSub
- func ApplyMuteDeaf(sess *discordgo.Session, guildID, userID string, mute, deaf bool) error
- func PushJob(ctx context.Context, redis *redis.Client, connCode string, jobType JobType, ...) error
- func Subscribe(ctx context.Context, redis *redis.Client, connCode string) *redis.PubSub
- type Job
- type JobType
- type ModifyTask
- type MuteDeafenSuccessCounts
- type PatchParams
- type UserModify
- type UserModifyRequest
Constants ¶
View Source
const IDLength = 10
View Source
const JobTTLSeconds = 3600
Variables ¶
This section is empty.
Functions ¶
func AckSubscribe ¶ added in v0.0.3
func ApplyMuteDeaf ¶
Types ¶
type Job ¶ added in v0.0.3
type Job struct {
JobType JobType `json:"type"`
Payload interface{} `json:"payload"`
}
type ModifyTask ¶
type ModifyTask struct {
GuildID uint64 `json:"guildID"`
UserID uint64 `json:"userID"`
Parameters PatchParams `json:"parameters"`
TaskID string `json:"taskID"`
}
func NewModifyTask ¶
func NewModifyTask(guildID, userID uint64, params PatchParams) ModifyTask
type MuteDeafenSuccessCounts ¶
type MuteDeafenSuccessCounts struct {
Worker int64 `json:"worker"`
Capture int64 `json:"capture"`
Official int64 `json:"official"`
RateLimit int64 `json:"ratelimit"`
}
a response indicating how the mutes/deafens were issued, and if ratelimits occurred
type PatchParams ¶
type UserModify ¶ added in v0.0.2
type UserModifyRequest ¶ added in v0.0.2
type UserModifyRequest struct {
Premium premium.Tier `json:"premium"`
Users []UserModify `json:"users"`
}
Click to show internal directories.
Click to hide internal directories.