Changed class format to BaseClass

This commit is contained in:
ION606
2023-04-07 20:12:16 -04:00
parent e6b32cc115
commit b6d35c8e55
11 changed files with 97 additions and 227 deletions
+4 -4
View File
@@ -9,7 +9,7 @@ import Guild from '../guilds/Guild.js';
* @param {Object} msg
* @returns {Promise<Boolean>}
*/
export default async function handleEvents(msgObj, token, id) {
export default async function handleEvents(msgObj, token, client) {
return new Promise((resolve, reject) => {
const op = msgObj["op"];
const t = msgObj["t"];
@@ -23,16 +23,16 @@ export default async function handleEvents(msgObj, token, id) {
break;
case gateWayEvents.MessageCreate:
const msg = new message(msgObj["d"], token);
const msg = new message(msgObj["d"], client);
resolve({op: op, t: t, message: msg});
break;
case gateWayEvents.InteractionCreate:
resolve({op: op, t: t, interaction: new Interaction(msgObj["d"], token, id)});
resolve({op: op, t: t, interaction: new Interaction(msgObj["d"], client)});
break;
case gateWayEvents.GuildCreate:
resolve({op: op, t: t, guild: new Guild(msgObj["d"], token)});
resolve({op: op, t: t, guild: new Guild(msgObj["d"], client)});
break;
case gateWayEvents.ThreadCreate: