first commit; for some reason tsc spits out an error about some module, seems to work fine regardless
This commit is contained in:
commit
f9ef87c1e6
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
/build/
|
||||||
|
/config.ts
|
||||||
|
/node_modules/
|
||||||
|
/package-lock.json
|
7
README
Normal file
7
README
Normal 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
7
TEMPLATE_config.ts
Normal 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
19
package.json
Normal 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
14
src/index.ts
Normal 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
16
tsconfig.json
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
{
|
||||||
|
"compilerOptions":
|
||||||
|
{
|
||||||
|
"target": "es2020",
|
||||||
|
"module": "commonjs",
|
||||||
|
"outDir": "build/",
|
||||||
|
"esModuleInterop": true,
|
||||||
|
"strict": true
|
||||||
|
},
|
||||||
|
|
||||||
|
"include":
|
||||||
|
[
|
||||||
|
"src/**/*",
|
||||||
|
"config.json"
|
||||||
|
]
|
||||||
|
}
|
Loading…
Reference in a new issue