Skip to content
This repository was archived by the owner on May 15, 2025. It is now read-only.

Commit f036375

Browse files
committed
gonna be honest idk what any of these are
1 parent ac1d6fc commit f036375

File tree

5 files changed

+15
-65
lines changed

5 files changed

+15
-65
lines changed

src/commands/main/data.ts

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,12 @@
1-
// add a leave blank for your own data, only MR can see other peoples database when I figure out subcommands
2-
3-
/* import { SlashCommandBuilder, EmbedBuilder, ChatInputCommandInteraction } from "discord.js";
4-
import mysql from "mysql";
5-
import { KOGBot } from "index.ts";
6-
import { SlashCommand } from "main.d.ts";
7-
import config from "../../config"
8-
9-
const connection = mysql.createConnection({
10-
host: config.database.host,
11-
port: config.database.port,
12-
user: config.database.user,
13-
password: config.database.password,
14-
database: config.database.schema
15-
});
1+
import { SlashCommandBuilder, EmbedBuilder, ChatInputCommandInteraction } from "discord.js";
2+
import { KOGBot } from "index.js";
163

174
class GetDataCommand implements SlashCommand {
185
name = "data";
196
description = "Database command for KOG. ";
20-
subcommands = []; Subcommandds (data change, data add, data check)
7+
subcommands = [];
218
parameters = [];
22-
dev = true; // dev for now
9+
dev = true; // dev for now
2310
kogBot: KOGBot;
2411

2512
constructor(kogBot: KOGBot) {
@@ -77,6 +64,4 @@ class GetDataCommand implements SlashCommand {
7764
}
7865
}
7966

80-
export default GetDataCommand;
81-
82-
*/
67+
export default GetDataCommand;

src/commands/main/event.ts

Lines changed: 0 additions & 8 deletions
This file was deleted.

src/commands/main/log.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* import { SlashCommandBuilder, EmbedBuilder, ChatInputCommandInteraction } from 'discord.js';
1+
import { SlashCommandBuilder, EmbedBuilder, ChatInputCommandInteraction } from 'discord.js';
22
import mysql from 'mysql';
33
import { KOGBot } from 'index.ts';
44
import { SlashCommand } from 'main.d.ts';
@@ -172,6 +172,4 @@ class LogEventCommand implements SlashCommand {
172172
}
173173
}
174174

175-
export default LogEventCommand;
176-
177-
*/
175+
export default LogEventCommand;

src/commands/main/mydata.ts

Lines changed: 3 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,5 @@
1-
/* import { SlashCommandBuilder, EmbedBuilder, ChatInputCommandInteraction } from "discord.js";
2-
import mysql from "mysql";
3-
import { KOGBot } from "index.ts";
4-
import { SlashCommand } from "main.d.ts";
5-
import config from "../../config"
6-
7-
const connection = mysql.createConnection({
8-
host: config.database.host,
9-
port: config.database.port,
10-
user: config.database.user,
11-
password: config.database.password,
12-
database: config.database.schema
13-
});
1+
import { SlashCommandBuilder, EmbedBuilder, ChatInputCommandInteraction } from "discord.js";
2+
import { KOGBot } from "index.js";
143

154
class GetDataCommand implements SlashCommand {
165
name = "mydata";
@@ -29,17 +18,6 @@ class GetDataCommand implements SlashCommand {
2918
const user = interaction.user;
3019
const userId = interaction.user.id; // Needed for DB
3120

32-
connection.query('SELECT * FROM KOGDB WHERE userid = ?', [userId], async (err, results) => {
33-
if (err) {
34-
console.error(err);
35-
const embedError = new EmbedBuilder()
36-
.setColor("#E73A3A")
37-
.setTitle("Database Error")
38-
.setDescription("An error occurred while trying to retrieve your data.");
39-
await interaction.reply({ embeds: [embedError] });
40-
return;
41-
}
42-
4321
if (results.length > 0) {
4422

4523
const { eventsAttended, eventsHosted } = results[0];
@@ -75,6 +53,4 @@ class GetDataCommand implements SlashCommand {
7553
}
7654
}
7755

78-
export default GetDataCommand;
79-
80-
*/
56+
export default GetDataCommand;

src/commands/misc/kill.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
/* import { SlashCommandBuilder, EmbedBuilder, ChatInputCommandInteraction, SlashCommand } from "discord.js";
2-
import { KOGBot } from "index.ts";
1+
import { EmbedBuilder, ChatInputCommandInteraction } from "discord.js";
2+
import { KOGBot } from "index.js";
33

44
class KillCommand implements SlashCommand {
55
name = 'kill';
@@ -18,7 +18,8 @@ class KillCommand implements SlashCommand {
1818

1919
const user = interaction.options.getUser('user');
2020
if (!user) {
21-
return interaction.reply("No user was mentioned. Please mention a user to kill.");
21+
interaction.reply("No user was mentioned. Please mention a user to kill.");
22+
return;
2223
}
2324

2425
const embed = new EmbedBuilder()
@@ -41,6 +42,4 @@ class KillCommand implements SlashCommand {
4142
}
4243
}
4344

44-
export default KillCommand;
45-
46-
*/
45+
export default KillCommand;

0 commit comments

Comments
 (0)