From 3a1b1c22fcbc240e75c433d932c32b05cb62af31 Mon Sep 17 00:00:00 2001 From: "diamondburned (Forefront)" Date: Thu, 26 Mar 2020 16:28:43 -0700 Subject: [PATCH] Gateway: Added missing Notification constant and SupressRoles field --- gateway/ready.go | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/gateway/ready.go b/gateway/ready.go index 680af8a..eaec3e1 100644 --- a/gateway/ready.go +++ b/gateway/ready.go @@ -69,15 +69,27 @@ type UserSettings struct { // A UserGuildSettings stores data for a users guild settings. type UserGuildSettings struct { - SupressEveryone bool `json:"suppress_everyone"` - Muted bool `json:"muted"` - MobilePush bool `json:"mobile_push"` - MessageNotifications int `json:"message_notifications"` + GuildID discord.Snowflake `json:"guild_id"` - GuildID discord.Snowflake `json:"guild_id"` - ChannelOverrides []SettingsChannelOverride `json:"channel_overrides"` + SupressEveryone bool `json:"suppress_everyone"` + SupressRoles bool `json:"suppress_roles"` + Muted bool `json:"muted"` + MobilePush bool `json:"mobile_push"` + + MessageNotifications Notification `json:"message_notifications"` + ChannelOverrides []SettingsChannelOverride `json:"channel_overrides"` } +// Notification is the notification setting for a channel or guild. +type Notification uint8 + +const ( + AllNotifications Notification = iota + NoNotifications + OnlyMentions + GuildDefaults +) + type ReadState struct { ChannelID discord.Snowflake `json:"id"` LastMessageID discord.Snowflake `json:"last_message_id"`