1
0
Fork 0
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:
diamondburned 2020-07-11 00:01:02 -07:00
parent 16ed406c53
commit d3d9811276
2 changed files with 11 additions and 18 deletions

View file

@ -324,10 +324,10 @@ type (
)
type (
RelationshipAdd struct {
RelationshipAddEvent struct {
Relationship
}
RelationshipRemove struct {
RelationshipRemoveEvent struct {
Relationship
}
)

View file

@ -22,10 +22,8 @@ var EventCreator = map[string]func() Event{
"GUILD_BAN_ADD": func() Event { return new(GuildBanAddEvent) },
"GUILD_BAN_REMOVE": func() Event { return new(GuildBanRemoveEvent) },
"GUILD_EMOJIS_UPDATE": func() Event { return new(GuildEmojisUpdateEvent) },
"GUILD_INTEGRATIONS_UPDATE": func() Event {
return new(GuildIntegrationsUpdateEvent)
},
"GUILD_EMOJIS_UPDATE": func() Event { return new(GuildEmojisUpdateEvent) },
"GUILD_INTEGRATIONS_UPDATE": func() Event { return new(GuildIntegrationsUpdateEvent) },
"GUILD_MEMBER_ADD": func() Event { return new(GuildMemberAddEvent) },
"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) },
"USER_UPDATE": func() Event {
return new(UserUpdateEvent)
},
"USER_SETTINGS_UPDATE": func() Event {
return new(UserSettingsUpdateEvent)
},
"USER_GUILD_SETTINGS_UPDATE": func() Event {
return new(UserGuildSettingsUpdateEvent)
},
"USER_NOTE_UPDATE": func() Event {
return new(UserNoteUpdateEvent)
},
"USER_UPDATE": func() Event { return new(UserUpdateEvent) },
"USER_SETTINGS_UPDATE": func() Event { return new(UserSettingsUpdateEvent) },
"USER_GUILD_SETTINGS_UPDATE": func() Event { return new(UserGuildSettingsUpdateEvent) },
"USER_NOTE_UPDATE": func() Event { return new(UserNoteUpdateEvent) },
"RELATIONSHIP_ADD": func() Event { return new(RelationshipAddEvent) },
"RELATIONSHIP_REMOVE": func() Event { return new(RelationshipRemoveEvent) },
}