-
Notifications
You must be signed in to change notification settings - Fork 0
/
guild_events.go
150 lines (123 loc) 路 3.87 KB
/
guild_events.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
package state
import (
"github.com/diamondburned/arikawa/discord"
"github.com/diamondburned/arikawa/gateway"
)
// https://discord.com/developers/docs/topics/gateway#guild-create
//
// Note that this event will not be sent in Base and All handlers.
// Instead, the situation-specific sub-events will be sent.
type GuildCreateEvent struct {
*gateway.GuildCreateEvent
*Base
}
// GuildReadyEvent is a situation-specific GuildCreate event.
// It gets fired during Ready for all available guilds.
// Additionally, it gets fired for all those guilds that become available after
// initially connecting, but were not during Ready.
type GuildReadyEvent struct {
*GuildCreateEvent
}
// GuildAvailableEvent is a situation-specific GuildCreate event.
// It gets fired when a guild becomes available, after getting marked
// unavailable during a GuildUnavailableEvent event.
// This event will not be fired for guilds that were already unavailable when
// initially connecting.
type GuildAvailableEvent struct {
*GuildCreateEvent
}
// GuildJoinEvent is a situation-specific GuildCreate event.
// It gets fired when the user/bot joins a guild.
type GuildJoinEvent struct {
*GuildCreateEvent
}
// https://discord.com/developers/docs/topics/gateway#guild-update
//
// Note that this event will not be sent in Base and All handlers.
// Instead, the situation-specific sub-events will be sent.
type GuildUpdateEvent struct {
*gateway.GuildUpdateEvent
*Base
Old *discord.Guild
}
// https://discord.com/developers/docs/topics/gateway#guild-delete
//
// Note that this event will not be sent in Base and All handlers.
// Instead, the situation-specific sub-events will be sent.
type GuildDeleteEvent struct {
*gateway.GuildDeleteEvent
*Base
Old *discord.Guild
}
// GuildLeaveEvent is a situation-specific GuildDeleteEvent event.
// It gets fired when the user/bot leaves guild, gets kicked/banned from it, or
// the owner deletes it.
type GuildLeaveEvent struct {
*GuildDeleteEvent
}
// GuildUnavailableEvent is a situation-specific GuildDeleteEvent event.
// It gets fired if the guild becomes unavailable, e.g. through a discord
// outage.
type GuildUnavailableEvent struct {
*GuildDeleteEvent
}
// https://discord.com/developers/docs/topics/gateway#guild-ban-add
type GuildBanAddEvent struct {
*gateway.GuildBanAddEvent
*Base
}
// https://discord.com/developers/docs/topics/gateway#guild-ban-remove
type GuildBanRemoveEvent struct {
*gateway.GuildBanRemoveEvent
*Base
}
// https://discord.com/developers/docs/topics/gateway#guild-emojis-update
type GuildEmojisUpdateEvent struct {
*gateway.GuildEmojisUpdateEvent
*Base
Old []discord.Emoji
}
// https://discord.com/developers/docs/topics/gateway#guild-integrations-update
type GuildIntegrationsUpdateEvent struct {
*gateway.GuildIntegrationsUpdateEvent
*Base
}
// https://discord.com/developers/docs/topics/gateway#guild-member-add
type GuildMemberAddEvent struct {
*gateway.GuildMemberAddEvent
*Base
}
// https://discord.com/developers/docs/topics/gateway#guild-member-remove
type GuildMemberRemoveEvent struct {
*gateway.GuildMemberRemoveEvent
*Base
Old *discord.Member
}
// https://discord.com/developers/docs/topics/gateway#guild-member-update
type GuildMemberUpdateEvent struct {
*gateway.GuildMemberUpdateEvent
*Base
Old *discord.Member
}
// https://discord.com/developers/docs/topics/gateway#guild-members-chunk
type GuildMembersChunkEvent struct {
*gateway.GuildMembersChunkEvent
*Base
}
// https://discord.com/developers/docs/topics/gateway#guild-role-create
type GuildRoleCreateEvent struct {
*gateway.GuildRoleCreateEvent
*Base
}
// https://discord.com/developers/docs/topics/gateway#guild-role-update
type GuildRoleUpdateEvent struct {
*gateway.GuildRoleUpdateEvent
*Base
Old *discord.Role
}
// https://discord.com/developers/docs/topics/gateway#guild-role-delete
type GuildRoleDeleteEvent struct {
*gateway.GuildRoleDeleteEvent
*Base
Old *discord.Role
}