Skip to content
This repository has been archived by the owner on Sep 29, 2024. It is now read-only.

Commit

Permalink
Added skip and stop endpoint. Starting to try testing with jest, curr…
Browse files Browse the repository at this point in the history
…ently broken
  • Loading branch information
Shiny1708 committed Oct 9, 2023
1 parent e9d7980 commit 19d6cb4
Show file tree
Hide file tree
Showing 10 changed files with 6,250 additions and 1,771 deletions.
3 changes: 2 additions & 1 deletion config.json.example
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
"PRUNING": false,
"LOCALE": "en",
"STAY_TIME": 30,
"DEFAULT_VOLUME": 100
"DEFAULT_VOLUME": 100,
"SERVER_IP": ""
}
15 changes: 2 additions & 13 deletions index.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,6 @@
import { Client, GatewayIntentBits } from "discord.js";
import { Bot } from "./structs/Bot";
import { Request, Response } from 'express';
import express from 'express';

const app = express();
const port = 3000;

app.get('/', (req: Request, res: Response) => {
res.send('Hello World!');
});

app.listen(port, () => {
console.log(`Server is running at ip http://localhost:${port}`);
});
import Server from "./structs/Server";

export const bot = new Bot(
new Client({
Expand All @@ -26,3 +14,4 @@ export const bot = new Bot(
]
})
);
export const server = new Server(3000);
1 change: 1 addition & 0 deletions interfaces/Config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ export interface Config {
STAY_TIME: number;
DEFAULT_VOLUME: number;
LOCALE: string;
SERVER_IP: string;
}
6 changes: 6 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
transform: { "^.+\\.ts?$": "ts-jest" },
testEnvironment: "node",
testRegex: "/tests/.*\\.(test|spec)?\\.(ts|tsx)$",
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"]
};
Loading

0 comments on commit 19d6cb4

Please sign in to comment.