Browse Source

Add GuildID to multiple structs (#541)

Dim 7 years ago
parent
commit
82c8cf21b2
3 changed files with 7 additions and 0 deletions
  1. 3 0
      events.go
  2. 3 0
      message.go
  3. 1 0
      structs.go

+ 3 - 0
events.go

@@ -70,6 +70,7 @@ type ChannelDelete struct {
 type ChannelPinsUpdate struct {
 	LastPinTimestamp string `json:"last_pin_timestamp"`
 	ChannelID        string `json:"channel_id"`
+	GuildID          string `json:"guild_id,omitempty"`
 }
 
 // GuildCreate is the data for a GuildCreate event.
@@ -212,6 +213,7 @@ type RelationshipRemove struct {
 type TypingStart struct {
 	UserID    string `json:"user_id"`
 	ChannelID string `json:"channel_id"`
+	GuildID   string `json:"guild_id,omitempty"`
 	Timestamp int    `json:"timestamp"`
 }
 
@@ -250,4 +252,5 @@ type VoiceStateUpdate struct {
 type MessageDeleteBulk struct {
 	Messages  []string `json:"ids"`
 	ChannelID string   `json:"channel_id"`
+	GuildID   string   `json:"guild_id"`
 }

+ 3 - 0
message.go

@@ -38,6 +38,9 @@ type Message struct {
 	// The ID of the channel in which the message was sent.
 	ChannelID string `json:"channel_id"`
 
+	// The ID of the guild in which the message was sent.
+	GuildID string `json:"guild_id,omitempty"`
+
 	// The content of the message.
 	Content string `json:"content"`
 

+ 1 - 0
structs.go

@@ -813,6 +813,7 @@ type MessageReaction struct {
 	MessageID string `json:"message_id"`
 	Emoji     Emoji  `json:"emoji"`
 	ChannelID string `json:"channel_id"`
+	GuildID   string `json:"guild_id,omitempty"`
 }
 
 // GatewayBotResponse stores the data for the gateway/bot response