mirror of
https://github.com/diamondburned/arikawa.git
synced 2024-10-31 20:14:21 +00:00
Gateway: Added Relationship events and handlers; minor reformatting
This commit is contained in:
parent
16ed406c53
commit
d3d9811276
|
@ -324,10 +324,10 @@ type (
|
||||||
)
|
)
|
||||||
|
|
||||||
type (
|
type (
|
||||||
RelationshipAdd struct {
|
RelationshipAddEvent struct {
|
||||||
Relationship
|
Relationship
|
||||||
}
|
}
|
||||||
RelationshipRemove struct {
|
RelationshipRemoveEvent struct {
|
||||||
Relationship
|
Relationship
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
|
@ -23,9 +23,7 @@ var EventCreator = map[string]func() Event{
|
||||||
"GUILD_BAN_REMOVE": func() Event { return new(GuildBanRemoveEvent) },
|
"GUILD_BAN_REMOVE": func() Event { return new(GuildBanRemoveEvent) },
|
||||||
|
|
||||||
"GUILD_EMOJIS_UPDATE": func() Event { return new(GuildEmojisUpdateEvent) },
|
"GUILD_EMOJIS_UPDATE": func() Event { return new(GuildEmojisUpdateEvent) },
|
||||||
"GUILD_INTEGRATIONS_UPDATE": func() Event {
|
"GUILD_INTEGRATIONS_UPDATE": func() Event { return new(GuildIntegrationsUpdateEvent) },
|
||||||
return new(GuildIntegrationsUpdateEvent)
|
|
||||||
},
|
|
||||||
|
|
||||||
"GUILD_MEMBER_ADD": func() Event { return new(GuildMemberAddEvent) },
|
"GUILD_MEMBER_ADD": func() Event { return new(GuildMemberAddEvent) },
|
||||||
"GUILD_MEMBER_REMOVE": func() Event { return new(GuildMemberRemoveEvent) },
|
"GUILD_MEMBER_REMOVE": func() Event { return new(GuildMemberRemoveEvent) },
|
||||||
|
@ -63,16 +61,11 @@ var EventCreator = map[string]func() Event{
|
||||||
|
|
||||||
"WEBHOOKS_UPDATE": func() Event { return new(WebhooksUpdateEvent) },
|
"WEBHOOKS_UPDATE": func() Event { return new(WebhooksUpdateEvent) },
|
||||||
|
|
||||||
"USER_UPDATE": func() Event {
|
"USER_UPDATE": func() Event { return new(UserUpdateEvent) },
|
||||||
return new(UserUpdateEvent)
|
"USER_SETTINGS_UPDATE": func() Event { return new(UserSettingsUpdateEvent) },
|
||||||
},
|
"USER_GUILD_SETTINGS_UPDATE": func() Event { return new(UserGuildSettingsUpdateEvent) },
|
||||||
"USER_SETTINGS_UPDATE": func() Event {
|
"USER_NOTE_UPDATE": func() Event { return new(UserNoteUpdateEvent) },
|
||||||
return new(UserSettingsUpdateEvent)
|
|
||||||
},
|
"RELATIONSHIP_ADD": func() Event { return new(RelationshipAddEvent) },
|
||||||
"USER_GUILD_SETTINGS_UPDATE": func() Event {
|
"RELATIONSHIP_REMOVE": func() Event { return new(RelationshipRemoveEvent) },
|
||||||
return new(UserGuildSettingsUpdateEvent)
|
|
||||||
},
|
|
||||||
"USER_NOTE_UPDATE": func() Event {
|
|
||||||
return new(UserNoteUpdateEvent)
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue