Skip to content

Commit

Permalink
fixes some shit
Browse files Browse the repository at this point in the history
  • Loading branch information
raluvy95 committed Oct 5, 2024
1 parent 4330e38 commit 8263e37
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
4 changes: 1 addition & 3 deletions src/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,7 @@ class Mov extends CommandClient {
}

const userPref = await this.database.user.get<IUserDB>(msg.author.id);
const e = await this.checkPrefixMod(msg)
console.log(e)
if ((msg.prefix as any) = e) {
if ((msg.prefix as any) = await this.checkPrefixMod(msg)) {
this.commandHandler(msg, userPref || undefined);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/commands/level/migrate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ async function generator(msg: Message, args: string[]) {
if (!userId || !xp || !totalXP || !level) {
client.createMessage(
msg.channel.id,
`Usage: \`${msg.prefix}${msg.command} <userid> <xp> <totalXP> <level>\``,
`Usage: \`${msg.prefix}migrate <userid> <xp> <totalXP> <level>\``,
);
return;
}
Expand Down
4 changes: 2 additions & 2 deletions src/commands/level/nukeleaderboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ function generator(msg: Message, _args: string[]) {
});
client.createMessage(
msg.channel.id,
`Are you sure to nuke the leaderboard? **THIS ACTION CANNOT BE REVERTED**\nPlease type \`${id}\` to confirm!`,
`Are you sure you want to nuke the leaderboard? **THIS ACTION CANNOT BE REVERTED**\nPlease type \`${id}\` to confirm!`,
);
collector.on("end", (c) => {
const msg = c[0];
if (msg.content === id) {
client.database.level.deleteAll();
client.createMessage(msg.channel.id, "NUKED!");
client.createMessage(msg.channel.id, "**NUKED!** If you actually changed your mind, there's no way to restore it. Sorry about that.");
} else {
client.createMessage(msg.channel.id, "Ok, cancelled.");
}
Expand Down
2 changes: 1 addition & 1 deletion src/utils/debug.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { dateToString } from "./dateToString";

export function debug(...info: any[]) {
if (process.env.DEBUG) {
if (Number(process.env.DEBUG)) {
const date = new Date();
console.debug(
`[DEBUG - ${dateToString(date, {
Expand Down

0 comments on commit 8263e37

Please sign in to comment.