first commit; for some reason tsc spits out an error about some module, seems to work fine regardless

This commit is contained in:
loopdelux 2024-02-20 19:05:02 -05:00
commit f9ef87c1e6
6 changed files with 67 additions and 0 deletions

4
.gitignore vendored Normal file
View file

@ -0,0 +1,4 @@
/build/
/config.ts
/node_modules/
/package-lock.json

7
README Normal file
View file

@ -0,0 +1,7 @@
Vanilje - Discord bot targetted at Discordjs v12 (Concordia)
Dependencies:
o Typescript
o Concordia
P/S: I'm a beginner at JS/TS; please excuse me for any poor decisions. Feedback is appreciated.

7
TEMPLATE_config.ts Normal file
View file

@ -0,0 +1,7 @@
/* (TEMPLATE )Bot config file; edit this to your liking */
/* Make sure to rename this to config.ts */
export default
{
token: "X",
owner: "X"
}

19
package.json Normal file
View file

@ -0,0 +1,19 @@
{
"name": "vanilje",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"@types/node": "^20.11.19",
"typescript": "^5.3.3"
},
"dependencies": {
"concordia": "^12.5.5"
}
}

14
src/index.ts Normal file
View file

@ -0,0 +1,14 @@
/* Starting point of the entire program */
import cfg from "../config";
import { ActivityType, Client } from "concordia";
const client = new Client<true>();
function onReady()
{
console.log("Logged in!");
}
client.on("ready", onReady);
client.login(cfg.token);

16
tsconfig.json Normal file
View file

@ -0,0 +1,16 @@
{
"compilerOptions":
{
"target": "es2020",
"module": "commonjs",
"outDir": "build/",
"esModuleInterop": true,
"strict": true
},
"include":
[
"src/**/*",
"config.json"
]
}