Merge pull request #9 from Thomas-Smyth/beta

SquadJS v1.0.4 Release
This commit is contained in:
Thomas Smyth 2020-05-16 13:13:53 +01:00 committed by GitHub
commit 4dc54ef3f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -1,6 +1,6 @@
{
"name": "SquadJS",
"version": "1.0.3",
"version": "1.0.4",
"repository": "https://github.com/Thomas-Smyth/SquadJS.git",
"author": "Thomas Smyth <https://github.com/Thomas-Smyth>",
"license": "MIT",

View File

@ -49,6 +49,7 @@ export default async function plugin(server, discordClient, options = {}) {
options = {
color: 16761867,
command: '!server',
disableStatus: false,
...options
};
@ -81,6 +82,6 @@ export default async function plugin(server, discordClient, options = {}) {
});
server.on(SERVER_A2S_UPDATED, () => {
discordClient.user.setActivity(`(${server.a2sPlayerCount}/${server.publicSlots}) ${server.currentLayer}`, { type: 'WATCHING' });
if(!options.disableStatus) discordClient.user.setActivity(`(${server.a2sPlayerCount}/${server.publicSlots}) ${server.currentLayer}`, { type: 'WATCHING' });
});
}