Skip to content

Commit e4f29aa

Browse files
authored
Merge pull request #32 from CougarCS/cleanup
Remove old CougarCoin + attendance tracking commands, fix npm vulns, upgrade typescript, fix all linter errors
2 parents 24245ae + 65f4f1a commit e4f29aa

39 files changed

Lines changed: 1169 additions & 2163 deletions

package-lock.json

Lines changed: 1078 additions & 959 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"prettier:fix": "prettier --write src/**/*.ts"
1414
},
1515
"dependencies": {
16-
"@discordjs/rest": "^1.3.0",
16+
"@discordjs/rest": "^2.6.1",
1717
"@supabase/supabase-js": "^2.8.0",
1818
"discord-api-types": "^0.37.14",
1919
"discord.js": "^14.10.2",
@@ -27,9 +27,9 @@
2727
"@typescript-eslint/parser": "^5.60.1",
2828
"eslint": "^8.25.0",
2929
"prettier": "^2.7.1",
30-
"supabase": "^1.42.2",
30+
"supabase": "^2.102.0",
3131
"ts-node": "^10.9.1",
3232
"ts-node-dev": "^2.0.0",
33-
"typescript": "^4.8.4"
33+
"typescript": "^6.0.3"
3434
}
3535
}

src/commands/admin-commands/cancel-membership.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export const cancelmembership: Command = {
2121
.setRequired(true)
2222
),
2323
run: async (interaction) => {
24-
await interaction.deferReply({ ephemeral: false });
24+
await interaction.deferReply({});
2525
const guild = interaction.guild as Guild;
2626

2727
const selectedUser = interaction.options.get("user", true).user as User;

src/commands/admin-commands/create-contact.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
import { PermissionFlagsBits, SlashCommandBuilder } from "discord.js";
1+
import { PermissionFlagsBits, SlashCommandBuilder,
2+
MessageFlags,
3+
} from "discord.js";
24
import { Command } from "../../interfaces/Command";
35
import { createEmbed } from "../../utils/embeded";
46
import { commandLog, sendError } from "../../utils/logs";
@@ -71,7 +73,7 @@ export const createcontact: Command = {
7173
const ephemeral = !interaction.options.get("reveal", false)?.value as
7274
| boolean;
7375

74-
await interaction.deferReply({ ephemeral });
76+
await interaction.deferReply({ flags: ephemeral ? MessageFlags.Ephemeral : undefined });
7577

7678
const create: ContactInsert = {
7779
uh_id: interaction.options.get("psid", true).value as number,

src/commands/admin-commands/grant-membership.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export const grantmembership: Command = {
4444
.setRequired(true);
4545
}),
4646
run: async (interaction) => {
47-
await interaction.deferReply({ ephemeral: false });
47+
await interaction.deferReply({});
4848

4949
const discord_snowflake = interaction.options.get("user", true).user
5050
?.id as string;

src/commands/admin-commands/update-contact.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
import { PermissionFlagsBits, SlashCommandBuilder } from "discord.js";
1+
import { PermissionFlagsBits, SlashCommandBuilder,
2+
MessageFlags,
3+
} from "discord.js";
24
import { Command } from "../../interfaces/Command";
35
import { createEmbed } from "../../utils/embeded";
46
import { commandLog, sendError } from "../../utils/logs";
@@ -97,7 +99,7 @@ export const updatecontact: Command = {
9799
const ephemeral = !interaction.options.get("reveal", false)?.value as
98100
| boolean;
99101

100-
await interaction.deferReply({ ephemeral });
102+
await interaction.deferReply({ flags: ephemeral ? MessageFlags.Ephemeral : undefined });
101103

102104
const update: ContactUpdate = {
103105
uh_id: interaction.options.get("psid", true).value as number,

src/commands/member-commands/pay.ts

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

src/commands/officer-commands/appoint-tutor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export const appointTutor: Command = {
2626
)
2727
.setDefaultMemberPermissions(PermissionFlagsBits.ManageChannels),
2828
run: async (interaction) => {
29-
await interaction.deferReply({ ephemeral: false });
29+
await interaction.deferReply({});
3030
const guild = interaction.guild as Guild;
3131
const appointedUser = interaction.options.get("user", true).user as User;
3232

src/commands/officer-commands/attendance.ts

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

0 commit comments

Comments
 (0)