Discord: add dedicated type for ExpireBehavior

This commit is contained in:
mavolin 2020-05-11 01:45:44 +02:00
parent a298160529
commit 1b990cd58d
No known key found for this signature in database
GPG Key ID: D8681218EDF216DF
2 changed files with 12 additions and 2 deletions

View File

@ -167,8 +167,8 @@ type Integration struct {
// used for subscribers
RoleID Snowflake `json:"role_id"`
ExpireBehavior int `json:"expire_behavior"`
ExpireGracePeriod int `json:"expire_grace_period"`
ExpireBehavior ExpireBehavior `json:"expire_behavior"`
ExpireGracePeriod int `json:"expire_grace_period"`
User User `json:"user"`
Account struct {

View File

@ -88,3 +88,13 @@ const (
Twitch Service = "twitch"
YouTube Service = "youtube"
)
// ExpireBehavior is the integration expire behavior that regulates what happens, if a subscriber expires.
type ExpireBehavior uint8
var (
// RemoveRole removes the role of the subscriber.
RemoveRole ExpireBehavior = 0
// Kick kicks the subscriber from the guild.
Kick ExpireBehavior = 1
)