Skip to content

Commit

Permalink
Merge pull request #10 from facuagueria/main
Browse files Browse the repository at this point in the history
[FIX] Error on running app
  • Loading branch information
lautidevv authored Feb 16, 2024
2 parents b765067 + aeedf57 commit 8304797
Show file tree
Hide file tree
Showing 8 changed files with 1,485 additions and 151 deletions.
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
dist
.eslintrc.js
.prettierrc.js
24 changes: 24 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
module.exports = {
parser: '@typescript-eslint/parser',
extends: ['plugin:prettier/recommended', 'prettier', 'eslint:recommended'],
plugins: ['@typescript-eslint'],
parserOptions: {
ecmaVersion: 2022,
sourceType: 'module',
project: 'tsconfig.json',
},
env: {
es6: true,
node: true,
browser: true,
},
rules: {
'no-var': 'error',
semi: 'error',
indent: ['error', 2, { SwitchCase: 1 }],
'no-multi-spaces': 'error',
'space-in-parens': 'error',
'no-multiple-empty-lines': 'error',
'prefer-const': 'error',
},
};
8 changes: 8 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module.exports = {
semi: true,
trailingComma: 'all',
singleQuote: true,
jsxSingleQuote: true,
printWidth: 150,
tabWidth: 2,
};
5 changes: 0 additions & 5 deletions .prettierrc.json

This file was deleted.

31 changes: 21 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,23 +40,34 @@ If you have an idea, find a bug or want to give feedback on the project:
- If possible, include screenshots or any other resource that can help to better understand your point.


# Complete the .env file
## Configuration

````
cp .default.env .env
````

In the .env file we must complete the following data:
- TOKEN: to obtain it we must create a bot by logging on to https://discord.com/developers/applications. After having created it we go to the "Bot" section > generate token.
- COOKIE: with LI cookie value. Get from here: https://www.youtube.com/watch?v=H8BVdAIyFJM
- GUILD_ID: we must enter the browser and create our server in the Discord account we will use, then copy the first set of numbers after /channels
- CLIENT_ID: we go to our Bot configuration > "OAuth2" section > General > Client ID > Copy

After completing the data, change the name from .default.env to .env.
Then, go to https://discord.com/developers/applications > And check the following options:
- Requires OAuth2 Code Grant
- Presence Intent
- Server Members Intent
- Message Content Intent

# How to run

- Complete env file.
- Run `node register-commands.js` only once.
- Run `node ./src/index.js`
## How to add the bot to the server

- Invite the bot to the channel with this link: `https://discord.com/api/oauth2/authorize?client_id=CLIENT_ID&permissions=8&scope=bot%20applications.commands`
- Copy and paste the CLIENT_ID you have in the .env file previously completed into the link.

# After obtaining the correct registration
## How to run

- Run `node register-commands.js` only once.
- Run `npm run dev`

- Invite the bot to the channel with this link: `https://discord.com/api/oauth2/authorize?client_id=CLIENT_ID&permissions=0&scope=bot%20applications.commands`
- Copy the CLIENT_ID you have in the .env file previously completed.
- Type `/perfil url` url is the link to the desired LI profile, within the server where the bot is located: ex.: https://www.linkedin.com/in/matias-gumma/
## How to use
Type `/perfil url` url is the link to the desired LI profile, within the server where the bot is located: ex.: https://www.linkedin.com/in/matias-gumma/
Loading

0 comments on commit 8304797

Please sign in to comment.