Skip to content

Commit 787a3d4

Browse files
authored
Improve the build, remove unused dependencies (#103)
1 parent cc16c6d commit 787a3d4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+490
-4221
lines changed

.github/workflows/node.js.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- name: Setup node
2424
uses: actions/setup-node@v4
2525
with:
26-
node-version: 20
26+
node-version: 22
2727

2828
- run: npm ci
2929

@@ -40,7 +40,7 @@ jobs:
4040
- name: Setup node
4141
uses: actions/setup-node@v4
4242
with:
43-
node-version: 20
43+
node-version: 22
4444

4545
- run: npm ci
4646

@@ -57,7 +57,7 @@ jobs:
5757
- name: Setup node
5858
uses: actions/setup-node@v4
5959
with:
60-
node-version: 20
60+
node-version: 22
6161

6262
- run: npm ci
6363

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v22.12.0

app/commands/convene.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ import type {
99
} from "discord.js";
1010
import { ApplicationCommandType } from "discord-api-types/v10";
1111

12-
import { reacord } from "~/discord/client.server";
13-
import { quoteAndEscape } from "~/helpers/discord";
14-
import { ReportReasons, reportUser } from "~/helpers/modLog";
15-
import { resolutions } from "~/helpers/modResponse";
12+
import { reacord } from "#~/discord/client.server";
13+
import { quoteAndEscape } from "#~/helpers/discord";
14+
import { ReportReasons, reportUser } from "#~/helpers/modLog";
15+
import { resolutions } from "#~/helpers/modResponse";
1616

17-
import { fetchSettings, SETTINGS } from "~/models/guilds.server";
18-
import { applyRestriction, ban, kick, timeout } from "~/models/discord.server";
19-
import { ModResponse } from "~/commands/reacord/ModResponse";
17+
import { fetchSettings, SETTINGS } from "#~/models/guilds.server";
18+
import { applyRestriction, ban, kick, timeout } from "#~/models/discord.server";
19+
import { ModResponse } from "#~/commands/reacord/ModResponse";
2020

2121
export const command = new ContextMenuCommandBuilder()
2222
.setName("Convene mods")

app/commands/reacord/ModResponse.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import type { ComponentEventUser } from "reacord";
22
import { Button } from "reacord";
33

4-
import type { Resolution } from "~/helpers/modResponse";
4+
import type { Resolution } from "#~/helpers/modResponse";
55
import {
66
humanReadableResolutions,
77
resolutions,
88
useVotes,
9-
} from "~/helpers/modResponse";
9+
} from "#~/helpers/modResponse";
1010

1111
const VOTES_TO_APPROVE = 3;
1212

app/commands/report.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { MessageContextMenuCommandInteraction } from "discord.js";
22
import { PermissionFlagsBits, ContextMenuCommandBuilder } from "discord.js";
33
import { ApplicationCommandType } from "discord-api-types/v10";
4-
import { ReportReasons, reportUser } from "~/helpers/modLog";
4+
import { ReportReasons, reportUser } from "#~/helpers/modLog";
55

66
export const command = new ContextMenuCommandBuilder()
77
.setName("Report")

app/commands/setup.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { ChatInputCommandInteraction } from "discord.js";
22
import { PermissionFlagsBits, SlashCommandBuilder } from "discord.js";
33

4-
import { SETTINGS, setSettings, registerGuild } from "~/models/guilds.server";
4+
import { SETTINGS, setSettings, registerGuild } from "#~/models/guilds.server";
55

66
export const command = new SlashCommandBuilder()
77
.setName("setup")

app/commands/setupTickets.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@ import {
1515
import { REST } from "@discordjs/rest";
1616
import { Routes, TextInputStyle } from "discord-api-types/v10";
1717

18-
import { discordToken } from "~/helpers/env.server";
19-
import { SETTINGS, fetchSettings } from "~/models/guilds.server";
18+
import { discordToken } from "#~/helpers/env.server";
19+
import { SETTINGS, fetchSettings } from "#~/models/guilds.server";
2020
import { format } from "date-fns";
2121
import type {
2222
AnyCommand,
2323
MessageComponentCommand,
2424
ModalCommand,
2525
SlashCommand,
26-
} from "~/helpers/discord";
27-
import { quoteMessageContent } from "~/helpers/discord";
26+
} from "#~/helpers/discord";
27+
import { quoteMessageContent } from "#~/helpers/discord";
2828

2929
const rest = new REST({ version: "10" }).setToken(discordToken);
3030

app/commands/track.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ import type { MessageContextMenuCommandInteraction } from "discord.js";
22
import { PermissionFlagsBits, ContextMenuCommandBuilder } from "discord.js";
33
import { ApplicationCommandType } from "discord-api-types/v10";
44
import { Button } from "reacord";
5-
import { reacord } from "~/discord/client.server";
5+
import { reacord } from "#~/discord/client.server";
66

7-
import { ReportReasons, reportUser } from "~/helpers/modLog";
7+
import { ReportReasons, reportUser } from "#~/helpers/modLog";
88

99
export const command = new ContextMenuCommandBuilder()
1010
.setName("Track")

app/discord/activityTracker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Events, ChannelType } from "discord.js";
22
import type { Client, Message, PartialMessage, TextChannel } from "discord.js";
3-
import db from "~/db.server";
3+
import db from "#~/db.server";
44

55
export async function startActivityTracking(client: Client) {
66
const channelCache = new Map<string, TextChannel>();

app/discord/api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
import { REST } from "discord.js";
2-
import { discordToken } from "~/helpers/env.server";
2+
import { discordToken } from "#~/helpers/env.server";
33

44
export const rest = new REST({ version: "10" }).setToken(discordToken);

0 commit comments

Comments
 (0)