You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 15, 2025. It is now read-only.
/* import { SlashCommandBuilder, EmbedBuilder, ChatInputCommandInteraction } from "discord.js";
2
2
import mysql from "mysql";
3
3
import { KOGBot } from "index.ts";
4
-
import{SlashCommand}from"main.d.ts";//
4
+
import { SlashCommand } from "main.d.ts";
5
5
6
6
const allowedroleID = ""; // Set this later when I have perms
7
7
const logchannel = ""; // log channel
8
8
const connection = mysql.createConnection({
9
-
// goes here
9
+
// database connection details
10
10
});
11
11
12
12
class LogEventCommand implements SlashCommand {
13
13
name = "log";
14
14
description = "Logs official events for KOG.";
15
15
subcommands = [];
16
16
parameters = [];
17
-
dev=true;
17
+
dev = true;
18
18
kogBot: KOGBot;
19
19
20
20
constructor(kogBot: KOGBot) {
@@ -35,11 +35,10 @@ class LogEventCommand implements SlashCommand {
35
35
return;
36
36
}
37
37
38
-
39
38
const logStart = new EmbedBuilder()
40
39
.setColor("#9033FF")
41
40
.setTitle("Logging")
42
-
.setDescription("To log an event, please follow the format:\n\n<@user1>,<@user2>,<@user3>...\n\nNames must be separated by commas and must be mentions.")// put peoples names here
41
+
.setDescription("To log an event, please follow the format:\n\n<@user1>,<@user2>,<@user3>...\n\nNames must be separated by commas and must be mentions.")
returninteraction.followUp("Invalid format. Please make sure the names are separated by commas and each name is a mention. Run the command again with the correct format.");
53
+
await interaction.followUp("Invalid format. Please make sure the names are separated by commas and each name is a mention. Run the command again with the correct format.");
54
+
return;
55
55
}
56
56
57
57
if (response?.toLowerCase() === 'cancel') {
58
-
returninteraction.reply(`<@${interaction.user.id}> canceled the event log.`);
58
+
await interaction.reply(`<@${interaction.user.id}> canceled the event log.`);
59
+
return;
59
60
}
60
61
61
62
if (response instanceof Error && response.message === 'time') {
62
-
returninteraction.reply(`<@${interaction.user.id}> you took too long to follow up, please try again.`);
63
+
await interaction.reply(`<@${interaction.user.id}> you took too long to follow up, please try again.`);
0 commit comments