feat: initialized bot
This commit is contained in:
parent
9af1f9088a
commit
2fb4842994
7 changed files with 2083 additions and 2 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -107,3 +107,7 @@ dist
|
||||||
# Stores VSCode versions used for testing VSCode extensions
|
# Stores VSCode versions used for testing VSCode extensions
|
||||||
.vscode-test
|
.vscode-test
|
||||||
|
|
||||||
|
# Config Files
|
||||||
|
src/config/*
|
||||||
|
build/*
|
||||||
|
|
||||||
|
|
2024
package-lock.json
generated
Normal file
2024
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
22
package.json
22
package.json
|
@ -2,8 +2,26 @@
|
||||||
"name": "lifeguard",
|
"name": "lifeguard",
|
||||||
"version": "0.0.1-alpha",
|
"version": "0.0.1-alpha",
|
||||||
"description": "Lifeguard Bot",
|
"description": "Lifeguard Bot",
|
||||||
"main": "dist/bot.js",
|
"main": "build/src/index.js",
|
||||||
"repository": "https://gitdab.com/lifeguard/bot.git",
|
"repository": "https://gitdab.com/lifeguard/bot.git",
|
||||||
"author": "Rauf",
|
"author": "Rauf",
|
||||||
"license": "MIT"
|
"license": "MIT",
|
||||||
|
"devDependencies": {
|
||||||
|
"gts": "^1.1.2",
|
||||||
|
"typescript": "~3.7.0",
|
||||||
|
"@types/node": "^10.0.3"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"check": "gts check",
|
||||||
|
"clean": "gts clean",
|
||||||
|
"compile": "tsc -p .",
|
||||||
|
"watch": "tsc -w -p .",
|
||||||
|
"fix": "gts fix",
|
||||||
|
"prepare": "npm.cmd run compile",
|
||||||
|
"pretest": "npm.cmd run compile",
|
||||||
|
"posttest": "npm.cmd run check"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"discord.js": "^11.5.1"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
4
prettier.config.js
Normal file
4
prettier.config.js
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
module.exports = {
|
||||||
|
singleQuote: true,
|
||||||
|
trailingComma: 'es5',
|
||||||
|
};
|
12
src/index.ts
Normal file
12
src/index.ts
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
import { Client } from 'discord.js';
|
||||||
|
import { token } from './config/bot';
|
||||||
|
|
||||||
|
const lifeguard = new Client();
|
||||||
|
|
||||||
|
lifeguard
|
||||||
|
.login(token)
|
||||||
|
.then(_ =>
|
||||||
|
console.log(
|
||||||
|
`Logged in to ${lifeguard.user.username}#${lifeguard.user.discriminator}`
|
||||||
|
)
|
||||||
|
);
|
11
tsconfig.json
Normal file
11
tsconfig.json
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
"extends": "./node_modules/gts/tsconfig-google.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"rootDir": ".",
|
||||||
|
"outDir": "build"
|
||||||
|
},
|
||||||
|
"include": [
|
||||||
|
"src/**/*.ts",
|
||||||
|
"test/**/*.ts"
|
||||||
|
]
|
||||||
|
}
|
8
tslint.json
Normal file
8
tslint.json
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"extends": "gts/tslint.json",
|
||||||
|
"linterOptions": {
|
||||||
|
"exclude": [
|
||||||
|
"**/*.json"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue