Skip to content

Commit

Permalink
Switch to slash-create
Browse files Browse the repository at this point in the history
  • Loading branch information
rjt-rockx committed Jun 10, 2022
1 parent 108eae2 commit 8ab5957
Show file tree
Hide file tree
Showing 13 changed files with 1,384 additions and 209 deletions.
82 changes: 82 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 1,82 @@
{
"env": {
"commonjs": true,
"es6": true,
"node": true
},
"extends": [
"eslint:recommended"
],
"globals": {
"NodeJS": true,
"BigInt": true
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 11,
"sourceType": "module"
},
"plugins": [
"@typescript-eslint"
],
"rules": {
"no-cond-assign": [
2,
"except-parens"
],
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": 1,
"no-empty": [
"error",
{
"allowEmptyCatch": true
}
],
"prefer-const": [
"warn",
{
"destructuring": "all"
}
],
"spaced-comment": "warn",
"no-console": "off",
"no-constant-condition": "off",
"indent": [
"error",
"tab",
{
"SwitchCase": 1
}
],
"no-empty-pattern": "off",
"quotes": [
"error",
"double"
],
"linebreak-style": "off",
"semi": [
"error",
"always"
],
"comma-dangle": [
"error",
"never"
],
"no-return-await": "warn",
"no-unneeded-ternary": "warn",
"object-shorthand": [
"warn",
"always"
],
},
"overrides": [
{
"files": [
"slash-up.config.js"
],
"env": {
"node": true
}
}
]
}
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -129,3 129,9 @@ dist
.yarn/install-state.gz
.pnp.*
config.json

# Miscellaneous
.tmp/
.vscode/
.env
dist/
5 changes: 3 additions & 2 deletions env.d.ts
Original file line number Diff line number Diff line change
@@ -1,9 1,10 @@
declare global {
namespace NodeJS {
interface ProcessEnv {
DISCORD_APP_ID: string;
DISCORD_BOT_TOKEN: string;
DISCORD_DEVELOPMENT_GUILD_ID: string;
HYPERBEAM_API_KEY: string;
BOT_TOKEN: string;
BOT_CLIENT_ID: string;
}
}
}
Expand Down
36 changes: 19 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,27 1,29 @@
{
"name": "hyperbeam-discord-bot",
"version": "1.0.0",
"description": "",
"main": "index.js",
"type": "module",
"description": "A template for slash-create",
"main": "dist/index.js",
"license": "MIT",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "npx ts-node --esm src/index.ts",
"deploy-commands": "npx ts-node --esm src/deploy-commands.ts"
"sync": "slash-up sync",
"sync:dev": "slash-up sync -e development",
"start": "cd dist && node index.js",
"build": "npx tsc",
"lint": "npx eslint --ext .ts ./src",
"lint:fix": "npx eslint --ext .ts ./src --fix"
},
"author": "",
"license": "MIT",
"dependencies": {
"@discordjs/builders": "^0.13.0",
"@discordjs/rest": "^0.4.1",
"discord-api-types": "^0.33.2",
"discord.js": "^13.7.0",
"discord.js": "^13.8.0",
"dotenv": "^16.0.1",
"node-fetch": "^3.2.5"
"slash-create": "^5.6.1"
},
"devDependencies": {
"@types/node": "^17.0.39",
"ts-node": "^10.8.1",
"typescript": "^4.7.2"
"@types/express": "^4.17.13",
"@types/node": "^17.0.41",
"@typescript-eslint/eslint-plugin": "^5.27.1",
"@typescript-eslint/parser": "^5.27.1",
"eslint": "^8.17.0",
"slash-up": "^1.1.2",
"typescript": "^4.7.3"
}
}
}
9 changes: 9 additions & 0 deletions pm2.json
Original file line number Diff line number Diff line change
@@ -0,0 1,9 @@
{
"apps": [
{
"name": "slash-commands",
"script": "node",
"args": "dist/index.js"
}
]
}
Loading

0 comments on commit 8ab5957

Please sign in to comment.