You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit introduces several enhancements and a new test suite to improve the bot's functionality and reliability.
- Updated `.gitignore` to include the `build` directory, excluding compiled files from version control.
- Updated `tsconfig.json` to extend `@sindresorhus/tsconfig`, specify compiler options, include source files, and define an output directory.
- Modified `src/events.ts` to handle commands without options, improve error logging, and use `this.i18n` for localization.
- Updated `package.json` to include new dependencies, update scripts, and configure AVA for TypeScript testing.
- Updated `README.md` to reflect updated Node.js version requirements and minor formatting changes.
- Added a new test file `src/tests/data-handlers/api-handler.test.ts` to test the `ApiHandler` class.
Copy file name to clipboardExpand all lines: README.md
+14-5Lines changed: 14 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,5 @@
1
1
# lol-ranks-bot
2
+
2
3
A Discord bot that allows users to verify their League of Legends summoner name and assigns roles based on their rank/elo in the game. Users must initiate the verification process themselves, and upon successful verification, the bot will grant them the appropriate rank role within the Discord server.
@@ -7,16 +8,19 @@ A Discord bot that allows users to verify their League of Legends summoner name
7
8
[](https://creativecommons.org/licenses/by-nc/4.0/)
8
9
9
10
## Prerequisites
11
+
10
12
Before you begin, ensure you have met the following requirements:
11
-
- Node.js (v16.0 or higher)
12
-
- NPM (usually comes with Node.js)
13
-
- Docker and Docker Compose (for Docker deployment)
14
-
- PM2 (for PM2 deployment)
15
13
16
-
Install Node.js (v16.0 or higher) and NPM from [Node.js official website](https://nodejs.org/en/download/).<br>
14
+
- Node.js (v20.0 or higher)
15
+
- NPM (usually comes with Node.js)
16
+
- Docker and Docker Compose (for Docker deployment)
17
+
- PM2 (for PM2 deployment)
18
+
19
+
Install Node.js (v20.0 or higher) and NPM from [Node.js official website](https://nodejs.org/en/download/).<br>
17
20
Install Docker and Docker Compose on your server. Follow the [official Docker guide](https://docs.docker.com/get-docker/) for installation instructions.
18
21
19
22
## Local Development Setup
23
+
20
24
Follow these steps to set up the bot for development purposes on your local machine:
21
25
22
26
1. Clone the repository:
@@ -31,6 +35,7 @@ Follow these steps to set up the bot for development purposes on your local mach
31
35
## Server Deployment
32
36
33
37
### Docker Deployment
38
+
34
39
To deploy the bot on a server using Docker, follow these steps:
35
40
36
41
1. Clone the repository:
@@ -43,6 +48,7 @@ To deploy the bot on a server using Docker, follow these steps:
43
48
5. To stop the bot, run `docker compose down`.
44
49
45
50
### PM2 Deployment
51
+
46
52
To deploy the bot on a server using PM2, follow these steps:
47
53
48
54
1. Install PM2 globally by running `npm install pm2 -g`.
@@ -57,6 +63,7 @@ To deploy the bot on a server using PM2, follow these steps:
57
63
7. To ensure PM2 restarts the bot after reboots, run `pm2 save`
58
64
59
65
## How the Bot Works
66
+
60
67
- Users trigger the verification process by a command in Discord.
61
68
- The bot verifies the user's League of Legends summoner name.
62
69
- Once verified, the bot checks the user's rank/elo in League of Legends.
@@ -65,6 +72,7 @@ To deploy the bot on a server using PM2, follow these steps:
65
72
- The bot does not automatically assign roles to all users; each user must initiate the verification process.
66
73
67
74
## Settings
75
+
68
76
-`channels` = Set the ID of the channels that will be used for the Bot to send the messages (optional)
69
77
-`help` - Default channel to help members with bot-related issues
70
78
-`guildID` = ID of your server ([Tutorial](https://support.discord.com/hc/en-us/articles/206346498-Where-can-I-find-my-User-Server-Message-ID-))
@@ -90,4 +98,5 @@ To deploy the bot on a server using PM2, follow these steps:
90
98
- To enable rank icons on messages (like this <imgalt="Challenger Icon"style="width:18px"src="https://raw.communitydragon.org/latest/plugins/rcp-fe-lol-static-assets/global/default/images/ranked-mini-crests/challenger.png"/>) you need to add custom emojis on your server ([Tutorial](https://support.discord.com/hc/en-us/articles/360036479811-Custom-Emojis))). The icons are inside the `assets/img` folder (Please do not change the name of the icons or the bot will not be able to identify them)
91
99
92
100
## LICENSE
101
+
93
102
This work is licensed under a <arel="license"href="http://creativecommons.org/licenses/by-nc-sa/4.0/">Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License</a>.<br/><br/><arel="license"href="http://creativecommons.org/licenses/by-nc-sa/4.0/"><imgalt="Creative Commons License"style="border-width:0"src="https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png" /></a>
Copy file name to clipboardExpand all lines: locales/pt.json
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,7 @@
19
19
"reply6": "Não consigo encontrar uma classificação de fila Solo ranqueada para este nome de invocador. Por favor, tente novamente mais tarde ou entre em contato com o ",
20
20
"reply7": "Ocorreu um erro ao processar a solicitação. Tente novamente mais tarde ou entre em contato com o ",
21
21
"reply8": "Não consegui encontrar esse nome de invocador.",
22
+
"reply9": "Você precisa autenticar sua conta primeiro. Por favor, use o comando /rank com seu nome de invocador para começar.",
0 commit comments