Skip to content

Commit d7dd536

Browse files
committed
Updated API Version
Created Constants Completed EventListener
1 parent 80f7cb9 commit d7dd536

File tree

9 files changed

+524
-109
lines changed

9 files changed

+524
-109
lines changed

.idea/dbnavigator.xml

Lines changed: 4 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/discord.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/php.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 210 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -96,98 +96,280 @@ class Ourted extends Bot
9696

9797
class EventListener extends \Ourted\Model\EventListener\EventListener
9898
{
99-
# Guild
99+
100+
/* GUILDS (1<<0) */
101+
102+
/**
103+
* @param mixed $json
104+
* @param Bot $bot
105+
*/
100106
public function onGuildCreate($json, $bot)
101107
{
102108

103109
}
110+
/**
111+
* @param mixed $json
112+
* @param Bot $bot
113+
*/
114+
public function onGuildDelete($json, $bot)
115+
{
104116

117+
}
118+
/**
119+
* @param mixed $json
120+
* @param Bot $bot
121+
*/
105122
public function onGuildUpdate($json, $bot)
106123
{
107124

108125
}
109-
110-
public function onGuildDelete($json, $bot)
126+
/**
127+
* @param mixed $json
128+
* @param Bot $bot
129+
*/
130+
public function onGuildRoleCreate($json, $bot)
111131
{
112132

113133
}
134+
/**
135+
* @param mixed $json
136+
* @param Bot $bot
137+
*/
138+
public function onGuildRoleUpdate($json, $bot)
139+
{
114140

115-
# Member
116-
public function onGuildMemberAdd($json, $bot)
141+
}
142+
/**
143+
* @param mixed $json
144+
* @param Bot $bot
145+
*/
146+
public function onGuildRoleDelete($json, $bot)
117147
{
118148

119149
}
150+
/**
151+
* @param mixed $json
152+
* @param Bot $bot
153+
*/
154+
public function onChannelCreate($json, $bot)
155+
{
120156

121-
public function onGuildMemberUpdate($json, $bot)
157+
}
158+
/**
159+
* @param mixed $json
160+
* @param Bot $bot
161+
*/
162+
public function onChannelUpdate($json, $bot)
122163
{
123164

124165
}
166+
/**
167+
* @param mixed $json
168+
* @param Bot $bot
169+
*/
170+
public function onChannelDelete($json, $bot)
171+
{
125172

126-
public function onGuildMemberDelete($json, $bot)
173+
}
174+
/**
175+
* @param mixed $json
176+
* @param Bot $bot
177+
*/
178+
public function onChannelPinsUpdate($json, $bot)
127179
{
128180

129181
}
130182

131-
# Channel
132-
public function onChannelCreate($json, $bot)
183+
/* GUILD_MEMBERS (1<<0) */
184+
/**
185+
* @param mixed $json
186+
* @param Bot $bot
187+
*/
188+
public function onGuildMemberAdd($json, $bot)
133189
{
134190

135191
}
192+
/**
193+
* @param mixed $json
194+
* @param Bot $bot
195+
*/
196+
public function onGuildMemberUpdate($json, $bot)
197+
{
136198

137-
public function onChannelUpdate($json, $bot)
199+
}
200+
/**
201+
* @param mixed $json
202+
* @param Bot $bot
203+
*/
204+
public function onGuildMemberDelete($json, $bot)
138205
{
139206

140207
}
141208

142-
public function onChannelDelete($json, $bot)
209+
210+
/* GUILD_BANS (1<<2) */
211+
/**
212+
* @param mixed $json
213+
* @param Bot $bot
214+
*/
215+
public function onGuildBanAdd($json, $bot)
143216
{
144217

145218
}
219+
/**
220+
* @param mixed $json
221+
* @param Bot $bot
222+
*/
223+
public function onGuildBanRemove($json, $bot)
224+
{
146225

147-
public function onChannelPinsUpdate($json, $bot)
226+
}
227+
228+
/* GUILD_EMOJIS (1<<3) */
229+
/**
230+
* @param mixed $json
231+
* @param Bot $bot
232+
*/
233+
public function onGuildEmojisUpdate($json, $bot)
148234
{
149235

150236
}
151237

238+
/* GUILD_INTEGRATIONS (1<<3) */
239+
/**
240+
* @param mixed $json
241+
* @param Bot $bot
242+
*/
243+
public function onGuildIntegrationsUpdate($json, $bot)
244+
{
245+
246+
}
247+
248+
/* GUILD_WEBHOOKS (1 << 5) */
249+
/**
250+
* @param mixed $json
251+
* @param Bot $bot
252+
*/
253+
public function onWebhooksUpdate($json, $bot)
254+
{
152255

256+
}
257+
258+
/* GUILD_INVITES (1 << 6) */
259+
/**
260+
* @param mixed $json
261+
* @param Bot $bot
262+
*/
263+
public function onInviteCreate($json, $bot)
264+
{
153265

266+
}
267+
/**
268+
* @param mixed $json
269+
* @param Bot $bot
270+
*/
271+
public function onInviteDelete($json, $bot)
272+
{
154273

274+
}
275+
276+
/* GUILD_VOICE_STATES (1 << 7) */
277+
/**
278+
* @param mixed $json
279+
* @param Bot $bot
280+
*/
281+
public function onVoiceStateUpdate($json, $bot)
282+
{
155283

284+
}
156285

157-
# Role
158-
public function onGuildRoleCreate($json, $bot)
286+
/* GUILD_PRESENCES (1 << 8) */
287+
/**
288+
* @param mixed $json
289+
* @param Bot $bot
290+
*/
291+
public function onPresenceUpdate($json, $bot)
159292
{
160293

161294
}
295+
296+
/* GUILD_MESSAGES (1 << 9) */
297+
/**
298+
* @param mixed $json
299+
* @param Bot $bot
300+
*/
301+
public function onMessageCreate($json, $bot)
302+
{
162303

163-
public function onGuildRoleUpdate($json, $bot)
304+
}
305+
/**
306+
* @param mixed $json
307+
* @param Bot $bot
308+
*/
309+
public function onMessageUpdate($json, $bot)
164310
{
165311

166312
}
313+
/**
314+
* @param mixed $json
315+
* @param Bot $bot
316+
*/
317+
public function onMessageDelete($json, $bot)
318+
{
167319

168-
public function onGuildRoleDelete($json, $bot)
320+
}
321+
/**
322+
* @param mixed $json
323+
* @param Bot $bot
324+
*/
325+
public function onMessageDeleteBulk($json, $bot)
169326
{
170327

171328
}
172329

173-
#Message
330+
/* -GUILD_MESSAGE_REACTIONS (1 << 10) */
331+
/**
332+
* @param mixed $json
333+
* @param Bot $bot
334+
*/
335+
public function onMessageReactionAdd($json, $bot)
336+
{
174337

175-
public function onMessageCreate($json, $bot)
338+
}
339+
/**
340+
* @param mixed $json
341+
* @param Bot $bot
342+
*/
343+
public function onMessageReactionRemove($json, $bot)
344+
{
345+
346+
}
347+
/**
348+
* @param mixed $json
349+
* @param Bot $bot
350+
*/
351+
public function onMessageReactionRemoveAll($json, $bot)
176352
{
177-
/*
178-
Content: $json->content
179-
Author Username: $json->author->username
180-
Author Discriminator: $json->author->discriminator
181-
Author ID: $json->author->id
182-
*/
183353

184-
if(isset($json->author->bot)){
185-
return;
186-
}
187-
$this->channel->sendMessage("Message Sent! By: <@{$json->author->id}>, Content: {$json->content}", $json->channel_id);
188354
}
355+
/**
356+
* @param mixed $json
357+
* @param Bot $bot
358+
*/
359+
public function onMessageReactionRemoveEmoji($json, $bot)
360+
{
189361

362+
}
363+
364+
/* GUILD_MESSAGE_TYPING (1 << 11) */
365+
/**
366+
* @param mixed $json
367+
* @param Bot $bot
368+
*/
369+
public function onTypingStart($json, $bot)
370+
{
190371

372+
}
191373
}
192374

193375
new Ourted();

0 commit comments

Comments
 (0)