Skip to content

Commit

Permalink
Merge pull request #8 from Thomas-Smyth/beta
Browse files Browse the repository at this point in the history
SquadJS v1.0.3 Release
  • Loading branch information
Thomas-Smyth authored May 16, 2020
2 parents 2b4c533 + 744d274 commit bb51292
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "SquadJS",
"version": "1.0.2",
"version": "1.0.3",
"repository": "https://github.com/Thomas-Smyth/SquadJS.git",
"author": "Thomas Smyth <https://github.com/Thomas-Smyth>",
"license": "MIT",
Expand Down
6 changes: 6 additions & 0 deletions plugins/discord-server-status/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { COPYRIGHT_MESSAGE } from 'core/config';

import { SERVER_A2S_UPDATED } from 'squad-server/events/server';

function makeEmbed(server, options) {
let players = `${server.a2sPlayerCount}`;
if (server.publicQueue + server.reserveQueue > 0)
Expand Down Expand Up @@ -77,4 +79,8 @@ export default async function plugin(server, discordClient, options = {}) {
// update the message
await reaction.message.edit(makeEmbed(server, options));
});

server.on(SERVER_A2S_UPDATED, () => {
discordClient.user.setActivity(`(${server.a2sPlayerCount}/${server.publicSlots}) ${server.currentLayer}`, { type: 'WATCHING' });
});
}

0 comments on commit bb51292

Please sign in to comment.