Skip to content

Commit 197908f

Browse files
committed
update strife and djs
Signed-off-by: RedGuy12 <paul@reid-family.org>
1 parent e248826 commit 197908f

File tree

6 files changed

+245
-1167
lines changed

6 files changed

+245
-1167
lines changed

common/logError.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { inlineCode, Message } from "discord.js";
1+
import { inlineCode, Message, type RepliableInteraction } from "discord.js";
22
import { serializeError } from "serialize-error";
33

44
import log, { LoggingErrorEmoji } from "../modules/logging/misc.js";
@@ -19,15 +19,21 @@ process
1919
*/
2020
export default async function logError(
2121
error: any,
22-
event: string,
22+
event: string | RepliableInteraction,
2323
): Promise<Message<true> | undefined> {
2424
try {
2525
console.error(error);
2626
if (error && ["DeprecationWarning", "ExperimentalWarning"].includes(error.name)) return;
2727

2828
return await log(
2929
`${LoggingErrorEmoji} **${error.name}** occurred in ${
30-
event.startsWith("<") && event.endsWith(">") ? event : inlineCode(event)
30+
typeof event == "string"
31+
? inlineCode(event)
32+
: event.isChatInputCommand()
33+
? event.toString()
34+
: event.isCommand()
35+
? `/${event.command?.name}`
36+
: `${event.constructor.name}: ${event.customId}`
3137
}`,
3238
"server",
3339
{ files: [{ content: generateError(error), extension: "json" }] },

index.ts

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,24 @@ await login({
2222
await logError(error, event);
2323
},
2424
productionId: constants.users.scradd,
25-
intents: [
26-
GatewayIntentBits.Guilds,
27-
GatewayIntentBits.GuildMembers,
28-
GatewayIntentBits.GuildModeration,
29-
GatewayIntentBits.GuildEmojisAndStickers,
30-
GatewayIntentBits.GuildWebhooks,
31-
GatewayIntentBits.GuildInvites,
32-
GatewayIntentBits.GuildVoiceStates,
33-
GatewayIntentBits.GuildPresences,
34-
GatewayIntentBits.GuildMessages,
35-
GatewayIntentBits.GuildMessageReactions,
36-
GatewayIntentBits.DirectMessages,
37-
GatewayIntentBits.MessageContent,
38-
GatewayIntentBits.GuildScheduledEvents,
39-
],
25+
clientOptions: {
26+
intents: [
27+
GatewayIntentBits.Guilds,
28+
GatewayIntentBits.GuildMembers,
29+
GatewayIntentBits.GuildModeration,
30+
GatewayIntentBits.GuildEmojisAndStickers,
31+
GatewayIntentBits.GuildWebhooks,
32+
GatewayIntentBits.GuildInvites,
33+
GatewayIntentBits.GuildVoiceStates,
34+
GatewayIntentBits.GuildPresences,
35+
GatewayIntentBits.GuildMessages,
36+
GatewayIntentBits.GuildMessageReactions,
37+
GatewayIntentBits.DirectMessages,
38+
GatewayIntentBits.MessageContent,
39+
GatewayIntentBits.GuildScheduledEvents,
40+
],
41+
presence: { status: "dnd" },
42+
},
4043
commandErrorMessage: `${constants.emojis.statuses.no} An error occurred.`,
4144
});
4245

modules/games/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ defineCommand(
2525
description: "The difficulty",
2626
type: ApplicationCommandOptionType.String,
2727
choices: {
28-
"Easy (2 matches per emoji)": "Easy",
29-
"Traditional (1 match per emoji)": "Traditional",
28+
Easy: "Easy (2 matches per emoji)",
29+
Traditional: "Traditional (1 match per emoji)",
3030
},
3131
},
3232
},

modules/xp/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ defineCommand(
3838
},
3939

4040
top: {
41-
description: "View all users sorted by how much XP they have",
41+
description: "View the server XP leaderboard",
4242

4343
options: {
4444
user: {

0 commit comments

Comments
 (0)