feat: initialized bot

This commit is contained in:
Rauf 2020-01-12 23:10:56 -05:00
parent 9af1f9088a
commit 2fb4842994
7 changed files with 2083 additions and 2 deletions

4
.gitignore vendored
View File

@ -107,3 +107,7 @@ dist
# Stores VSCode versions used for testing VSCode extensions
.vscode-test
# Config Files
src/config/*
build/*

2024
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -2,8 +2,26 @@
"name": "lifeguard",
"version": "0.0.1-alpha",
"description": "Lifeguard Bot",
"main": "dist/bot.js",
"main": "build/src/index.js",
"repository": "https://gitdab.com/lifeguard/bot.git",
"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
View File

@ -0,0 +1,4 @@
module.exports = {
singleQuote: true,
trailingComma: 'es5',
};

12
src/index.ts Normal file
View 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
View 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
View File

@ -0,0 +1,8 @@
{
"extends": "gts/tslint.json",
"linterOptions": {
"exclude": [
"**/*.json"
]
}
}