Skip to content

Commit 823f268

Browse files
committed
Update credentials to support credential application v1.2.0
1 parent 9dfaf4c commit 823f268

File tree

5 files changed

+20
-5
lines changed

5 files changed

+20
-5
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
</p>
44

55
<p align="center">
6-
<a href="https://discord.gg/vcrKbKVAbc"><img src="https://img.shields.io/badge/Discord-Alexemanuelol%238259-%237289DA?style=flat&logo=discord" alt="discord"/></a>
6+
<a href="https://discord.gg/vcrKbKVAbc"><img src="https://img.shields.io/badge/Discord-Alexemanuel-%237289DA?style=flat&logo=discord" alt="discord"/></a>
77
<a href="https://www.reddit.com/user/Alexemanuelol"><img src="https://img.shields.io/badge/Reddit-Alexemanuelol-FF4500?style=flat&logo=reddit" alt="reddit"/></a>
88
<a href="https://ko-fi.com/alexemanuelol"><img src="https://img.shields.io/badge/Donate%20a%20Coffee-alexemanuelol-yellow?style=flat&logo=buy-me-a-coffee" alt="donate on ko-fi"/></a>
99

@@ -46,7 +46,7 @@ A NodeJS Discord Bot that uses the [rustplus.js](https://github.com/liamcottle/r
4646
4747
## **Credentials**
4848

49-
> You can get your credentials by running the `rustplusplus FCM Credential Application`. Download it [here](https://github.com/alexemanuelol/rustplusplus-Credential-Application/releases/download/v1.1.0/rustPlusPlus-1.1.0-win-x64.exe)
49+
> You can get your credentials by running the `rustplusplus credential application`. Download it [here](https://github.com/alexemanuelol/rustplusplus-credential-application/releases/download/v1.2.0/rustplusplus-1.2.0-win-x64.exe)
5050
5151

5252
## **How to run the bot**

docs/commands.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,8 @@ Subcommand | Options | Description | Required
120120
&nbsp; | `gcm_security_token` | GCM Security Token. | `True`
121121
&nbsp; | `gcm_app_id` | GCM App ID. | `True`
122122
&nbsp; | `steam_id` | Steam ID. | `True`
123+
&nbsp; | `issued_date` | Issued date of the credentials. | `True`
124+
&nbsp; | `expire_date` | Expire date of the credentials. | `True`
123125
&nbsp; | `hoster` | Should be hoster. | `False`
124126
`remove` | &nbsp; | Remove FCM Credentials. | &nbsp;
125127
&nbsp; | `steam_id` | Steam ID. | `False`

docs/credentials.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
55
## Retrieving FCM Credentials
66

7-
* Download and install the [rustplusplus FCM Credential Application](https://github.com/alexemanuelol/rustplusplus-Credential-Application/releases/download/v1.1.0/rustPlusPlus-1.1.0-win-x64.exe)
7+
* Download and install the [rustplusplus credential application](https://github.com/alexemanuelol/rustplusplus-credential-application/releases/download/v1.2.0/rustplusplus-1.2.0-win-x64.exe)
88
* Once downloaded and installed, open it and press the button `Connect with Rust+`.
99

1010
![rustplusplus FCM Credential Application Image](images/bot_setup/fcm_credential_application_connect.png)

src/commands/credentials.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,14 @@ module.exports = {
8989
.setName('steam_id')
9090
.setDescription('Steam ID.')
9191
.setRequired(true))
92+
.addStringOption(option => option
93+
.setName('issued_date')
94+
.setDescription('Issued date of the credentials.')
95+
.setRequired(true))
96+
.addStringOption(option => option
97+
.setName('expire_date')
98+
.setDescription('Expire date of the credentials.')
99+
.setRequired(true))
92100
.addBooleanOption(option => option
93101
.setName('host')
94102
.setDescription('Host the bot')
@@ -186,6 +194,9 @@ async function addCredentials(client, interaction, verifyId) {
186194
credentials[steamId].fcm_credentials.gcm.securityToken = interaction.options.getString('gcm_security_token');
187195
credentials[steamId].fcm_credentials.gcm.appId = interaction.options.getString('gcm_app_id');
188196

197+
credentials[steamId].issued_date = interaction.options.getString('issued_date');
198+
credentials[steamId].expire_date = interaction.options.getString('expire_date');
199+
189200
credentials[steamId].discordUserId = interaction.member.user.id;
190201

191202
const prevHoster = credentials.hoster;
@@ -225,7 +236,9 @@ async function addCredentials(client, interaction, verifyId) {
225236
`${credentials[steamId].fcm_credentials.gcm.token}, ` +
226237
`${credentials[steamId].fcm_credentials.gcm.androidId}, ` +
227238
`${credentials[steamId].fcm_credentials.gcm.securityToken}, ` +
228-
`${credentials[steamId].fcm_credentials.gcm.appId}`
239+
`${credentials[steamId].fcm_credentials.gcm.appId}, ` +
240+
`${credentials[steamId].issued_date}, ` +
241+
`${credentials[steamId].expire_date}`
229242
}));
230243

231244
const str = client.intlGet(interaction.guildId, 'credentialsAddedSuccessfully', { steamId: steamId });

src/discordTools/discordButtons.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ module.exports = {
516516
module.exports.getButton({
517517
style: Discord.ButtonStyle.Link,
518518
label: 'CREDENTIALS',
519-
url: 'https://github.com/alexemanuelol/rustplusplus-Credential-Application/releases/v1.1.0'
519+
url: 'https://github.com/alexemanuelol/rustplusplus-Credential-Application/releases/v1.2.0'
520520
})
521521
)];
522522
},

0 commit comments

Comments
 (0)