Skip to content
This repository has been archived by the owner on Jul 15, 2024. It is now read-only.

Commit

Permalink
feat(GuildCreateListener): use json stringify
Browse files Browse the repository at this point in the history
  • Loading branch information
Hazmi35 committed Feb 20, 2024
1 parent dd60983 commit 722ddf8
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export class GuildCreateListener extends Listener {
for (const role of payload.data.d.roles) {
if (ops.length >= 500 || ops.length > 0) {
this.logger.debug({ ops: ops.length }, "Executing SQL");
this.logger.debug(ops.join(";").toString(), "Executed SQL");
this.logger.debug(JSON.stringify(ops.join(";")));
await this.store.drizzle.execute(sql`${ops.join(";")}`);
ops = [];
}
Expand Down Expand Up @@ -140,7 +140,7 @@ export class GuildCreateListener extends Listener {
if (member.user !== undefined) {
if (ops.length >= 500 || ops.length > 0) {
this.logger.debug({ ops: ops.length }, "Executing SQL");
this.logger.debug(ops.join(";").toString(), "Executed SQL");
this.logger.debug(JSON.stringify(ops.join(";")));
await this.store.drizzle.execute(sql`${ops.join(";")}`);
ops = [];
}
Expand Down Expand Up @@ -180,7 +180,7 @@ export class GuildCreateListener extends Listener {
if (member.user !== undefined) {
if (ops.length >= 500 || ops.length > 0) {
this.logger.debug({ ops: ops.length }, "Executing SQL");
this.logger.debug(ops.join(";").toString(), "Executed SQL");
this.logger.debug(JSON.stringify(ops.join(";")));
await this.store.drizzle.execute(sql`${ops.join(";")}`);
ops = [];
}
Expand Down Expand Up @@ -233,7 +233,7 @@ export class GuildCreateListener extends Listener {
for (const channel of payload.data.d.channels) {
if (ops.length >= 500 || ops.length > 0) {
this.logger.debug({ ops: ops.length }, "Executing SQL");
this.logger.debug(ops.join(";").toString(), "Executed SQL");
this.logger.debug(JSON.stringify(ops.join(";")));
await this.store.drizzle.execute(sql`${ops.join(";")}`);
ops = [];
}
Expand Down Expand Up @@ -272,7 +272,7 @@ export class GuildCreateListener extends Listener {

if (ops.length >= 500 || ops.length > 0) {
this.logger.debug({ ops: ops.length }, "Executing SQL");
this.logger.debug(ops.join(";").toString(), "Executed SQL");
this.logger.debug(JSON.stringify(ops.join(";")));
await this.store.drizzle.execute(sql`${ops.join(";")}`);
ops = [];
}
Expand Down

0 comments on commit 722ddf8

Please sign in to comment.