feat: Add deployment guide and update README for Coolify setup; include dotenv for environment variable management
CI-CD / Bot Lint Test Build (push) Failing after 11s
CI-CD / Dashboard Lint Build (push) Successful in 14s
CI-CD / Deploy to Coolify (push) Has been skipped

This commit is contained in:
2026-05-17 17:31:25 +02:00
parent 8041a39dfd
commit f6efd96733
11 changed files with 230 additions and 34 deletions
+4 -1
View File
@@ -1,10 +1,13 @@
import { ChatInputCommandInteraction } from "discord.js";
import { pingCommand } from "../../src/commands/ping";
describe("pingCommand", () => {
it("replies with Pong", async () => {
const reply = jest.fn().mockResolvedValue(undefined);
await pingCommand.execute({ reply } as any);
await pingCommand.execute({
reply,
} as unknown as ChatInputCommandInteraction);
expect(reply).toHaveBeenCalledWith("Pong!");
});
+4 -3
View File
@@ -20,15 +20,16 @@ describe("signUpCommand", () => {
(getTourSchedule as jest.Mock).mockReturnValue(queue);
});
function createInteraction(action: string): any {
function createInteraction(action: string) {
return {
inGuild: () => true,
guildId: "guild-1",
user: { id: "user-1" },
guild: { id: "guild-1" },
memberPermissions: {
has: jest.fn((permission: bigint) =>
permission === PermissionFlagsBits.ManageChannels,
has: jest.fn(
(permission: bigint) =>
permission === PermissionFlagsBits.ManageChannels,
),
},
options: {
@@ -1,3 +1,5 @@
import { GuildMember } from "discord.js";
const mockClient = {
query: jest.fn(),
release: jest.fn(),
@@ -53,7 +55,7 @@ describe("MileageEngine flow", () => {
}),
},
},
} as any;
} as unknown as GuildMember;
const engine = new MileageEngine({
databaseUrl: "postgres://test",
+16 -18
View File
@@ -1,4 +1,4 @@
import { ChannelType } from "discord.js";
import { ChannelType, Guild } from "discord.js";
import { TourScheduleEngine } from "../../src/tour-schedule";
describe("TourScheduleEngine flow", () => {
@@ -15,26 +15,24 @@ describe("TourScheduleEngine flow", () => {
}),
},
channels: {
fetch: jest
.fn()
.mockImplementation(async (channelId: string) => {
if (channelId === "stage-1") {
return {
type: ChannelType.GuildStageVoice,
};
}
fetch: jest.fn().mockImplementation(async (channelId: string) => {
if (channelId === "stage-1") {
return {
type: ChannelType.GuildStageVoice,
};
}
if (channelId === "announce-1") {
return {
isSendable: () => true,
send,
};
}
if (channelId === "announce-1") {
return {
isSendable: () => true,
send,
};
}
return null;
}),
return null;
}),
},
} as any;
} as unknown as Guild;
const engine = new TourScheduleEngine({
stageChannelId: "stage-1",