From a07af6cd33ba97027a34d22cb580e7b42085b66f Mon Sep 17 00:00:00 2001 From: Thomas Smyth Date: Wed, 8 Jul 2020 21:49:48 +0100 Subject: [PATCH] Reformat code and docs --- README.md | 1 + index.js | 4 +--- plugins/discord-chat-admin-request/README.md | 18 +++++++++++------- plugins/discord-server-status/README.md | 14 +++++++------- 4 files changed, 20 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 4f24716..05817e9 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,7 @@ SquadJS relies on being able to access the Squad server log directory in order t ## Plugins * [Discord Admin Cam Logs](https://github.com/Thomas-Smyth/SquadJS/tree/master/plugins/discord-admin-cam-logs) - Log admin cam usage to Discord. * [Discord Chat](https://github.com/Thomas-Smyth/SquadJS/tree/master/plugins/discord-chat) - Log in game chat to Discord. + * [Discord Chat Admin Request](https://github.com/Thomas-Smyth/SquadJS/tree/master/plugins/discord-chat-admin-request) - Log `!admin` alerts to Discord. * [Discord Teamkill](https://github.com/Thomas-Smyth/SquadJS/tree/master/plugins/discord-teamkill) - Log teamkills to Discord. * [Discord Server Status](https://github.com/Thomas-Smyth/SquadJS/tree/master/plugins/discord-server-status) - Add a server status embed to Discord. * [Map Vote](https://github.com/Thomas-Smyth/SquadJS/tree/master/plugins/mapvote) - In-game chat map voting system. diff --git a/index.js b/index.js index 78c36e0..fac5269 100644 --- a/index.js +++ b/index.js @@ -42,9 +42,7 @@ async function main() { await discordClient.login('Discord Login Token'); await discordAdminCamLogs(server, discordClient, 'discordChannelID'); await discordChat(server, discordClient, 'discordChannelID'); - await discordChatAdminRequest(server, discordClient, 'discordChannelID', { - pingGroups: ['discordGroupID'] - }); + await discordChatAdminRequest(server, discordClient, 'discordChannelID', { pingGroups: ['discordGroupID'] }); await discordServerStatus(server, discordClient); await discordTeamkill(server, discordClient, 'discordChannelID'); diff --git a/plugins/discord-chat-admin-request/README.md b/plugins/discord-chat-admin-request/README.md index 77ec1a4..dfd8f46 100644 --- a/plugins/discord-chat-admin-request/README.md +++ b/plugins/discord-chat-admin-request/README.md @@ -22,11 +22,15 @@ const discordClient = new Discord.Client(); await discordClient.login('Discord Login Token'); // insert your Discord bot's login token here. // Place the following lines after all of the above. -await discordChatAdminRequest(server, discordClient, 'discordChannelID', { - // options - the options included below display the defaults and can be removed for simplicity. - adminPrefix: '!admin', // prefix for an admin request. - pingGroups: ['729853701308678154'], // Groups to ping on a request, leave empty for no ping. - ignoreChats: ['ChatSquad', 'ChatAdmin'], // an array of chats to not display. - color: '#f44336' // color of embed -}); +await discordChatAdminRequest( + server, + discordClient, + 'discordChannelID', + { // options - the options included below display the defaults and can be removed for simplicity. + adminPrefix: '!admin', // prefix for an admin request. + pingGroups: ['729853701308678154'], // Groups to ping on a request, leave empty for no ping. + ignoreChats: ['ChatSquad', 'ChatAdmin'], // an array of chats to not display. + color: '#f44336' // color of embed + } +); ``` diff --git a/plugins/discord-server-status/README.md b/plugins/discord-server-status/README.md index 0c4436e..984f5e0 100644 --- a/plugins/discord-server-status/README.md +++ b/plugins/discord-server-status/README.md @@ -22,12 +22,12 @@ await discordClient.login('Discord Login Token'); // insert your Discord bot's l await discordServerStatus( server, discordClient, - { // options - the options included below display the defaults and can be removed for simplicity. - color: 16761867, // color of embed - colorGradient: true, // gradient color based on player count - connectLink: true, // show Steam connect link - command: '!server', // command used to send message - disableStatus: false // disable bot status as server status - } + { // options - the options included below display the defaults and can be removed for simplicity. + color: 16761867, // color of embed + colorGradient: true, // gradient color based on player count + connectLink: true, // show Steam connect link + command: '!server', // command used to send message + disableStatus: false // disable bot status as server status + } ); ```