1
0
Fork 0
mirror of https://github.com/diamondburned/arikawa.git synced 2024-11-01 04:24:19 +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 ( type (
RelationshipAdd struct { RelationshipAddEvent struct {
Relationship Relationship
} }
RelationshipRemove struct { RelationshipRemoveEvent struct {
Relationship Relationship
} }
) )

View file

@ -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)
},
} }