initial commit

This commit is contained in:
2022-11-11 22:27:09 -03:00
commit 8e5fcb4be9
6 changed files with 95 additions and 0 deletions

55
.eslintrc.json Normal file
View File

@@ -0,0 +1,55 @@
{
"extends": "eslint:recommended",
"env": {
"node": true,
"es6": true
},
"parserOptions": {
"ecmaVersion": 2021
},
"rules": {
"arrow-spacing": ["warn", { "before": true, "after": true }],
"brace-style": ["error", "stroustrup", { "allowSingleLine": true }],
"comma-dangle": ["error", "always-multiline"],
"comma-spacing": "error",
"comma-style": "error",
"curly": ["error", "multi-line", "consistent"],
"dot-location": ["error", "property"],
"handle-callback-err": "off",
"indent": ["error", "tab"],
"keyword-spacing": "error",
"max-nested-callbacks": ["error", { "max": 4 }],
"max-statements-per-line": ["error", { "max": 2 }],
"no-console": "off",
"no-empty-function": "error",
"no-floating-decimal": "error",
"no-inline-comments": "error",
"no-lonely-if": "error",
"no-multi-spaces": "error",
"no-multiple-empty-lines": [
"error",
{ "max": 2, "maxEOF": 1, "maxBOF": 0 }
],
"no-shadow": ["error", { "allow": ["err", "resolve", "reject"] }],
"no-trailing-spaces": ["error"],
"no-var": "error",
"object-curly-spacing": ["error", "always"],
"prefer-const": "error",
"quotes": ["error", "single"],
"semi": ["error", "always"],
"space-before-blocks": "error",
"space-before-function-paren": [
"error",
{
"anonymous": "never",
"named": "never",
"asyncArrow": "always"
}
],
"space-in-parens": "error",
"space-infix-ops": "error",
"space-unary-ops": "error",
"spaced-comment": "error",
"yoda": "error"
}
}

3
.gitignore vendored Normal file
View File

@@ -0,0 +1,3 @@
node_modules
yarn.lock
.env

1
.nvmrc Normal file
View File

@@ -0,0 +1 @@
v18.12.1

4
.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,4 @@
{
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
"editor.formatOnSave": true
}

12
app.js Normal file
View File

@@ -0,0 +1,12 @@
const { GatewayIntentBits } = require('discord.js');
const Discord = require('discord.js');
require('dotenv').config();
const client = new Discord.Client({ intents: [GatewayIntentBits.Guilds] });
client.on('ready', () => {
console.log('working');
console.log(client.user);
});
client.login(process.env.BOT_TOKEN);

20
package.json Normal file
View File

@@ -0,0 +1,20 @@
{
"scripts": {
"start": "node app.js",
"dev": "nodemon app.js"
},
"dependencies": {
"discord.js": "^14.6.0",
"dotenv": "^16.0.3"
},
"name": "shopping-discord-bot",
"version": "1.0.0",
"main": "app.js",
"repository": "https://github.com/FranP-code/shopping-discord-bot",
"author": "Francisco Pessano <franpessano1@gmail.com>",
"license": "MIT",
"devDependencies": {
"eslint": "^8.27.0",
"nodemon": "^2.0.20"
}
}