{"id":20118446,"url":"https://github.com/magicoflolis/squadjstoolkit","last_synced_at":"2025-09-21T02:32:19.255Z","repository":{"id":223191094,"uuid":"664354512","full_name":"magicoflolis/SquadJSToolkit","owner":"magicoflolis","description":"Extends SquadJS functionality","archived":false,"fork":false,"pushed_at":"2024-02-19T21:27:44.000Z","size":112,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-20T00:33:08.417Z","etag":null,"topics":["squadjs","squadjs-plugin"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/magicoflolis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-07-09T18:07:51.000Z","updated_at":"2024-12-19T11:58:34.000Z","dependencies_parsed_at":"2024-02-22T08:32:06.859Z","dependency_job_id":null,"html_url":"https://github.com/magicoflolis/SquadJSToolkit","commit_stats":null,"previous_names":["magicoflolis/squadjstoolkit"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/magicoflolis/SquadJSToolkit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magicoflolis%2FSquadJSToolkit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magicoflolis%2FSquadJSToolkit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magicoflolis%2FSquadJSToolkit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magicoflolis%2FSquadJSToolkit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/magicoflolis","download_url":"https://codeload.github.com/magicoflolis/SquadJSToolkit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magicoflolis%2FSquadJSToolkit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276184500,"owners_count":25599346,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-21T02:00:07.055Z","response_time":72,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["squadjs","squadjs-plugin"],"created_at":"2024-11-13T19:10:53.896Z","updated_at":"2025-09-21T02:32:18.965Z","avatar_url":"https://github.com/magicoflolis.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SquadJS-Toolkit\n\n\u003e Extends SquadJS functionality\n\n## **About**\n\n\u003e This `README.md` is a copy paste of SquadJS readme so expect similarities.\n\nDue to creating this [script](https://github.com/magicoflolis/Magic-PH) long ago, my org \u0026 I have parted ways, so I have decided to open source my SquadJS code after 2 years of being apart of the Squad community.\n\n\u003cbr\u003e\n\n## **Prerequisites**\n\n* [SquadJS](https://github.com/Team-Silver-Sphere/SquadJS) (v4.0.1) - [Download](https://github.com/Team-Silver-Sphere/SquadJS/releases/latest)\n* Git\n* [Node.js](https://nodejs.org/en/) (18.16.1+) - [Download](https://nodejs.org/en/)\n* [Yarn](https://yarnpkg.com/) (Version 3.6.1+) - [Download](https://yarnpkg.com/getting-started/install)\n\n### **Upgrading SquadJS**\n\n1. Download \u0026 extract [SquadJS](https://github.com/fantinodavide/SquadJS/tree/master?tab=readme-ov-file#using-squadjs).\n2. Overwrite SquadJS contents.\n3. Run `npm install -g yarn` to update the global yarn version to latest v1.\n4. Run `yarn set version berry` to enable v2.\n5. Run `yarn config set nodeLinker node-modules`.\n6. Run `yarn install` to migrate the lockfile.\n\nSingle line code:\n\n```bash\nnpm install -g yarn \u0026\u0026 yarn set version berry \u0026\u0026 yarn config set nodeLinker node-modules \u0026\u0026 yarn install\n```\n\n\u003cbr\u003e\n\n## **Configuring SquadJS**\n\nSquadJS can be configured via a JSON configuration file which, by default, is located in the SquadJS and is named [config.json](./config.json).\n\nThe config file needs to be valid JSON syntax. If an error is thrown saying the config cannot be parsed then try putting the config into a JSON syntax checker (there's plenty to choose from that can be found via Google).\n\n\u003cdetails\u003e\n  \u003csummary\u003eServer\u003c/summary\u003e\n\n## Server Configuration\n\nThe following section of the configuration contains information about your Squad server.\n\n  ```json\n  \"server\": {\n    \"...\": \"...\",\n    \"webURL\": \"https://www.battlemetrics.com/servers/squad/YOUR_SQUAD_SERVER\"\n  },\n  ```\n\n* `webURL` - Your Squad servers website or BattleMetrics page.\n\n  ---\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eConnectors\u003c/summary\u003e\n\n## Connector Configuration\n\n**Discord:**\n\nConnects to Discord via `discord.js`.\n\n```json\n{\n  \"discord\": {\n    \"clientID\": \"Discord Application ID\",\n    \"guidID\": \"Discord Server ID\",\n    \"token\": \"Discord Login Token\",\n    \"intents\": [\"Guilds\", \"GuildMessages\", \"MessageContent\"],\n    \"channelIDs\": [\n      {\n        \"label\": \"Channel Name\",\n        \"channelID\": \"Chanel ID\"\n      }\n    ],\n    \"embedDefaults\": {\n      \"clan\": \"[SquadJS] \",\n      \"name\": \"Cerberus\",\n      \"iconURL\": \"https://i.imgur.com/HHEX79K.png\",\n      \"url\": \"https://www.battlemetrics.com/servers/squad\",\n      \"format\": {\n        \"player\": \"[[{{name}}](https://www.battlemetrics.com/rcon/players?filter[search]={{EOSID}}\u0026method=quick\u0026redirect=1 'Go to BattleMetrics')] - [[{{steamID}}](https://steamcommunity.com/profiles/{{steamID}} 'Go to Steam Profile')]\",\n        \"squad\": \"{{squadID}} : {{squadName}}\",\n        \"team\": \"{{teamID}} : {{teamName}}\"\n      }\n    },\n    \"webhook\": {\n      \"id\": \"Webhook ID\",\n      \"token\": \"Webhook Token\"\n    }\n  }\n}\n```\n\n* `clientID` - Your discord bots ID\n* `guidID` - Your discord server ID\n* `token` - Your discord bots \"Reset Token\"\n* `intents` - Your discord bots intents, see [Gateway Intents](https://discordjs.guide/popular-topics/intents.html#privileged-intents)\n* `channelIDs` - An array of channels you would like to use.\n* `channelIDs:label` - A label to use when calling `sendDiscordMessage(message, {{LABELS}})`, example `sendDiscordMessage('My discord message', 'admin-alerts')`\n* `channelIDs:channelID` - Discord Channel ID\n* `embedDefaults` - The default layout for embed messages, see [Embeds](https://discordjs.guide/popular-topics/embeds.html)\n* `embedDefaults:clan` - Your server clan, can be an empty string.\n* `embedDefaults:name` - Embeded message title, can be an empty string.\n* `embedDefaults:iconURL` - Embeded message iconURL, can be `null`.\n* `embedDefaults:url` - Embeded message URL, can be `null`.\n* `embedDefaults:format` - Embeded message fields, will convert player data.\n* `embedDefaults:format:player` - Player string.\n* `embedDefaults:format:squad` - Player squad string.\n* `embedDefaults:format:team` - Team string.\n* `webhook` - Optional, see [Webhooks](https://discordjs.guide/popular-topics/webhooks.html#webhooks)\n* `webhook:id` - Enter the ID part of `https://discord.com/api/webhooks/{{ID}}/token`\n* `webhook:token` - Enter the TOKEN part of `https://discord.com/api/webhooks/id/{{TOKEN}}`\n\n**BattleMetrics:**\n\nConnects to the BattleMetrics API.\n\n```json\n{\n  \"BattleMetrics\": {\n    \"BanLists\": [\n      {\n        \"name\": \"Ban List Name\",\n        \"listID\": \"Ban List ID\",\n        \"UUID\": \"Ban List UUID\"\n      }\n    ],\n    \"listID\": \"Ban List ID\",\n    \"orgID\": \"Org ID\",\n    \"serverID\": \"Server ID\",\n    \"token\": \"BattleMetrics Token\",\n    \"UUID\": \"OWI\"\n  }\n}\n```\n\n* `BanLists` - Array of Ban Lists to use, can be an empty Array!\n* `BanLists:name` - A name to use\n* `BanLists:listID` - A Ban List ID\n* `BanLists:UUID` - (OPTIONAL) A UUID to use when creating bans, can be an empty string.\n* `listID` - Default Ban List ID to use\n* `orgID` - BattleMetrics Org ID\n* `serverID` - BattleMetrics Server ID\n* `token` - BattleMetrics Token\n* `UUID` - A default UUID to use when creating bans, can be an empty string.\n\n ---\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eVerboseness\u003c/summary\u003e\n\n## Console Output Configuration\n\nThe `logger` section configures how verbose a module of SquadJS will be as well as the displayed color.\n\n```json\n    \"logger\": {\n      \"verboseness\": {\n        \"SquadServer\": 1,\n        \"LogParser\": 1,\n        \"RCON\": 1\n      },\n      \"colors\": {\n        \"Toolkit\": \"cyanBright\",\n        \"DiscordJS\": \"cyanBright\",\n        \"Err\": \"redBright\",\n        \"SquadServer\": \"yellowBright\",\n        \"SquadServerFactory\": \"yellowBright\",\n        \"LogParser\": \"blueBright\",\n        \"RCON\": \"redBright\"\n      }\n    }\n```\n\nThe larger the number set in the `verboseness` section for a specified module the more it will print to the console.\n\n  ---\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003ePlugins\u003c/summary\u003e\n\n## Toolkit Plugins\n\n**Profanity Filter:**\n\n```json\n{\n  \"plugin\": \"ToolkitProfanity\",\n  \"enabled\": true,\n  \"bmClient\": \"BattleMetrics\",\n  \"discordClient\": \"discord\",\n  \"Ban\": {\n    \"note\": \"Banned by Cerberus System\",\n    \"reason\": \"{{reason}} | {{timeLeft}}\"\n  },\n  \"embedInfo\": {\n    \"clan\": \"[SquadJS] \",\n    \"name\": \"Cerberus\",\n    \"iconURL\": \"https://i.imgur.com/HHEX79K.png\",\n    \"url\": \"https://www.battlemetrics.com/servers/squad\",\n    \"format\": {\n      \"player\": \"[[{{name}}](https://www.battlemetrics.com/rcon/players?filter[search]={{EOSID}}\u0026method=quick\u0026redirect=1 'Go to BattleMetrics')] - [[{{steamID}}](https://steamcommunity.com/profiles/{{steamID}} 'Go to Steam Profile')]\",\n      \"squad\": \"{{squadID}} : {{squadName}}\",\n      \"team\": \"{{teamID}} : {{teamName}}\"\n    }\n  },\n  \"ignoreChats\": []\n}\n```\n\n* `bmClient` - Name of the BattleMetrics connector.\n* `discordClient` - Name of the Discord connector.\n* `Ban:note` - Added to the beginning of ban notes.\n* `Ban:reason` - Default ban reason.\n* `embedInfo` - Overwrites `discord:embedDefaults`.\n* `ignoreChats` - Ignore certain chats.\n\n  ---\n\u003c/details\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagicoflolis%2Fsquadjstoolkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmagicoflolis%2Fsquadjstoolkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagicoflolis%2Fsquadjstoolkit/lists"}