From 8212cd04b223b0c091d0a0dc9fe014878a08c3b2 Mon Sep 17 00:00:00 2001 From: Simon Date: Sat, 19 Nov 2022 20:34:41 +0100 Subject: [PATCH] chore: synced close source version --- CHANGELOG.md | 6 + README.md | 30 +- config-generator/config.json | 218 ++++-- config-generator/strings.json | 281 ++++--- main.js | 8 +- modules/admin-tools/config.json | 9 +- modules/admin-tools/module.json | 18 +- modules/afk-system/config.json | 106 ++- modules/afk-system/module.json | 12 +- modules/anti-ghostping/config.json | 109 +-- modules/anti-ghostping/module.json | 12 +- modules/auto-delete/channels.json | 87 ++- modules/auto-delete/events/botReady.js | 21 +- modules/auto-delete/events/messageCreate.js | 14 +- .../auto-delete/events/voiceStateUpdate.js | 11 +- modules/auto-delete/module.json | 16 +- modules/auto-delete/voice-channels.json | 72 +- modules/auto-messager/cronjob.json | 75 +- modules/auto-messager/daily.json | 96 ++- modules/auto-messager/hourly.json | 73 +- modules/auto-messager/module.json | 16 +- modules/auto-publisher/config.json | 86 ++- modules/auto-publisher/module.json | 16 +- modules/auto-react/configs/config.json | 81 +- modules/auto-react/configs/replies.json | 45 +- modules/auto-react/module.json | 16 +- modules/auto-thread/config.json | 72 +- modules/auto-thread/module.json | 14 +- modules/betterstatus/config.json | 270 ++++--- modules/betterstatus/events/botReady.js | 10 +- modules/betterstatus/module.json | 16 +- modules/birthday/commands/birthday.js | 2 +- modules/birthday/config.json | 292 ++++--- modules/birthday/module.json | 21 +- modules/channel-stats/channels.json | 260 +++---- modules/channel-stats/module.json | 14 +- modules/color-me/configs/config.json | 112 ++- modules/color-me/configs/strings.json | 158 ++-- modules/color-me/module.json | 14 +- modules/counter/config.json | 115 +-- modules/counter/milestones.json | 75 +- modules/counter/module.json | 14 +- .../economy-system/commands/economy-system.js | 92 ++- modules/economy-system/configs/config.json | 498 +++++++----- modules/economy-system/configs/strings.json | 542 ++++++++----- modules/economy-system/economy-system.js | 2 +- modules/economy-system/module.json | 16 +- modules/fun/config.json | 589 +++++++------- modules/fun/module.json | 14 +- modules/giveaways/configs/config.json | 147 ++-- modules/giveaways/configs/strings.json | 720 +++++++++--------- modules/giveaways/module.json | 21 +- modules/guess-the-number/config.json | 155 ++-- modules/guess-the-number/module.json | 14 +- modules/hunt-the-code/module.json | 18 +- modules/hunt-the-code/strings.json | 295 +++---- modules/info-commands/commands/info.js | 4 +- modules/info-commands/module.json | 14 +- modules/info-commands/strings.json | 449 ++++++----- modules/invite-tracking/config.json | 20 +- .../invite-tracking/events/guildMemberJoin.js | 24 +- modules/invite-tracking/module.json | 12 +- modules/levels/commands/manage-levels.js | 12 +- modules/levels/configs/config.json | 311 +++++--- .../configs/random-levelup-messages.json | 93 ++- .../configs/special-levelup-messages.json | 90 ++- modules/levels/configs/strings.json | 353 +++++---- modules/levels/module.json | 19 +- modules/massrole/configs/strings.json | 64 +- modules/massrole/module.json | 16 +- modules/moderation/configs/antiJoinRaid.json | 137 ++-- modules/moderation/configs/antiSpam.json | 271 ++++--- modules/moderation/configs/config.json | 468 ++++++++---- modules/moderation/configs/joinGate.json | 180 +++-- modules/moderation/configs/strings.json | 546 +++++++------ modules/moderation/configs/verification.json | 263 ++++--- modules/moderation/events/guildMemberAdd.js | 13 +- modules/moderation/moderationActions.js | 8 +- modules/moderation/module.json | 14 +- modules/partner-list/commands/partner.js | 2 + modules/partner-list/config.json | 279 ++++--- modules/partner-list/module.json | 21 +- modules/ping-on-vc-join/config.json | 168 ++-- modules/ping-on-vc-join/module.json | 19 +- modules/polls/configs/config.json | 73 +- modules/polls/configs/strings.json | 71 +- modules/polls/module.json | 13 +- modules/serverinfo/configs/config.json | 64 +- modules/serverinfo/configs/fields.json | 226 +++--- modules/serverinfo/module.json | 21 +- modules/status-roles/configs/config.json | 80 +- modules/status-roles/module.json | 18 +- modules/suggestions/config.json | 499 +++++++++--- modules/suggestions/module.json | 21 +- modules/suggestions/suggestion.js | 54 +- modules/team-list/config.json | 146 ++-- modules/team-list/events/botReady.js | 72 +- modules/team-list/module.json | 14 +- modules/temp-channels/config.json | 391 ++++++---- modules/temp-channels/module.json | 14 +- modules/tic-tak-toe/commands/tic-tac-toe.js | 6 - modules/tic-tak-toe/module.json | 12 +- modules/tickets/config.json | 265 ++++--- modules/tickets/module.json | 14 +- .../twitch-notifications/configs/config.json | 48 +- .../configs/streamers.json | 186 +++-- modules/twitch-notifications/module.json | 16 +- modules/welcomer/configs/channels.json | 401 ++++++---- modules/welcomer/configs/config.json | 102 ++- modules/welcomer/configs/random-messages.json | 269 +++---- modules/welcomer/events/guildMemberAdd.js | 28 +- modules/welcomer/events/guildMemberRemove.js | 13 +- modules/welcomer/events/guildMemberUpdate.js | 2 +- modules/welcomer/module.json | 16 +- package-lock.json | 255 ++++--- package.json | 18 +- src/functions/configuration.js | 366 ++++----- src/functions/helpers.js | 8 +- 118 files changed, 8226 insertions(+), 5562 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b5c1466..3146efef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ This changelog contains mostly API-Changes and changes for developers. +## v3.7.0 +* Rework of configuration localization and loading. All files got migrated. +* Synced open source-version with close-source-SCNX-version. Please read the detailed changelog on our Discord to learn about new module functionality. +* feat(economy-system): Added ability to make command-replies public ([#79](https://github.com/SCNetwork/CustomDCBot/pull/79)) +* feat(Twitch-Notifications): Added live-Roles ([#81](https://github.com/SCNetwork/CustomDCBot/pull/81)) + ## v3.6.0 * Support for configuration-example-file `content.elementToggle` toggle to improve UX in the SCNX Dashboard ([#76](https://github.com/SCNetwork/CustomDCBot/pull/76)) * Support for configuration-example-file `content.dependsOn` toggle to improve UX in the SCNX Dashboard ([#76](https://github.com/SCNetwork/CustomDCBot/pull/76)) diff --git a/README.md b/README.md index 75344cd8..9e81c038 100644 --- a/README.md +++ b/README.md @@ -161,17 +161,14 @@ translationable systems in your module. works) * `string`: Name of the string * `replace` (optional, object): Will replace `%` in the source string by `` -* Localizations of configuration-files and user-editable strings: You can specify field-fields like `description` - , `default` and more in multiple languages. The bot / dashboard will choose the correct one automatically. +* Localizations of configuration-files and user-editable strings: All localizable configuration fields are an object with values keyed based on language codes. Example: `{"description": {"de": "Beschreibung des Feldes", "en": "Description of the field"}`. Each field needs to have at least an English value, as every other language will default back to English. #### module.json Every module has to contain a `module.json` file with the following content: * `name` of the module. Should be the same as the name of your dictionary. -* `humanReadableName`: English name of the module, shown to users -* `humanReadableName-`: Replace `` with any supported language-code (currently: `de`, `en`); Name of the - module show to users (fallback order: `humanReadableName-`, `humanReadableName-en`, `humanReadableName`) +* `humanReadableName`: [Localized](#localization) name of the module, shown to users * `author` * `name`: Name of the author * `link`: Link to the author @@ -180,7 +177,7 @@ Every module has to contain a `module.json` file with the following content: * `openSourceURL`: URL to the Source-Code of the module licensed under an Open-Source-License (will show donation-banners in the SCNX Dashboard (if orgID is set) and qualifies (qualified) developers for financial support from the Open-Source-Pool of SCNX) -* `description`: Short description of the module +* `description`: [Localized](#localization) short description of the module * `cli` (optional): [CLI-File](#cli-files) of your module * `commands-dir` (optional): Directory inside your module folder where all the [interaction-command-files](#interaction-command) are in @@ -262,9 +259,8 @@ use `node add-config-element-object.js `: Name of the file, shown to users (fallback order: `humanname-`, `humanname-en`, `filename`) -* `description-`: Description of the file, shown to users (fallback order: `humanname-`, `humanname-en` - , `No description, but you can configure here`) +* `humanname`: [Localized](#localization) name of the file, shown to users +* `description`: [Localized](#localization) description of the file, shown to users * `configElements` (boolean, default: false): If enabled the configuration-file will be an array of an object of the content-fields * `commandsWarnings`: This field is used to indicate, that users need to manually set up the permissions for commands in @@ -276,15 +272,12 @@ An example config file should include the following things: * `info`: Key by language; Information about the command; used to explain users what exactly they should do * `content`: Array of content fields: * `field_name`: Name of the config field - * `default-`: Default value of this field (replace `` with a supported language code), - Fallback-Order: `default-`, `default-en`, `default` + * `default`: [Localized](#localization) default value of this field * `type`: Can be `channelID`, `userID`, `imgURL`, `select`, `timezone` (treated as string, please check validity before using), `roleID` , `boolean`, `integer`, `array`, `keyed` (codename for an JS-Object) or `string` - * `description-`: Description of this field (replace `` with a supported language code), - Fallback-Order: `description-`, `description-en`, `description` - * `humanname-`: Name of this field show to users (replace `` with a supported language code), - Fallback-Order: `humanname-`, `humanname-en`, `humanname`, `field_name` + * `description`: [Localized](#localization) description of this field + * `humanname`: [Localized](#localization) name of this field show to users * `allowEmbed` (if type === `array, keyed or string`): Allow the usage of an [embed](#configuration) (Note: Please use the build-in function in `src/functions/helpers.js`) * `content` (if type === `array`): Type (see `type` above) of every value @@ -297,12 +290,9 @@ An example config file should include the following things: * `content` (if type === `keyed`): * `key`: Type (see `type` above) of the index of every value * `value`: Type (see `type` above) of the value of every value - * `params-` (if type === `string`, array, optional, replace `` with supported language code, - Fallback-Order: `params-`, `params-en`, `params`) + * `params`: (if type === `string`, array, optional) Possible parameters * `name`: Name of the parameter (e.g. `%mention%`) - * `description`: Description of the parameter (e.g. `Mention of the user`) - * `fieldValue` (only if type === `select`): If set, the parameter can only be used if the value of the field - is `fieldValue`. + * `description`: [Localized](#localization) Description of the parameter (e.g. `Mention of the user`) * `isImage`: If true, users will be able to set this parameter as Image, Author-Icon, Footer-Icon or Thumbnail of an embed (only if `allowEmbed` is enabled) * `allowNull` (default: `false`, optional): If the value of this field can be empty diff --git a/config-generator/config.json b/config-generator/config.json index f40ccffe..fef94470 100644 --- a/config-generator/config.json +++ b/config-generator/config.json @@ -1,72 +1,109 @@ { - "description-en": "Configure the basic features of the bot here", - "description-de": "Generelle Konfiguration deines Bots", - "humanname-de": "Konfiguration", - "humanname-en": "Configuration", + "description": { + "en": "Configure the basic features of the bot here", + "de": "Generelle Konfiguration deines Bots" + }, + "humanName": { + "en": "Configuration", + "de": "Konfiguration" + }, "filename": "config.json", "content": [ { - "field_name": "token", - "default": "yourtokengoeshere", - "type": "string", - "description": "Replace this with your token", - "hidden": true - }, - { - "field_name": "scnxToken", - "default": "yourtokengoeshere", - "type": "string", - "description": "Replace this with your token", - "hidden": true + "name": "token", + "humanName": {}, + "default": { + "en": "yourtokengoeshere" + }, + "description": { + "en": "Replace this with your token" + }, + "hidden": true, + "type": "string" }, { - "field_name": "prefix", - "humanname-de": "Prefix deines Botes", - "humanname-en": "Prefix of your bot", - "default": "!", - "type": "string", - "description-en": "Set the prefix of your bot here", - "description-de": "Dein eigener Prefix - Wir empfehlen ihn einfach bei ! zu belassen." + "name": "prefix", + "humanName": { + "en": "Prefix of your bot", + "de": "Prefix deines Botes" + }, + "default": { + "en": "!" + }, + "description": { + "en": "Set the prefix of your bot here", + "de": "Dein eigener Prefix - Wir empfehlen ihn einfach bei ! zu belassen." + }, + "type": "string" }, { - "field_name": "botOperators", - "default": [], - "type": "array", - "content": "string", + "name": "botOperators", + "humanName": {}, + "default": { + "en": [] + }, + "description": { + "en": "Bot operators can reload the configuration and perform system relevant actions with this bot. Please only add users you really trust (and yourself of course)" + }, "hidden": true, - "description": "Bot operators can reload the configuration and perform system relevant actions with this bot. Please only add users you really trust (and yourself of course)" + "type": "array", + "content": "string" }, { - "field_name": "guildID", - "default": "489786377261678592", - "type": "guildID", + "name": "guildID", + "humanName": {}, + "default": { + "en": "489786377261678592" + }, + "description": { + "en": "Replace this the id of the guild the bot should work in." + }, "hidden": true, - "description": "Replace this the id of the guild the bot should work in." + "type": "guildID" }, { - "field_name": "disableStatus", - "humanname-en": "Disable Bot-Status", - "humanname-de": "Bot-Status deaktivieren", - "default": false, - "type": "boolean", - "description-en": "If enabled, the bot won't have a status in discord", - "description-de": "Wenn aktiviert wird der Bot keinen Status in Discord haben" + "name": "disableStatus", + "humanName": { + "en": "Disable Bot-Status", + "de": "Bot-Status deaktivieren" + }, + "default": { + "en": false + }, + "description": { + "en": "If enabled, the bot won't have a status in discord", + "de": "Wenn aktiviert wird der Bot keinen Status in Discord haben" + }, + "type": "boolean" }, { - "field_name": "user_presence", - "humanname-en": "Bot-Status", - "default": "You can change this in your config.json btw", - "type": "string", - "description-en": "This will show up in Discord as \"Playing \"", - "description-de": "Das wird in Discord als \"Spielt \" angezeigt" + "name": "user_presence", + "humanName": { + "en": "Bot-Status" + }, + "default": { + "en": "Change this in your Bot-Configuration on scnx.app", + "de": "Ändere das in deiner Bot-Konfiguration auf scnx.app" + }, + "description": { + "en": "This will show up in Discord as \"Playing \"", + "de": "Das wird in Discord als \"Spielt \" angezeigt" + }, + "type": "string" }, { - "field_name": "logLevel", - "humanname-en": "Logging-Level", - "default": "debug", + "name": "logLevel", + "humanName": { + "en": "Logging-Level" + }, + "default": { + "en": "debug" + }, + "description": { + "en": "Log-Level of the bot. Leave it as it is, if you don't know what this means", + "de": "Log-Level des Bots. Belasse es wie es ist, wenn du nicht weißt, was das bedeutet." + }, "type": "select", - "description-en": "Log-Level of the bot. Leave it as it is, if you don't know what this means", - "description-de": "Log-Level des Bots. Belasse es wie es ist, wenn du nicht weißt, was das bedeutet.", "content": [ "debug", "info", @@ -77,41 +114,66 @@ ] }, { - "field_name": "timezone", - "humanname-en": "Timezone", - "humanname-de": "Zeitzone", - "default": "Europe/Berlin", - "type": "timezone", - "description-en": "Timezone the bot runs in", - "description-de": "Zeitzone in der der Bot laufen soll" + "name": "logChannelID", + "humanName": { + "en": "Log-Channel", + "de": "Log-Kanal" + }, + "default": { + "en": "" + }, + "description": { + "en": "Default log-channel for most modules and used to log relevant information", + "de": "Standard Log-Kanal für viele Module. Wird außerdem genutzt, um wesentliche Bot-Informationen zu senden" + }, + "type": "channelID", + "allowNull": true }, { - "field_name": "logChannelID", - "allowNull": true, - "humanname-en": "Log-Channel", - "humanname-de": "Log-Kanal", - "default": "", - "type": "channelID", - "description-en": "Default log-channel for most modules and used to log relevant information", - "description-de": "Standard Log-Kanal für viele Module. Wird außerdem genutzt, um wesentliche Bot-Informationen zu senden" + "name": "timezone", + "humanName": { + "en": "Timezone", + "de": "Zeitzone" + }, + "default": { + "en": "Europe/Berlin" + }, + "description": { + "en": "Timezone the bot runs in", + "de": "Zeitzone in der der Bot laufen soll" + }, + "type": "timezone" }, { - "field_name": "disableEveryoneProtection", - "humanname-en": "Allow @everyone / @here pings", - "humanname-de": "@everyone und @here Pings erlauben", - "default": false, + "name": "disableEveryoneProtection", + "humanName": { + "en": "Allow @everyone / @here pings", + "de": "@everyone und @here Pings erlauben" + }, + "default": { + "en": false + }, + "description": { + "en": "Allows @everyone and @here pings for messages configurable in the dashboard", + "de": "Erlaubt @everyone und @here pings in im Dashboard anpassbaren Nachrichten" + }, "type": "boolean", - "description-de": "Erlaubt @everyone und @here pings in im Dashboard anpassbaren Nachrichten", - "description-en": "Allows @everyone and @here pings for messages configurable in the dashboard" + "pro": true }, { - "field_name": "syncCommandGlobally", - "default": false, - "type": "boolean", - "humanname-en": "Sync module commands as global commands", - "humanname-de": "Speichere Modul-Befehle als Globale-Befehle", - "description-en": "If enabled, module-commands will be synced to discord as global commands. They will show up on other servers, but won't work. Syncing can take up to 2 hours, so changes may not be reflected immediately.", - "description-de": "Wenn aktiviert, werden Befehle von Modulen als Globale-Befehle zu Discord gesendet. Sie werden auf anderen Servern angezeigt, werden aber nicht funktionieren. Synchronisierung kann bis zu 2 Stunden dauern." + "name": "syncCommandGlobally", + "humanName": { + "en": "Sync module commands as global commands", + "de": "Speichere Modul-Befehle als Globale-Befehle" + }, + "default": { + "en": false + }, + "description": { + "en": "If enabled, module-commands will be synced to discord as global commands. They will show up on other servers, but won't work. Syncing can take up to 2 hours, so changes may not be reflected immediately.", + "de": "Wenn aktiviert, werden Befehle von Modulen als Globale-Befehle zu Discord gesendet. Sie werden auf anderen Servern angezeigt, werden aber nicht funktionieren. Synchronisierung kann bis zu 2 Stunden dauern." + }, + "type": "boolean" } ] } \ No newline at end of file diff --git a/config-generator/strings.json b/config-generator/strings.json index 138231f5..db44e9ca 100644 --- a/config-generator/strings.json +++ b/config-generator/strings.json @@ -1,97 +1,188 @@ { - "description-de": "Passe die Nachrichten deines Botes an", - "description-en": "Configure strings & messages of your bot here", - "humanname-de": "Nachrichten", - "humanname-en": "Messages", + "description": { + "en": "Configure strings & messages of your bot here", + "de": "Passe die Nachrichten deines Botes an" + }, + "humanName": { + "en": "Messages", + "de": "Nachrichten" + }, + "filename": "strings.json", "content": [ { - "field_name": "footer", - "humanname-en": "Embed-Footer", - "default": "Powered by scnx.xyz ⚡", + "name": "footer", + "humanName": { + "en": "Embed-Footer" + }, + "default": { + "en": "Powered by scnx.xyz ⚡" + }, + "description": { + "en": "Footer of every embed", + "de": "Footer jedes Embeds" + }, "type": "string", - "description-en": "Footer of every embed", - "description-de": "Footer jedes Embeds" + "pro": true }, { - "field_name": "footerImgUrl", - "humanname-en": "Embed-Footer-Image-URL", - "humanname-de": "Embed-Footer-Bild-URL", - "default": "https://scnx.xyz/img/favicon.png", + "name": "footerImgUrl", + "humanName": { + "en": "Embed-Footer-Image-URL", + "de": "Embed-Footer-Bild-URL" + }, + "default": { + "en": "https://scnx.xyz/favicon.png" + }, + "description": { + "en": "Footer-Image of every embed", + "de": "Footer-Bild von jedem Embed" + }, "type": "string", - "description-de": "Footer-Bild von jedem Embed", - "description-en": "Footer-Image of every embed" + "pro": true }, { - "field_name": "need_args", - "humanname-en": "More arguments are needed", - "humanname-de": "Mehr Argumente werden benötigt", - "default-en": "This command needs more arguments - you passed %count%, but you need to provide at least %neededCount%.", - "default-de": "This command needs more arguments - you passed %count%, but you need to provide at least %neededCount%.", + "name": "need_args", + "humanName": { + "en": "More arguments are needed", + "de": "Mehr Argumente werden benötigt" + }, + "default": { + "en": "This command needs more arguments - you passed %count%, but you need to provide at least %neededCount%.", + "de": "This command needs more arguments - you passed %count%, but you need to provide at least %neededCount%." + }, + "description": { + "en": "This message gets send if there are not enough arguments specified", + "de": "Diese Nachricht wird versendet, wenn eine oder mehrere Argumente für einen Befehl fehlen" + }, "type": "string", - "description-en": "This message gets send if there are not enough arguments specified", - "description-de": "Diese Nachricht wird versendet, wenn eine oder mehrere Argumente für einen Befehl fehlen", "allowEmbed": true, - "params-en": [ + "params": [ { - "name": "%count%", - "description": "Count of arguments provided" + "name": "count", + "description": { + "en": "Count of arguments provided", + "de": "Anzahl von angegebenen Parameter" + } }, { - "name": "%neededCount%", - "description": "Count of arguments needed" + "name": "neededCount", + "description": { + "en": "Count of arguments needed", + "de": "Anzahl von benötigten Argumenten" + } } - ], - "params-de": [ - { - "name": "%count%", - "description": "Anzahl von angegebenen Parameter" - }, + ] + }, + { + "name": "updated_roles", + "humanName": { + "en": "Roles updated", + "de": "Rollen erfolgreich geupdated" + }, + "default": { + "en": "✅ Updated roles according to your settings", + "de": "✅ Rollen-Änderungen übernommen" + }, + "description": { + "en": "This message gets send after a user selects self-roles on a self-role-element.", + "de": "Diese Nachricht wird gesendet, wenn ein Nutzer eine Self-Rolle auswählt." + }, + "type": "string", + "allowEmbed": true + }, + { + "name": "added_role", + "humanName": { + "en": "Role added", + "de": "Rolle erfolgreich hinzugefügt" + }, + "default": { + "en": "✅ Role %role% successfully added", + "de": "✅ Rolle %role% erfolgreich hinzugefügt" + }, + "description": { + "en": "This message gets send when a user adds a role to themselves.", + "de": "Diese Nachricht wird gesendet, wenn ein Nutzer sich selbst eine Self-Rolle hinzufügt." + }, + "type": "string", + "allowEmbed": true, + "params": [ { - "name": "%neededCount%", - "description": "Anzahl von benötigten Argumenten" + "name": "role", + "description": { + "en": "Name of the role", + "de": "Name der Rolle" + } } ] }, { - "field_name": "updated_roles", - "humanname-en": "Roles updated", - "humanname-de": "Rollen erfolgreich geupdated", - "default-en": "✅ Updated roles according to your settings", - "default-de": "✅ Rollen-Änderungen übernommen", + "name": "removed_role", + "humanName": { + "en": "Role removed", + "de": "Rolle erfolgreich entfernt" + }, + "default": { + "en": "✅ Role %role% successfully removed", + "de": "✅ Rolle %role% erfolgreich entfernt" + }, + "description": { + "en": "This message gets send when a user removes a role from themselves.", + "de": "Diese Nachricht wird gesendet, wenn ein Nutzer sich selbst eine Self-Rolle entfernt." + }, "type": "string", - "description-en": "This message gets send after a user selects self-roles on a self-role-element.", - "description-de": "Diese Nachricht wird gesendet, wenn ein Nutzer eine Self-Rolle auswählt.", - "allowEmbed": true + "allowEmbed": true, + "params": [ + { + "name": "role", + "description": { + "en": "Name of the role", + "de": "Name der Rolle" + } + } + ] }, { - "field_name": "not_enough_permissions", - "humanname-en": "Not enough permissions", - "humanname-de": "Nicht genügend Rechte", - "default-en": "Seems like you don't have enough permissions.", - "default-de": "Scheint als hättest du nicht genügend Rechte.", + "name": "not_enough_permissions", + "humanName": { + "en": "Not enough permissions", + "de": "Nicht genügend Rechte" + }, + "default": { + "en": "Seems like you don't have enough permissions.", + "de": "Scheint als hättest du nicht genügend Rechte." + }, + "description": { + "en": "This message gets send if an user don't hase enough permissions", + "de": "Diese Nachricht wird versendet, wenn der Nutzer nicht genügen Rechte hat" + }, "type": "string", - "description-en": "This message gets send if an user don't hase enough permissions", - "description-de": "Diese Nachricht wird versendet, wenn der Nutzer nicht genügen Rechte hat", "allowEmbed": true }, { - "field_name": "helpembed", - "default-en": { - "title": "Help", - "description": "You can find every command here", - "module_translation": "%name% by %author%: %description%", - "build_in": "Build-In-Commands" - }, - "default-de": { - "title": "Help", - "description": "Alle Commands findest du hier", - "module_translation": "%name% by %author%: %description%", - "build_in": "Build-In-Commands" - }, - "humanname-en": "Help-Message", - "humanname-de": "Hilfe-Nachricht", + "name": "helpembed", + "humanName": { + "en": "Help-Message", + "de": "Hilfe-Nachricht" + }, + "default": { + "en": { + "title": "Help", + "description": "You can find every command here", + "module_translation": "%name% by %author%: %description%", + "build_in": "Build-In-Commands" + }, + "de": { + "title": "Help", + "description": "Alle Commands findest du hier", + "module_translation": "%name% by %author%: %description%", + "build_in": "Build-In-Commands" + } + }, + "description": { + "en": "Strings for help command" + }, "type": "keyed", - "description": "Strings for help command", "content": { "key": "string", "value": "string" @@ -99,31 +190,51 @@ "disableKeyEdits": true }, { - "field_name": "disableHelpEmbedStats", - "humanname-en": "Disable Stats in Help-Embed", - "humanname-de": "Deaktiviere Stats im Hilfe-Embed", + "name": "disableHelpEmbedStats", + "humanName": { + "en": "Disable Stats in Help-Embed", + "de": "Deaktiviere Stats im Hilfe-Embed" + }, + "default": { + "en": false + }, + "description": { + "en": "If enabled, the stats-field in the Help-Embed will get hidden", + "de": "Wenn aktiviert, wird der Stats-Bereich im Help-Embed verborgen" + }, "type": "boolean", - "default": false, - "description-de": "Wenn aktiviert, wird der Stats-Bereich im Help-Embed verborgen", - "description-en": "If enabled, the stats-field in the Help-Embed will get hidden" + "pro": true }, { - "field_name": "disableFooterTimestamp", - "humanname-en": "Disable default Timestamp in footer", - "humanname-de": "Standard-Timestamp im Footer deaktivieren", - "type": "boolean", - "default": false, - "description-de": "Wenn aktiviert, wird die Aktuelle Uhrzeit nicht im Footer angezeigt", - "description-en": "If enabled, the current time will not be displayed in the embed footer" + "name": "disableFooterTimestamp", + "humanName": { + "en": "Disable default Timestamp in footer", + "de": "Standard-Timestamp im Footer deaktivieren" + }, + "default": { + "en": false + }, + "description": { + "en": "If enabled, the current time will not be displayed in the embed footer", + "de": "Wenn aktiviert, wird die Aktuelle Uhrzeit nicht im Footer angezeigt" + }, + "type": "boolean" }, { - "field_name": "putBotInfoOnLastSite", - "humanname-en": "Put Bot-Info on the last site of the Help-Embed", - "humanname-de": "Verschiebt die Bot-Info auf die letzte Seite im Hilfe-Embed", + "name": "putBotInfoOnLastSite", + "humanName": { + "en": "Put Bot-Info on the last site of the Help-Embed", + "de": "Verschiebt die Bot-Info auf die letzte Seite im Hilfe-Embed" + }, + "default": { + "en": false + }, + "description": { + "en": "If enabled, the Bot-Info-Section of the Help-Embed will be moved to the last site", + "de": "Wenn aktiviert, wird der Bot-Info-Bereich im Help-Embed auf die letzte Seite verschoben" + }, "type": "boolean", - "default": false, - "description-de": "Wenn aktiviert, wird der Bot-Info-Bereich im Help-Embed auf die letzte Seite verschoben", - "description-en": "If enabled, the Bot-Info-Section of the Help-Embed will be moved to the last site" + "pro": true } ] } \ No newline at end of file diff --git a/main.js b/main.js index 5f2dacc3..5bba4cba 100644 --- a/main.js +++ b/main.js @@ -154,8 +154,9 @@ db.authenticate().then(async () => { await reportIssue(client, {type: 'CORE_FAILURE', errorDescription: 'log_channel_not_set_or_wrong_type'}); } } - await configChecker.loadAllConfigs(client).catch(async () => { + await configChecker.loadAllConfigs(client).catch(async (e) => { if (client.logChannel) await client.logChannel.send('⚠ ' + localize('main', 'config-check-failed')); + console.log(e); logger.fatal(localize('main', 'config-check-failed')); process.exit(1); }); @@ -210,8 +211,9 @@ async function syncCommandsIfNeeded() { }); /** - * Handele exception on command sync - * @param {Exception} e Exception + * Handels a sync failure + * @param e Exception + * @returns {Promise} */ async function handleSyncFailure(e) { logger.debug(e); diff --git a/modules/admin-tools/config.json b/modules/admin-tools/config.json index 3c6805a6..9be995c6 100644 --- a/modules/admin-tools/config.json +++ b/modules/admin-tools/config.json @@ -1,7 +1,10 @@ { + "description": {}, + "humanName": { + "en": "Configuration", + "de": "Konfiguration" + }, "filename": "config.json", - "humanname-de": "Konfiguration", - "humanname-en": "Configuration", "commandsWarnings": { "normal": [ "/admin", @@ -9,4 +12,4 @@ ] }, "content": [] -} \ No newline at end of file +} diff --git a/modules/admin-tools/module.json b/modules/admin-tools/module.json index 86b96d90..55bef2bd 100644 --- a/modules/admin-tools/module.json +++ b/modules/admin-tools/module.json @@ -1,18 +1,24 @@ { "name": "admin-tools", - "humanReadableName-en": "Admin-Tools", "author": { "scnxOrgID": "1", "name": "SCDerox (SC Network Team)", "link": "https://github.com/SCDerox" }, "openSourceURL": "https://github.com/SCNetwork/CustomDCBot/tree/main/modules/admin-tools", - "description-en": "Simple admin-tools to move channels and roles with a command and to \"borrow\" emotes.", - "description-de": "Einfache Tools für Admins, um Channel und Rollen per Command zu verschieben und Emojis zu leihen.", "commands-dir": "/commands", "config-example-files": [ "config.json" ], - "tags": ["administration"], - "fa-icon": "fas fa-tools" -} \ No newline at end of file + "tags": [ + "administration" + ], + "fa-icon": "fas fa-tools", + "humanReadableName": { + "en": "Admin-Tools" + }, + "description": { + "en": "Simple admin-tools to move channels and roles with a command and to \"borrow\" emotes.", + "de": "Einfache Tools für Admins, um Channel und Rollen per Command zu verschieben und Emojis zu leihen." + } +} diff --git a/modules/afk-system/config.json b/modules/afk-system/config.json index 352ec431..aa7bc9bd 100644 --- a/modules/afk-system/config.json +++ b/modules/afk-system/config.json @@ -1,65 +1,101 @@ { + "description": {}, + "humanName": { + "en": "Configuration", + "de": "Konfiguration" + }, "filename": "config.json", - "humanname-de": "Konfiguration", - "humanname-en": "Configuration", "content": [ { - "field_name": "sessionEndedSuccessfully", - "default": "Welcome back!", - "allowEmbed": true, + "name": "sessionEndedSuccessfully", + "humanName": {}, + "default": { + "en": "Welcome back!" + }, + "description": { + "en": "This message gets send if a user ended their session successfully." + }, "type": "string", - "description": "This message gets send if a user ended their session successfully." + "allowEmbed": true }, { - "field_name": "sessionStartedSuccessfully", - "default": "You are afk, have fun!", - "allowEmbed": true, + "name": "sessionStartedSuccessfully", + "humanName": {}, + "default": { + "en": "You are afk, have fun!" + }, + "description": { + "en": "This message gets send if a user started their session successfully." + }, "type": "string", - "description": "This message gets send if a user started their session successfully." + "allowEmbed": true }, { - "field_name": "afkUserWithReason", - "default": "%user% is afk. They gave this reason: \"%reason%\"", - "allowEmbed": true, + "name": "afkUserWithReason", + "humanName": {}, + "default": { + "en": "%user% is afk. They gave this reason: \"%reason%\"" + }, + "description": { + "en": "This message gets send if a pinged user is AFK and they have given a reason for it" + }, "type": "string", + "allowEmbed": true, "params": [ { - "name": "%reason%", - "description": "Reason for their absence" + "name": "reason", + "description": { + "en": "Reason for their absence" + } }, { - "name": "%user%", - "description": "Mention of the user who is AFK" + "name": "user", + "description": { + "en": "Mention of the user who is AFK" + } } - ], - "description": "This message gets send if a pinged user is AFK and they have given a reason for it" + ] }, { - "field_name": "afkUserWithoutReason", - "default": "%user% is afk.", + "name": "afkUserWithoutReason", + "humanName": {}, + "default": { + "en": "%user% is afk." + }, + "description": { + "en": "This message gets send if a pinged user is AFK and they have given not any a reason for it" + }, + "type": "string", "allowEmbed": true, "params": [ { - "name": "%user%", - "description": "Mention of the user who is AFK" + "name": "user", + "description": { + "en": "Mention of the user who is AFK" + } } - ], - "type": "string", - "description": "This message gets send if a pinged user is AFK and they have given not any a reason for it" + ] }, { - "field_name": "autoEndMessage", - "default-en": "Welcome back! You are not longer AFK because you wrote a message. You can start a new session with `/afk start` and disable `auto-end` if you don't want your sessions to be ended automatically.", - "default-de": "Willkommen zurück! Du bist nun nicht länger AFK, da du eine Nachricht geschrieben hast. Um eine neue Sitzung zu starten gebe bitte `/afk start` ein; solltest du dieses Verhalten deaktivieren wollen, setze außerdem den `auto-end` Parameter.", + "name": "autoEndMessage", + "humanName": {}, + "default": { + "en": "Welcome back! You are not longer AFK because you wrote a message. You can start a new session with `/afk start` and disable `auto-end` if you don't want your sessions to be ended automatically.", + "de": "Willkommen zurück! Du bist nun nicht länger AFK, da du eine Nachricht geschrieben hast. Um eine neue Sitzung zu starten gebe bitte `/afk start` ein; solltest du dieses Verhalten deaktivieren wollen, setze außerdem den `auto-end` Parameter." + }, + "description": { + "en": "This message gets send if a previously AFK user sends a message" + }, + "type": "string", "allowEmbed": true, "params": [ { - "name": "%user%", - "description": "Mention of the user who was AFK" + "name": "user", + "description": { + "en": "Mention of the user who was AFK" + } } - ], - "type": "string", - "description": "This message gets send if a previously AFK user sends a message" + ] } ] -} \ No newline at end of file +} diff --git a/modules/afk-system/module.json b/modules/afk-system/module.json index a937c192..c157289e 100644 --- a/modules/afk-system/module.json +++ b/modules/afk-system/module.json @@ -1,13 +1,10 @@ { "name": "afk-system", - "humanReadableName-en": "AFK-System", "author": { "scnxOrgID": "1", "name": "SCDerox (SC Network Team)", "link": "https://github.com/SCDerox" }, - "description-en": "Allow users to set their AFK-Status and notify other users if they try to reach them", - "description-de": "Erlaubt es deinen Nutzern, ihren AFK-Status zu setzen und benachrichtigt andere Nutzer, wenn sie diesen versuchen zu erreichen", "commands-dir": "/commands", "models-dir": "/models", "events-dir": "/events", @@ -18,5 +15,12 @@ "tools" ], "fa-icon": "fas fa-right-from-bracket", - "openSourceURL": "https://github.com/SCNetwork/CustomDCBot/tree/main/modules/afk-system" + "openSourceURL": "https://github.com/SCNetwork/CustomDCBot/tree/main/modules/afk-system", + "humanReadableName": { + "en": "AFK-System" + }, + "description": { + "en": "Allow users to set their AFK-Status and notify other users if they try to reach them", + "de": "Erlaubt es deinen Nutzern, ihren AFK-Status zu setzen und benachrichtigt andere Nutzer, wenn sie diesen versuchen zu erreichen" + } } diff --git a/modules/anti-ghostping/config.json b/modules/anti-ghostping/config.json index c2931df7..21069d65 100644 --- a/modules/anti-ghostping/config.json +++ b/modules/anti-ghostping/config.json @@ -1,66 +1,81 @@ { - "humanname-de": "Konfiguration", - "humanname-en": "Configuration", + "description": {}, + "humanName": { + "en": "Configuration", + "de": "Konfiguration" + }, "filename": "config.json", "content": [ { - "field_name": "awaitBotMessages", - "default": true, - "type": "boolean", - "description": "If enabled, the bot will wait ~2 Seconds to make sure no bot like NQN deleted the messages and answered afterwards", - "humanname-de": "Botnachrichten abwarten", - "description-de": "Wenn diese Option aktiviert ist, wird der Bot ~2 Sekunden warten, um sicherzustellen, dass kein Bot wie NQN die Nachricht gelöscht und danach geantwortet hat", - "params-de": {}, - "default-de": true + "name": "awaitBotMessages", + "humanName": { + "de": "Botnachrichten abwarten" + }, + "default": { + "en": true, + "de": true + }, + "description": { + "en": "If enabled, the bot will wait ~2 Seconds to make sure no bot like NQN deleted the messages and answered afterwards", + "de": "Wenn diese Option aktiviert ist, wird der Bot ~2 Sekunden warten, um sicherzustellen, dass kein Bot wie NQN die Nachricht gelöscht und danach geantwortet hat" + }, + "type": "boolean" }, { - "field_name": "ignoredChannels", - "default": [], - "default-de": [], + "name": "ignoredChannels", + "humanName": { + "en": "Ignored Channels", + "de": "Ignorierte Channel" + }, + "default": { + "en": [], + "de": [] + }, + "description": { + "en": "If a ghost ping gets send in one of these configured channels, the bot will not run anti-ghost-ping", + "de": "Wenn ein Ghost-Ping in einem dieser konfigurierten Channel gesendet wird, wird der Bot nicht anti-ghost-ping ausführen" + }, "type": "array", - "content": "channelID", - "description-en": "If a ghost ping gets send in one of these configured channels, the bot will not run anti-ghost-ping", - "description-de": "Wenn ein Ghost-Ping in einem dieser konfigurierten Channel gesendet wird, wird der Bot nicht anti-ghost-ping ausführen", - "humanname-de": "Ignorierte Channel", - "humanname-en": "Ignored Channels" + "content": "channelID" }, { - "field_name": "youJustGotGhostPinged", - "default": "%mentions%,\nYou just got ghost-pinged by %authorMention% with the following message: \"%msgContent%\"", - "allowEmbed": true, + "name": "youJustGotGhostPinged", + "humanName": { + "de": "Ghostping-Nachricht" + }, + "default": { + "en": "%mentions%,\nYou just got ghost-pinged by %authorMention% with the following message: \"%msgContent%\"", + "de": "%mentions%,\nDu wurdest gerade von %authorMention% mit folgender Nachricht geghost-pinged: \"%msgContent%\"" + }, + "description": { + "en": "This message gets send if a member pings another user and deletes the message afterwards", + "de": "Diese Nachricht wird gesendet, wenn ein Nutzer einen anderen Nutzer pingt und die Nachricht danach löscht" + }, "type": "string", - "description": "This message gets send if a member pings another user and deletes the message afterwards", + "allowEmbed": true, "params": [ { - "name": "%mentions%", - "description": "Mentions of every user that got pinged in the original message" - }, - { - "name": "%authorMention%", - "description": "Mention of the original message-author." - }, - { - "name": "%msgContent%", - "description": "Content of the original message" - } - ], - "humanname-de": "Ghostping-Nachricht", - "description-de": "Diese Nachricht wird gesendet, wenn ein Nutzer einen anderen Nutzer pingt und die Nachricht danach löscht", - "params-de": [ - { - "name": "%mentions%", - "description": "Erwähnung von jedem, in der Originalnachricht gepingten, Nutzer" + "name": "mentions", + "description": { + "en": "Mentions of every user that got pinged in the original message", + "de": "Erwähnung von jedem, in der Originalnachricht gepingten, Nutzer" + } }, { - "name": "%authorMention%", - "description": "Erwähnung des Autors der Originalnachricht." + "name": "authorMention", + "description": { + "en": "Mention of the original message-author.", + "de": "Erwähnung des Autors der Originalnachricht." + } }, { - "name": "%msgContent%", - "description": "Inhalt der Originalnachricht" + "name": "msgContent", + "description": { + "en": "Content of the original message", + "de": "Inhalt der Originalnachricht" + } } - ], - "default-de": "%mentions%,\nDu wurdest gerade von %authorMention% mit folgender Nachricht geghost-pinged: \"%msgContent%\"" + ] } ] -} \ No newline at end of file +} diff --git a/modules/anti-ghostping/module.json b/modules/anti-ghostping/module.json index b30ebd48..0a1823a4 100644 --- a/modules/anti-ghostping/module.json +++ b/modules/anti-ghostping/module.json @@ -1,8 +1,5 @@ { "name": "anti-ghostping", - "humanReadableName-en": "Anti-Ghostping", - "description-en": "This module detects ghost-pings and sends a message if one occurs", - "description-de": "Dieses Modul erkennt automatisch Ghost-Pings und schickt eine Nachricht, wenn einer erkannt wird", "author": { "scnxOrgID": "1", "name": "SCDerox (SC Network Team)", @@ -16,5 +13,12 @@ "tags": [ "moderation" ], - "openSourceURL": "https://github.com/SCNetwork/CustomDCBot/tree/main/modules/anti-ghostping" + "openSourceURL": "https://github.com/SCNetwork/CustomDCBot/tree/main/modules/anti-ghostping", + "humanReadableName": { + "en": "Anti-Ghostping" + }, + "description": { + "en": "This module detects ghost-pings and sends a message if one occurs", + "de": "Dieses Modul erkennt automatisch Ghost-Pings und schickt eine Nachricht, wenn einer erkannt wird" + } } diff --git a/modules/auto-delete/channels.json b/modules/auto-delete/channels.json index 03f18858..2bbc3530 100644 --- a/modules/auto-delete/channels.json +++ b/modules/auto-delete/channels.json @@ -1,35 +1,78 @@ { + "description": { + "en": "Set up channels to delete text-messages from", + "de": "Stelle hier Text-Kanäle ein, aus welchen gelöscht werden soll" + }, + "humanName": { + "en": "Text-Channels", + "de": "Text-Kanäle" + }, "filename": "channels.json", - "humanname-de": "Channels", - "humanname-en": "Channels", "configElements": true, "content": [ { - "field_name": "channelID", - "default": "", + "name": "channelID", + "humanName": { + "en": "Channel", + "de": "Kanal" + }, + "default": { + "en": "" + }, + "description": { + "en": "The Channel you want messages to be deleted from.", + "de": "Wähle den Kanal aus, aus welchen Nachrichten automatisch gelöscht werden sollen." + }, "type": "channelID", - "humanname-de": "Sprachkanal", - "humanname-en": "Voice-Channel", - "description-en": "The Voice-Channel you want the auto-deleter to clear if there are no channel members left.", - "description-de": "Wähle den Sprachkanal aus, den der Bot leeren soll, sobald keine Mitglieder mehr im Sprachkanal sind." + "content": [ + "GUILD_TEXT", + "GUILD_NEWS" + ] }, { - "field_name": "timeout", - "default": "5", - "type": "integer", - "humanname-de": "Timeout", - "humanname-en": "Timeout", - "description-en": "Timeout (in minutes) after which the messages in a channel will be deleted.", - "description-de": "Timeout (in Minuten), nachdem die Nachrichten in einem Kanal automatisch gelöscht werden sollen." + "name": "timeout", + "humanName": { + "en": "Timeout", + "de": "Timeout" + }, + "default": { + "en": "5" + }, + "description": { + "en": "Timeout (in minutes) after which the messages in a channel will be deleted.", + "de": "Timeout (in Minuten), nachdem die Nachrichten in einem Kanal automatisch gelöscht werden sollen." + }, + "type": "integer" + }, + { + "name": "purgeOnStart", + "humanName": { + "en": "Purge On Start", + "de": "Kanal leeren beim Bot Start" + }, + "default": { + "en": false + }, + "description": { + "en": "If enabled every (excluding pinned) message (max 100) in this channel gets deleted when the bot starts.", + "de": "Wenn aktiviert, werden alle (außer angepinnte) Nachrichten (max 100) aus dem gewälten Kanal, beim Start des Bots, gelöscht." + }, + "type": "boolean" }, { - "field_name": "purgeOnStart", - "default": false, - "type": "boolean", - "humanname-de": "Kanal leeren beim Bot Start", - "humanname-en": "Purge On Start", - "description-en": "If enabled every (excluding pinned) message (max 100) in this channel gets deleted when the bot starts.", - "description-de": "Wenn aktiviert, werden alle (außer angepinnte) Nachrichten (max 100) aus dem gewälten Kanal, beim Start des Bots, gelöscht." + "name": "keepMessageCount", + "default": { + "en": 0 + }, + "humanName": { + "en": "Amount of messages to keep", + "de": "Anzahl von zu behaltenden Nachrichten" + }, + "type": "integer", + "description": { + "en": "Set up a number here to always have x messages in your channel left (newest messages are kept). The number has to below 50.", + "de": "Stelle hier eine Anzahl an Nachrichten ein, die auch nach einer Löschung in dem Kanal behalten werden sollen (neuere Nachrichten werden behalten). Die Zahl muss unter 50 liegen." + } } ] } \ No newline at end of file diff --git a/modules/auto-delete/events/botReady.js b/modules/auto-delete/events/botReady.js index 3a4c6761..d28f907b 100644 --- a/modules/auto-delete/events/botReady.js +++ b/modules/auto-delete/events/botReady.js @@ -14,26 +14,37 @@ module.exports.run = async function (client) { for (const channel of client.modules['auto-delete'].uniqueChannels) { if (!channel.purgeOnStart) continue; - const dcChannel = await client.channels.fetch(channel.channelID).catch(() => {}); + const dcChannel = await client.channels.fetch(channel.channelID).catch(() => { + }); if (!dcChannel) return client.logger.error(`[auto-delete] ${localize('auto-delete', 'could-not-fetch-channel', {c: channel.channelID})}`); - const channelMessages = await dcChannel.messages.fetch().catch(() => {}); + const channelMessages = await dcChannel.messages.fetch().catch(() => { + }); if (!channelMessages) { return client.logger.error(`[auto-delete] ${localize('auto-delete', 'could-not-fetch-messages', {c: channel.channelID})}`); } if (channelMessages.size === 0) continue; - dcChannel.bulkDelete(channelMessages.filter(m => !m.pinned && m.deletable), true); + const idsToKeep = []; + if (parseInt(channel.keepMessageCount) !== 0) { + channelMessages.reverse(); + for (const message of channelMessages.values()) { + if (idsToKeep.length !== parseInt(channel.keepMessageCount)) idsToKeep.push(message.id); + } + } + dcChannel.bulkDelete(channelMessages.filter(m => !idsToKeep.includes(m.id) && !m.pinned && m.deletable), true); } for (const voiceChannel of uniqueConfigVoiceChannels) { if (!voiceChannel.purgeOnStart) continue; - const dcVoiceChannel = await client.channels.fetch(voiceChannel.channelID).catch(() => {}); + const dcVoiceChannel = await client.channels.fetch(voiceChannel.channelID).catch(() => { + }); if (!dcVoiceChannel) return client.logger.error(`[auto-delete] ${localize('auto-delete', 'could-not-fetch-channel', {c: voiceChannel.channelID})}`); if (dcVoiceChannel.members.size > 0) continue; - const channelMessages = await dcVoiceChannel.messages.fetch().catch(() => {}); + const channelMessages = await dcVoiceChannel.messages.fetch().catch(() => { + }); if (!channelMessages) { return client.logger.error(`[auto-delete] ${localize('auto-delete', 'could-not-fetch-messages', {c: voiceChannel.channelID})}`); } diff --git a/modules/auto-delete/events/messageCreate.js b/modules/auto-delete/events/messageCreate.js index 563db3a9..e2d02f9b 100644 --- a/modules/auto-delete/events/messageCreate.js +++ b/modules/auto-delete/events/messageCreate.js @@ -7,8 +7,16 @@ module.exports.run = async function (client, msg) { const channel = client.modules['auto-delete'].uniqueChannels.find(c => c.channelID === msg.channel.id); if (!channel) return; - setTimeout(() => { - if (msg.deletable && !msg.pinned) msg.delete().catch(() => { + setTimeout(async () => { + if (parseInt(channel.keepMessageCount) === 0) { + if (msg.deletable && !msg.pinned) msg.delete().catch(() => { + }); + } + const oldMessages = await msg.channel.messages.fetch({ + before: msg.id, + limit: parseInt(channel.keepMessageCount) }); - }, parseFloat(channel.timeout < 2 ? 2 : channel.timeout) * 60000); + if (oldMessages.length < parseInt(channel.keepMessageCount)) return; + if (oldMessages.last().deltable && !oldMessages.last().pinned) await oldMessages.last().delete(); + }, parseInt(channel.timeout) * 60000); }; \ No newline at end of file diff --git a/modules/auto-delete/events/voiceStateUpdate.js b/modules/auto-delete/events/voiceStateUpdate.js index aa9dcfbf..c4616057 100644 --- a/modules/auto-delete/events/voiceStateUpdate.js +++ b/modules/auto-delete/events/voiceStateUpdate.js @@ -7,20 +7,23 @@ module.exports.run = async function (client, oldState) { const channelConfigEntry = voiceChannels.find((vc) => oldState.channelId === vc.channelID); if (!channelConfigEntry) return; - const channel = await client.channels.fetch(channelConfigEntry.channelID).catch(() => {}); + const channel = await client.channels.fetch(channelConfigEntry.channelID).catch(() => { + }); if (!channel) { return client.logger.error(`[auto-delete] ${localize('auto-delete', 'could-not-fetch-channel', {c: channelConfigEntry.channelID})}`); } if (channel.type !== 'GUILD_VOICE') return; if (channel.members.size > 0) return; - const channelMessages = await channel.messages.fetch().catch(() => {}); + const channelMessages = await channel.messages.fetch().catch(() => { + }); if (!channelMessages) { return client.logger.error(`[auto-delete] ${localize('auto-delete', 'could-not-fetch-messages', {c: channelConfigEntry.channelID})}`); } if (channelMessages.size === 0) return; - setTimeout(async() => { - channel.bulkDelete(channelMessages, true).catch(() => {}); + setTimeout(async () => { + channel.bulkDelete(channelMessages, true).catch(() => { + }); }, parseInt(channelConfigEntry.timeout) * 1000 * 60); }; \ No newline at end of file diff --git a/modules/auto-delete/module.json b/modules/auto-delete/module.json index 2ce07a5f..0938fc31 100644 --- a/modules/auto-delete/module.json +++ b/modules/auto-delete/module.json @@ -1,9 +1,5 @@ { "name": "auto-delete", - "humanReadableName-en": "Auto-Message-Delete", - "humanReadableName-de": "Automatisches Löschen", - "description-en": "This module allows you to delete messages from a channel after a specified timeout to keep your channel clean", - "description-de": "Halte deine Channel sauber, in dem du alle Nachrichten nach einem bestimmten Intervall in einem Channel löschst", "author": { "scnxOrgID": "1", "name": "SCDerox (SC Network Team)", @@ -18,5 +14,13 @@ ], "tags": [ "administration" - ] -} \ No newline at end of file + ], + "humanReadableName": { + "en": "Auto-Message-Delete", + "de": "Automatisches Löschen" + }, + "description": { + "en": "This module allows you to delete messages from a channel after a specified timeout to keep your channel clean", + "de": "Halte deine Channel sauber, in dem du alle Nachrichten nach einem bestimmten Intervall in einem Channel löschst" + } +} diff --git a/modules/auto-delete/voice-channels.json b/modules/auto-delete/voice-channels.json index 56dbb054..1d116f33 100644 --- a/modules/auto-delete/voice-channels.json +++ b/modules/auto-delete/voice-channels.json @@ -1,36 +1,62 @@ { + "description": { + "en": "Set up voice-channels to delete messages from", + "de": "Stelle hier Sprach-Kanäle ein, aus welchen gelöscht werden soll" + }, + "humanName": { + "en": "Voice-Channels", + "de": "Sprach-Kanäle" + }, "filename": "voice-channels.json", - "humanname-de": "Voice-Channel", - "humanname-en": "Voice-Channels", "configElements": true, "content": [ { - "field_name": "channelID", - "default": "", + "name": "channelID", + "humanName": { + "en": "Voice-Channel", + "de": "Sprachkanal" + }, + "default": { + "en": "" + }, + "description": { + "en": "The Voice-Channel you want the auto-deleter to clear if there are no channel members left.", + "de": "Wähle den Sprachkanal aus, den der Bot leeren soll, sobald keine Mitglieder mehr im Sprachkanal sind." + }, "type": "channelID", - "content": "GUILD_VOICE", - "humanname-de": "Sprachkanal", - "humanname-en": "Voice-Channel", - "description-en": "The Voice-Channel you want the auto-deleter to clear if there are no channel members left.", - "description-de": "Wähle den Sprachkanal aus, den der Bot leeren soll, sobald keine Mitglieder mehr im Sprachkanal sind." + "content": [ + "GUILD_VOICE" + ] }, { - "field_name": "timeout", - "default": "5", - "type": "integer", - "humanname-de": "Timeout", - "humanname-en": "Timeout", - "description-en": "Timeout (in minutes) after which the messages in a Voice-Channel are deleted after the last member left the channel. Entering '0' will result in an instant deletion.", - "description-de": "Timeout (in Minuten), nachdem die Nachrichten gelöscht werden, wenn das letzte Mitglied den Sprachkanal verlassen hat. Wenn du eine '0' verwendest, werden die Nachrichten sofort gelöscht." + "name": "timeout", + "humanName": { + "en": "Timeout", + "de": "Timeout" + }, + "default": { + "en": "5" + }, + "description": { + "en": "Timeout (in minutes) after which the messages in a Voice-Channel are deleted after the last member left the channel. Entering '0' will result in an instant deletion.", + "de": "Timeout (in Minuten), nachdem die Nachrichten gelöscht werden, wenn das letzte Mitglied den Sprachkanal verlassen hat. Wenn du eine '0' verwendest, werden die Nachrichten sofort gelöscht." + }, + "type": "integer" }, { - "field_name": "purgeOnStart", - "default": false, - "type": "boolean", - "humanname-de": "Kanal leeren beim Bot Start", - "humanname-en": "Purge On Start", - "description-en": "If enabled every message (max 100) in this channel gets deleted when the bot starts and no members are left in the channel", - "description-de": "Wenn aktiviert, werden alle Nachrichten (max 100) aus dem gewälten Sprachkanal gelöscht (beim Start des Bots), sofern keine Mitglieder in dem Sprachkanal sind." + "name": "purgeOnStart", + "humanName": { + "en": "Purge On Start", + "de": "Kanal leeren beim Bot Start" + }, + "default": { + "en": false + }, + "description": { + "en": "If enabled every message (max 100) in this channel gets deleted when the bot starts and no members are left in the channel", + "de": "Wenn aktiviert, werden alle Nachrichten (max 100) aus dem gewälten Sprachkanal gelöscht (beim Start des Bots), sofern keine Mitglieder in dem Sprachkanal sind." + }, + "type": "boolean" } ] } \ No newline at end of file diff --git a/modules/auto-messager/cronjob.json b/modules/auto-messager/cronjob.json index b7079d29..d72fc116 100644 --- a/modules/auto-messager/cronjob.json +++ b/modules/auto-messager/cronjob.json @@ -1,41 +1,58 @@ { + "description": { + "en": "Advanced users can unleash the full potential of automatic message with cronejobs", + "de": "Nur für fortgeschrittene Nutzer - mit cronjob's kannst hast du die volle Kontrolle über die Nachrichten" + }, + "humanName": { + "en": "Cronjob (advanced)", + "de": "Cronjobs (fortgeschritten)" + }, "filename": "cronjob.json", - "humanname-de": "Cronjobs (fortgeschritten)", - "description-de": "Nur für fortgeschrittene Nutzer - mit cronjob's kannst hast du die volle Kontrolle über die Nachrichten", - "humanname-en": "Cronjob (advanced)", - "description-en": "Advanced users can unleash the full potential of automatic message with cronejobs", "configElements": true, "content": [ { - "field_name": "channelID", - "default": "", - "type": "channelID", - "description": "ID of the channel in which the message should be send", - "humanname-de": "Kanal", - "description-de": "ID des Kanals, in welchen die Nachricht gesendet werden soll", - "params-de": {}, - "default-de": "" + "name": "channelID", + "humanName": { + "de": "Kanal" + }, + "default": { + "en": "" + }, + "description": { + "en": "ID of the channel in which the message should be send", + "de": "ID des Kanals, in welchen die Nachricht gesendet werden soll" + }, + "type": "channelID" }, { - "field_name": "message", + "name": "message", + "humanName": { + "de": "Nachricht" + }, + "default": { + "en": "" + }, + "description": { + "en": "Message that should be send", + "de": "Nachricht, die gesendet werden soll" + }, "type": "string", - "default": "", - "description": "Message that should be send", - "allowEmbed": true, - "humanname-de": "Nachricht", - "description-de": "Nachricht, die gesendet werden soll", - "params-de": {}, - "default-de": "" + "allowEmbed": true }, { - "field_name": "expression", - "type": "string", - "default": "1 6 1-31 * *", - "description": "The message gets scheduled for this expression", - "humanname-de": "Ausdruck", - "description-de": "Die Nachricht wird für diesen Ausdruck geplant", - "params-de": {}, - "default-de": "1 6 1-31 * *" + "name": "expression", + "humanName": { + "de": "Ausdruck" + }, + "default": { + "en": "1 6 1-31 * *", + "de": "1 6 1-31 * *" + }, + "description": { + "en": "The message gets scheduled for this expression", + "de": "Die Nachricht wird für diesen Ausdruck geplant" + }, + "type": "string" } ] -} +} \ No newline at end of file diff --git a/modules/auto-messager/daily.json b/modules/auto-messager/daily.json index 76d1acd3..3260a5e1 100644 --- a/modules/auto-messager/daily.json +++ b/modules/auto-messager/daily.json @@ -1,53 +1,75 @@ { + "description": { + "en": "You can send on a daily basic here - this can be once a week or month", + "de": "Hier kannst du Nachrichten auf täglicher Basis versenden lassen - das kann auch nur einmal pro Woche oder Monat sein" + }, + "humanName": { + "en": "Daily Basic", + "de": "Tägliche Basis" + }, "filename": "daily.json", - "humanname-de": "Tägliche Basis", - "humanname-en": "Daily Basic", - "description-de": "Hier kannst du Nachrichten auf täglicher Basis versenden lassen - das kann auch nur einmal pro Woche oder Monat sein", - "description-en": "You can send on a daily basic here - this can be once a week or month", "configElements": true, "content": [ { - "field_name": "channelID", - "default": "", - "type": "channelID", - "description": "ID of the channel in which the message should be send", - "humanname-de": "Kanal", - "description-de": "ID des Kanals, in welchen die Nachricht gesendet werden soll", - "params-de": {}, - "default-de": "" + "name": "channelID", + "humanName": { + "de": "Kanal" + }, + "default": { + "en": "" + }, + "description": { + "en": "ID of the channel in which the message should be send", + "de": "ID des Kanals, in welchen die Nachricht gesendet werden soll" + }, + "type": "channelID" }, { - "field_name": "message", + "name": "message", + "humanName": { + "de": "Nachricht" + }, + "default": { + "en": "" + }, + "description": { + "en": "Message that should be send", + "de": "Nachricht, die gesendet werden soll" + }, "type": "string", - "default": "", - "description": "Message that should be send", - "allowEmbed": true, - "humanname-de": "Nachricht", - "description-de": "Nachricht, die gesendet werden soll", - "params-de": {}, - "default-de": "" + "allowEmbed": true }, { - "field_name": "limitWeekDaysTo", + "name": "limitWeekDaysTo", + "humanName": { + "de": "Wochentage begrenzen auf" + }, + "default": { + "en": [], + "de": [] + }, + "description": { + "en": "If one or more values are set, the message will only get send when the current week-day is included in this array", + "de": "Wenn ein oder mehrere Werte gesetzt sind, wird die Nachricht nur gesendet, wenn der aktuelle Wochentag hier enthalten ist" + }, "type": "array", - "default": [], - "content": "integer", - "description": "If one or more values are set, the message will only get send when the current week-day is included in this array", - "humanname-de": "Wochentage begrenzen auf", - "description-de": "Wenn ein oder mehrere Werte gesetzt sind, wird die Nachricht nur gesendet, wenn der aktuelle Wochentag hier enthalten ist", - "params-de": {}, - "default-de": [] + "content": "integer" }, { - "field_name": "limitDaysTo", + "name": "limitDaysTo", + "humanName": { + "de": "Tage begrenzen auf" + }, + "default": { + "en": [], + "de": [] + }, + "description": { + "en": "If one or more values are set, the message will only get send when the current day (of the month) is included in this array", + "de": "Wenn ein oder mehrere Werte gesetzt sind, wird die Nachricht nur gesendet, wenn der aktuelle Tag (des Monats) hier enthalten ist" + }, "type": "array", - "default": [], - "content": "integer", - "description": "If one or more values are set, the message will only get send when the current day (of the month) is included in this array", - "humanname-de": "Tage begrenzen auf", - "description-de": "Wenn ein oder mehrere Werte gesetzt sind, wird die Nachricht nur gesendet, wenn der aktuelle Tag (des Monats) hier enthalten ist", - "params-de": {}, - "default-de": [] + "content": "integer" } ] -} +} \ No newline at end of file diff --git a/modules/auto-messager/hourly.json b/modules/auto-messager/hourly.json index b6233117..6454f8e2 100644 --- a/modules/auto-messager/hourly.json +++ b/modules/auto-messager/hourly.json @@ -1,42 +1,59 @@ { + "description": { + "en": "You can send messages on an hourly basic here - this can be once or 24 times a day", + "de": "Hier kannst du Nachrichten auf stündlicher Basis schicken lassen - das kann alles von 1-24x pro Tag sein" + }, + "humanName": { + "en": "Hourly basic", + "de": "Stündliche Basis" + }, "filename": "hourly.json", - "humanname-de": "Stündliche Basis", - "description-de": "Hier kannst du Nachrichten auf stündlicher Basis schicken lassen - das kann alles von 1-24x pro Tag sein", - "humanname-en": "Hourly basic", - "description-en": "You can send messages on an hourly basic here - this can be once or 24 times a day", "configElements": true, "content": [ { - "field_name": "channelID", - "default": "", - "type": "channelID", - "description": "ID of the channel in which the message should be send", - "humanname-de": "Kanal", - "description-de": "ID des Kanals, in welchen die Nachricht gesendet werden soll", - "params-de": {}, - "default-de": "" + "name": "channelID", + "humanName": { + "de": "Kanal" + }, + "default": { + "en": "" + }, + "description": { + "en": "ID of the channel in which the message should be send", + "de": "ID des Kanals, in welchen die Nachricht gesendet werden soll" + }, + "type": "channelID" }, { - "field_name": "message", + "name": "message", + "humanName": { + "de": "Nachricht" + }, + "default": { + "en": "" + }, + "description": { + "en": "Message that should be send", + "de": "Nachricht, die gesendet werden soll" + }, "type": "string", - "default": "", - "description": "Message that should be send", - "allowEmbed": true, - "humanname-de": "Nachricht", - "description-de": "Nachricht, die gesendet werden soll", - "params-de": {}, - "default-de": "" + "allowEmbed": true }, { - "field_name": "limitHoursTo", + "name": "limitHoursTo", + "humanName": { + "de": "Stunden begrenzen auf" + }, + "default": { + "en": [], + "de": [] + }, + "description": { + "en": "If one or more values are set, the message will only get send when the current hour is included in this array", + "de": "Wenn ein oder mehrere Werte gesetzt sind, wird die Nachricht nur gesendet, wenn die aktuelle Stunde hier enthalten ist" + }, "type": "array", - "default": [], - "content": "integer", - "description": "If one or more values are set, the message will only get send when the current hour is included in this array", - "humanname-de": "Stunden begrenzen auf", - "description-de": "Wenn ein oder mehrere Werte gesetzt sind, wird die Nachricht nur gesendet, wenn die aktuelle Stunde hier enthalten ist", - "params-de": {}, - "default-de": [] + "content": "integer" } ] } \ No newline at end of file diff --git a/modules/auto-messager/module.json b/modules/auto-messager/module.json index 7cf5bb50..de28081c 100644 --- a/modules/auto-messager/module.json +++ b/modules/auto-messager/module.json @@ -1,9 +1,5 @@ { "name": "auto-messager", - "humanReadableName-en": "Automatic Messages", - "humanReadableName-de": "Automatische Nachrichten", - "description-de": "Dieses Modul erlaubt dir es dir, automatisch versenden zu lassen", - "description-en": "You can - with this module - send automatic messages", "fa-icon": "fas fa-comment-dots", "author": { "scnxOrgID": "1", @@ -19,5 +15,13 @@ ], "tags": [ "administration" - ] -} \ No newline at end of file + ], + "humanReadableName": { + "en": "Automatic Messages", + "de": "Automatische Nachrichten" + }, + "description": { + "en": "You can - with this module - send automatic messages", + "de": "Dieses Modul erlaubt dir es dir, automatisch versenden zu lassen" + } +} diff --git a/modules/auto-publisher/config.json b/modules/auto-publisher/config.json index 98fbe8e8..2535e581 100644 --- a/modules/auto-publisher/config.json +++ b/modules/auto-publisher/config.json @@ -1,49 +1,75 @@ { + "description": {}, + "humanName": { + "en": "Configuration", + "de": "Konfiguration" + }, "filename": "config.json", - "humanname-de": "Konfiguration", - "humanname-en": "Configuration", "content": [ { - "field_name": "mode", - "humanname-en": "Message-Publishing-Mode", - "humanname-de": "Nachrichten-Veröffentlichung-Modus", - "default": "all", + "name": "mode", + "humanName": { + "en": "Message-Publishing-Mode", + "de": "Nachrichten-Veröffentlichung-Modus" + }, + "default": { + "en": "all" + }, + "description": { + "en": "Modus in which this module should operate", + "de": "Modus in welchem dieses Modul arbeiten sollte" + }, "type": "select", "content": [ "all", "whitelist", "blacklist" - ], - "description-en": "Modus in which this module should operate", - "description-de": "Modus in welchem dieses Modul arbeiten sollte" + ] }, { - "field_name": "blacklist", - "humanname-en": "Blacklist", - "default": [], + "name": "blacklist", + "humanName": { + "en": "Blacklist" + }, + "default": { + "en": [] + }, + "description": { + "en": "Channel to be ignored (only if Message-Publishing-Mode = \"blacklist\")", + "de": "Kanäle, die ignoriert werden sollen (nur wenn Nachrichten-Veröffentlichung-Modus = \"blacklist\")" + }, "type": "array", - "content": "channelID", - "description-en": "Channel to be ignored (only if Message-Publishing-Mode = \"blacklist\")", - "description-de": "Kanäle, die ignoriert werden sollen (nur wenn Nachrichten-Veröffentlichung-Modus = \"blacklist\")" + "content": "channelID" }, { - "field_name": "whitelist", - "humanname-en": "Whitelist", - "default": [], + "name": "whitelist", + "humanName": { + "en": "Whitelist" + }, + "default": { + "en": [] + }, + "description": { + "en": "Channel in which messages should get published (only if Message-Publishing-Mode = \"whitelist\")", + "de": "Kanäle, in denen Nachrichten veröffentlicht werden sollen (nur wenn Message-Publishing-Mode = \"whitelist\")" + }, "type": "array", - "content": "channelID", - "description-en": "Channel in which messages should get published (only if Message-Publishing-Mode = \"whitelist\")", - "description-de": "Kanäle, in denen Nachrichten veröffentlicht werden sollen (nur wenn Message-Publishing-Mode = \"whitelist\")" + "content": "channelID" }, { - "field_name": "ignoreBots", - "humanname-en": "Ignore bots?", - "humanname-de": "Bots ignorieren?", - "description-en": "Should bots get ignored when they post a message", - "description-de": "Sollen Bots ignoriert werden, wenn sie eine Nachricht senden", - "default": true, - "type": "boolean", - "description": "If activated, bots get ignored" + "name": "ignoreBots", + "humanName": { + "en": "Ignore bots?", + "de": "Bots ignorieren?" + }, + "default": { + "en": true + }, + "description": { + "en": "Should bots get ignored when they post a message", + "de": "Sollen Bots ignoriert werden, wenn sie eine Nachricht senden" + }, + "type": "boolean" } ] -} \ No newline at end of file +} diff --git a/modules/auto-publisher/module.json b/modules/auto-publisher/module.json index 28f57ab0..83682b86 100644 --- a/modules/auto-publisher/module.json +++ b/modules/auto-publisher/module.json @@ -1,7 +1,5 @@ { "name": "auto-publisher", - "humanReadableName-en": "Automatic Publishing", - "humanReadableName-de": "Automatische Veröffentlichung", "fa-icon": "fas fa-bullhorn", "author": { "scnxOrgID": "1", @@ -9,13 +7,19 @@ "link": "https://github.com/SCDerox" }, "openSourceURL": "https://github.com/SCNetwork/CustomDCBot/tree/main/modules/auto-publisher", - "description-de": "Veröffentlicht Nachrichten in Ankündigungskanälen", - "description-en": "Publishes messages in announcement channels", "events-dir": "/events", "config-example-files": [ "config.json" ], "tags": [ "administration" - ] -} \ No newline at end of file + ], + "humanReadableName": { + "en": "Automatic Publishing", + "de": "Automatische Veröffentlichung" + }, + "description": { + "en": "Publishes messages in announcement channels", + "de": "Veröffentlicht Nachrichten in Ankündigungskanälen" + } +} diff --git a/modules/auto-react/configs/config.json b/modules/auto-react/configs/config.json index da0e6fbc..fe42cdba 100644 --- a/modules/auto-react/configs/config.json +++ b/modules/auto-react/configs/config.json @@ -1,59 +1,86 @@ { + "description": {}, + "humanName": { + "en": "Configuration", + "de": "Konfiguration" + }, "filename": "config.json", - "humanname-de": "Konfiguration", - "humanname-en": "Configuration", "content": [ { - "field_name": "channels", - "humanname-de": "Kanäle", - "humanname-en": "Channels", - "default": {}, + "name": "channels", + "humanName": { + "en": "Channels", + "de": "Kanäle" + }, + "default": { + "en": {} + }, + "description": { + "en": "Here you can add channels and the reactions in it (you can add multiple emojis with | between each one)", + "de": "Du kannst hier Kanal-IDs und die dazugehörigen Emojis eintragen (mehrere Emojis müssen mit einem | getrennt werden)" + }, "type": "keyed", - "description-en": "Here you can add channels and the reactions in it (you can add multiple emojis with | between each one)", - "description-de": "Du kannst hier Kanal-IDs und die dazugehörigen Emojis eintragen (mehrere Emojis müssen mit einem | getrennt werden)", "content": { "key": "channelID", "value": "string" } }, { - "field_name": "members", - "default": {}, - "humanname-de": "Erwähnungen", - "humanname-en": "Mentions", + "name": "members", + "humanName": { + "en": "Mentions", + "de": "Erwähnungen" + }, + "default": { + "en": {} + }, + "description": { + "en": "Here you can add members and the reactions on their mentions of them (you can add multiple emojis with | between each one)", + "de": "Du kannst hier NutzerIDs und die dazugehörigen Emojis auf Erwähnungen dieser eintragen (mehrere Emojis müssen mit einem | getrennt werden" + }, "type": "keyed", - "description-en": "Here you can add members and the reactions on their mentions of them (you can add multiple emojis with | between each one)", - "description-de": "Du kannst hier NutzerIDs und die dazugehörigen Emojis auf Erwähnungen dieser eintragen (mehrere Emojis müssen mit einem | getrennt werden", "content": { "key": "integer", "value": "string" } }, { - "field_name": "authors", - "default": {}, - "humanname-de": "Autoren", - "humanname-en": "Authors", + "name": "authors", + "humanName": { + "en": "Authors", + "de": "Autoren" + }, + "default": { + "en": {} + }, + "description": { + "en": "Here you can add members and the reactions on their messages in it (you can add multiple emojis with | between each one)", + "de": "Du kannst hier NutzerIDs und die dazugehörigen Emojis auf deren Nachrichten eintragen (mehrere Emojis müssen mit einem | getrennt werden" + }, "type": "keyed", - "description-en": "Here you can add members and the reactions on their messages in it (you can add multiple emojis with | between each one)", - "description-de": "Du kannst hier NutzerIDs und die dazugehörigen Emojis auf deren Nachrichten eintragen (mehrere Emojis müssen mit einem | getrennt werden", "content": { "key": "integer", "value": "string" } }, { - "field_name": "categories", - "humanname-de": "Kategorien", - "humanname-en": "Categories", - "default": {}, + "name": "categories", + "humanName": { + "en": "Categories", + "de": "Kategorien" + }, + "default": { + "en": {} + }, + "description": { + "en": "Here you can add categories and the reactions in it (you can add multiple emojis with | between each one)", + "de": "Du kannst hier Kategorien und die dazugehörigen Emojis eintragen (mehrere Emojis müssen mit einem | getrennt werden)" + }, "type": "keyed", - "description-en": "Here you can add categories and the reactions in it (you can add multiple emojis with | between each one)", - "description-de": "Du kannst hier Kategorien und die dazugehörigen Emojis eintragen (mehrere Emojis müssen mit einem | getrennt werden)", "content": { "key": "channelID", "value": "string" } } ] -} \ No newline at end of file +} diff --git a/modules/auto-react/configs/replies.json b/modules/auto-react/configs/replies.json index 918bee63..713075cc 100644 --- a/modules/auto-react/configs/replies.json +++ b/modules/auto-react/configs/replies.json @@ -1,26 +1,41 @@ { + "description": {}, + "humanName": { + "en": "Replies", + "de": "Antworten" + }, "filename": "replies.json", - "humanname-de": "Antworten", - "humanname-en": "Replies", "configElements": true, "content": [ { - "field_name": "members", - "default": "", - "humanname-de": "Nutzer", - "humanname-en": "User", - "type": "string", - "description-en": "Here you can add a member to be replied on mentions of them", - "description-de": "Du kannst hier einen Nutzer für Antworten auf Erwähnungen dessen eintragen" + "name": "members", + "humanName": { + "en": "User", + "de": "Nutzer" + }, + "default": { + "en": "" + }, + "description": { + "en": "Here you can add a member to be replied on mentions of them", + "de": "Du kannst hier einen Nutzer für Antworten auf Erwähnungen dessen eintragen" + }, + "type": "string" }, { - "field_name": "reply", - "default": "", - "humanname-de": "Antwort", - "humanname-en": "Reply", + "name": "reply", + "humanName": { + "en": "Reply", + "de": "Antwort" + }, + "default": { + "en": "" + }, + "description": { + "en": "Here you can add the reply message", + "de": "Du kannst hier die Antwort eintragen" + }, "type": "string", - "description-en": "Here you can add the reply message", - "description-de": "Du kannst hier die Antwort eintragen", "allowEmbed": true } ] diff --git a/modules/auto-react/module.json b/modules/auto-react/module.json index fa6fbf63..83083c37 100644 --- a/modules/auto-react/module.json +++ b/modules/auto-react/module.json @@ -1,7 +1,5 @@ { "name": "auto-react", - "humanReadableName-de": "Automatisches Reagieren", - "humanReadableName-en": "Automatic reactions", "fa-icon": "far fa-smile", "author": { "scnxOrgID": "1", @@ -9,8 +7,6 @@ "link": "https://github.com/SCDerox" }, "openSourceURL": "https://github.com/SCNetwork/CustomDCBot/tree/main/modules/auto-react", - "description-en": "Automatically reacts with selected emojis in selected channels or if a user gets pinged", - "description-de": "Reagiert automatisch mit ausgewählten Emojs in einem ausgewählten Channel und bei Pings", "events-dir": "/events", "config-example-files": [ "configs/config.json", @@ -18,5 +14,13 @@ ], "tags": [ "fun" - ] -} \ No newline at end of file + ], + "humanReadableName": { + "en": "Automatic reactions", + "de": "Automatisches Reagieren" + }, + "description": { + "en": "Automatically reacts with selected emojis in selected channels or if a user gets pinged", + "de": "Reagiert automatisch mit ausgewählten Emojs in einem ausgewählten Channel und bei Pings" + } +} diff --git a/modules/auto-thread/config.json b/modules/auto-thread/config.json index aef54b8c..1062e8b2 100644 --- a/modules/auto-thread/config.json +++ b/modules/auto-thread/config.json @@ -1,46 +1,64 @@ { + "description": {}, + "humanName": { + "en": "Configuration", + "de": "Konfiguration" + }, "filename": "config.json", - "humanname-de": "Konfiguration", - "humanname-en": "Configuration", "content": [ { - "field_name": "channels", - "humanname-de": "Kanäle", - "humanname-en": "Channels", - "default": [], + "name": "channels", + "humanName": { + "en": "Channels", + "de": "Kanäle" + }, + "default": { + "en": [], + "de": [] + }, + "description": { + "en": "Here you can add channels in which the bot should create a thread under every message", + "de": "Hier kannst du Kanäle hinzufügen, in welchen der Bot automatisch unter jeder Nachricht einen Thread erstellen soll" + }, "type": "array", - "description-en": "Here you can add channels in which the bot should create a thread under every message", - "content": "channelID", - "description-de": "Hier kannst du Kanäle hinzufügen, in welchen der Bot automatisch unter jeder Nachricht einen Thread erstellen soll", - "params-de": {}, - "default-de": [] + "content": "channelID" }, { - "field_name": "threadName", - "type": "string", - "default": "Comments", - "description": "Name of every thread", - "humanname-de": "Threadname", - "description-de": "Name jedes Threads", - "params-de": {}, - "default-de": "Kommentare" + "name": "threadName", + "humanName": { + "de": "Threadname" + }, + "default": { + "en": "Comments", + "de": "Kommentare" + }, + "description": { + "en": "Name of every thread", + "de": "Name jedes Threads" + }, + "type": "string" }, { - "field_name": "threadArchiveDuration", + "name": "threadArchiveDuration", + "humanName": { + "de": "Archivierungsdauer" + }, + "default": { + "en": "MAX", + "de": "MAX" + }, + "description": { + "en": "Inactivity after which a thread is automatically archived (in minutes, some values are limited by guild boost level; select \"max\" for the longest possible duration)", + "de": "Inaktivität nach welcher ein Thread automatisch archiviert wird (in Minutes, manche Werte sind durch das Boostlevel des Servers eingeschränkt; verwende \"max\" für die längstmögliche Dauer)" + }, "type": "select", - "default": "MAX", "content": [ "MAX", "60", "1440", "4320", "10080" - ], - "description": "Inactivity after which a thread is automatically archived (in minutes, some values are limited by guild boost level; select \"max\" for the longest possible duration)", - "humanname-de": "Archivierungsdauer", - "description-de": "Inaktivität nach welcher ein Thread automatisch archiviert wird (in Minutes, manche Werte sind durch das Boostlevel des Servers eingeschränkt; verwende \"max\" für die längstmögliche Dauer)", - "params-de": {}, - "default-de": "MAX" + ] } ] } diff --git a/modules/auto-thread/module.json b/modules/auto-thread/module.json index d1194d03..426bfc92 100644 --- a/modules/auto-thread/module.json +++ b/modules/auto-thread/module.json @@ -1,15 +1,11 @@ { "name": "auto-thread", - "humanReadableName-de": "Automatisches Thread-Erstellen", - "humanReadableName-en": "Automatic Thread-Creation", "fa-icon": "fa-regular fa-comment", "author": { "scnxOrgID": "1", "name": "SCDerox (SC Network Team)", "link": "https://github.com/SCDerox" }, - "description-en": "Automatically creates a thread under each message that gets posted in a selected channel", - "description-de": "Erstellt einen Thread unter jeder Nachricht, die in einem bestimmten Channel gesendet wird", "events-dir": "/events", "config-example-files": [ "config.json" @@ -17,5 +13,13 @@ "tags": [ "administration" ], - "openSourceURL": "https://github.com/SCNetwork/CustomDCBot/tree/main/modules/auto-thread" + "openSourceURL": "https://github.com/SCNetwork/CustomDCBot/tree/main/modules/auto-thread", + "humanReadableName": { + "en": "Automatic Thread-Creation", + "de": "Automatisches Thread-Erstellen" + }, + "description": { + "en": "Automatically creates a thread under each message that gets posted in a selected channel", + "de": "Erstellt einen Thread unter jeder Nachricht, die in einem bestimmten Channel gesendet wird" + } } diff --git a/modules/betterstatus/config.json b/modules/betterstatus/config.json index 0b1fef5c..89a88953 100644 --- a/modules/betterstatus/config.json +++ b/modules/betterstatus/config.json @@ -1,7 +1,10 @@ { + "description": {}, + "humanName": { + "en": "Configuration", + "de": "Konfiguration" + }, "filename": "config.json", - "humanname-de": "Konfiguration", - "humanname-en": "Configuration", "categories": [ { "name": "interval", @@ -14,83 +17,94 @@ ], "content": [ { - "field_name": "enableInterval", - "humanname-en": "Enable interval?", - "humanname-de": "Interval aktivieren?", - "default": false, - "category": "interval", - "type": "boolean", - "description-en": "If enabled the bot will change its status every x seconds", - "description-de": "Wenn aktiviert wird sich der Status des Bots alle x Sekunden ändern" + "name": "enableInterval", + "humanName": { + "en": "Enable interval?", + "de": "Interval aktivieren?" + }, + "default": { + "en": false + }, + "description": { + "en": "If enabled the bot will change its status every x seconds", + "de": "Wenn aktiviert wird sich der Status des Bots alle x Sekunden ändern" + }, + "type": "boolean" }, { - "field_name": "intervalStatuses", - "humanname-en": "Interval-Statuses", - "humanname-de": "Interval-Status", - "default": [], - "category": "interval", - "content": "string", + "name": "intervalStatuses", + "dependsOn": "enableInterval", + "humanName": { + "en": "Interval-Statuses", + "de": "Interval-Status" + }, + "default": { + "en": [] + }, + "description": { + "en": "Statuses from which the bot should randomly choose one", + "de": "Die Status von denen der Bot einen zufällig wählen soll" + }, "type": "array", - "description-en": "Statuses from which the bot should randomly choose one", - "description-de": "Die Status von denen der Bot einen zufällig wählen soll", + "content": "string", "params": [ { - "name": "%onlineMemberCount%", - "description": "Count of online members on your guild (will not work if presence intent not enabled)" - }, - { - "name": "%memberCount%", - "description": "Count of members on your guild" - }, - { - "name": "%randomMemberTag%", - "description": "Tag of one random member on your guild" - }, - { - "name": "%randomOnlineMemberTag%", - "description": "Tag of one random member who is online on your guild" - }, - { - "name": "%channelCount%", - "description": "Count of channels on your guild" - }, - { - "name": "%roleCount%", - "description": "Count of roles on your guild" - } - ], - "params-de": [ - { - "name": "%onlineMemberCount%", - "description": "Anzahl der Online-Mitglieder auf deinem Server" + "name": "onlineMemberCount", + "description": { + "en": "Count of online members on your guild (will not work if presence intent not enabled)", + "de": "Anzahl der Online-Mitglieder auf deinem Server" + } }, { - "name": "%memberCount%", - "description": "Anzahl der Mitglieder auf deinem Server" + "name": "memberCount", + "description": { + "en": "Count of members on your guild", + "de": "Anzahl der Mitglieder auf deinem Server" + } }, { - "name": "%randomMemberTag%", - "description": "Erwähnung eines zufälligen Nutzern auf deinem Server" + "name": "randomMemberTag", + "description": { + "en": "Tag of one random member on your guild", + "de": "Erwähnung eines zufälligen Nutzern auf deinem Server" + } }, { - "name": "%randomOnlineMemberTag%", - "description": "Erwähnung eines zufälligen online Nutzern auf deinem Server" + "name": "randomOnlineMemberTag", + "description": { + "en": "Tag of one random member who is online on your guild", + "de": "Erwähnung eines zufälligen online Nutzern auf deinem Server" + } }, { - "name": "%channelCount%", - "description": "Anzahl Channel auf deinem Server" + "name": "channelCount", + "description": { + "en": "Count of channels on your guild", + "de": "Anzahl Channel auf deinem Server" + } }, { - "name": "%roleCount%", - "description": "Anzahl Rollen auf deinem Server" + "name": "roleCount", + "description": { + "en": "Count of roles on your guild", + "de": "Anzahl Rollen auf deinem Server" + } } ] }, { - "field_name": "activityType", - "humanname-en": "Activity-Type", - "humanname-de": "Aktivität-Typ", - "default": "PLAYING", + "name": "activityType", + "humanName": { + "en": "Activity-Type", + "de": "Aktivität-Typ" + }, + "default": { + "en": "PLAYING" + }, + "description": { + "en": "Type of the user activity", + "de": "Type der Aktivität deines Bots" + }, "type": "select", "content": [ "PLAYING", @@ -98,79 +112,111 @@ "STREAMING", "COMPETING", "LISTENING" - ], - "description-de": "Type der Aktivität deines Bots", - "description-en": "Type of the user activity" + ] }, { - "field_name": "botStatus", - "humanname-en": "Bot-Status", - "humanname-de": "Bot-Status", - "default": "online", + "name": "botStatus", + "humanName": { + "en": "Bot-Status", + "de": "Bot-Status" + }, + "default": { + "en": "online" + }, + "description": { + "en": "Status of your bot", + "de": "Status deines Bots" + }, "type": "select", "content": [ "idle", "online", "dnd" - ], - "description-de": "Status deines Bots", - "description-en": "Status of your bot" + ] }, { - "field_name": "interval", - "humanname-de": "Statusänderung-Interval", - "humanname-en": "Status-Interval", - "category": "interval", - "default": 15, - "type": "integer", - "description-de": "Das Intervall der Statusänderungen in Sekunden (mindestens 10 Sekunden)", - "description-en": "The interval in seconds (at least 10 seconds)" + "name": "interval", + "humanName": { + "en": "Status-Interval", + "de": "Statusänderung-Interval" + }, + "default": { + "en": 15 + }, + "description": { + "en": "The interval in seconds (at least 10 seconds)", + "de": "Das Intervall der Statusänderungen in Sekunden (mindestens 10 Sekunden)" + }, + "type": "integer" }, { - "field_name": "changeOnUserJoin", - "humanname-de": "Beim Beitreten Status ändern?", - "humanname-en": "Change status on user join?", - "default": false, - "type": "boolean", - "description-en": "If the status should be changed if someone joins your guild", - "description-de": "Wenn aktiviert wird sich der Status des Bots ändern, wenn jemand deinem Server beitritt" + "name": "changeOnUserJoin", + "humanName": { + "en": "Change status on user join?", + "de": "Beim Beitreten Status ändern?" + }, + "default": { + "en": false + }, + "description": { + "en": "If the status should be changed if someone joins your guild", + "de": "Wenn aktiviert wird sich der Status des Bots ändern, wenn jemand deinem Server beitritt" + }, + "type": "boolean" }, { - "field_name": "userJoinStatus", - "humanname-de": "Nutzer-Join-Status", - "humanname-en": "User-Join-Status", - "default": "Welcome %tag%!", + "name": "userJoinStatus", + "dependsOn": "changeOnUserJoin", + "humanName": { + "en": "User-Join-Status", + "de": "Nutzer-Join-Status" + }, + "default": { + "en": "Welcome %tag%!" + }, + "description": { + "en": "Status that will be set if a user joins", + "de": "Dieser Status wird gesetzt, wenn jemand deinem Server beitritt" + }, "type": "string", - "description-en": "Status that will be set if a user joins and if changeOnUserJoin is enabled", - "description-de": "Dieser Status wird gesetzt, wenn jemand deinem Server beitritt und changeOnUserJoin aktiviert ist", - "params-en": [ - { - "name": "%tag%", - "description": "Tag of the new user" - }, - { - "name": "%username%", - "description": "Username of the new user" - }, - { - "name": "%memberCount%", - "description": "New member count of your guild" - } - ], - "params-de": [ + "params": [ { - "name": "%tag%", - "description": "Tag des Nutzers" + "name": "tag", + "description": { + "en": "Tag of the new user", + "de": "Tag des Nutzers" + } }, { - "name": "%username%", - "description": "Nutzername des Nutzers" + "name": "username", + "description": { + "en": "Username of the new user", + "de": "Nutzername des Nutzers" + } }, { - "name": "%memberCount%", - "description": "Anzahl der Mitglieder auf deinem Server" + "name": "memberCount", + "description": { + "en": "New member count of your guild", + "de": "Anzahl der Mitglieder auf deinem Server" + } } ] + }, + { + "name": "streamingLink", + "type": "string", + "humanName": { + "en": "Steaming-Link", + "de": "Stream-Link" + }, + "default": { + "en": "" + }, + "description": { + "de": "Wird angezeigt, wenn der Aktivität-Typ auf streaming ist und der Link von Discord unterstützt wird", + "en": "Will be shown, if the activity-typ is streaming and your link is supported by Discord" + } } ] } \ No newline at end of file diff --git a/modules/betterstatus/events/botReady.js b/modules/betterstatus/events/botReady.js index 7a19ce98..a607f3b6 100644 --- a/modules/betterstatus/events/botReady.js +++ b/modules/betterstatus/events/botReady.js @@ -9,7 +9,8 @@ module.exports.run = async function (client) { const interval = setInterval(async () => { await client.user.setActivity(await replaceStatusString(moduleConf['intervalStatuses'][moduleConf['intervalStatuses'].length * Math.random() | 0]), { - type: moduleConf['activityType'] + type: moduleConf['activityType'], + url: moduleConf['streamingLink'] }); }, moduleConf.interval < 5 ? 5000 : moduleConf.interval * 1000); // At least 5 seconds to prevent rate limiting client.intervals.push(interval); @@ -19,6 +20,13 @@ module.exports.run = async function (client) { await client.user.setPresence({status: moduleConf.botStatus}); } + if (moduleConf.activityType !== 'PLAYING' && !moduleConf.enableInterval) { + await client.user.setActivity(client.config.user_presence, { + type: moduleConf.activityType, + url: moduleConf['streamingLink'] + }); + } + /** * @private * Replace status variables diff --git a/modules/betterstatus/module.json b/modules/betterstatus/module.json index 9793340d..abd90c6f 100644 --- a/modules/betterstatus/module.json +++ b/modules/betterstatus/module.json @@ -1,6 +1,5 @@ { "name": "betterstatus", - "humanReadableName-en": "Betterstatus", "author": { "name": "SCDerox (SC Network Team)", "link": "https://github.com/SCDerox", @@ -8,11 +7,18 @@ }, "fa-icon": "far fa-user-circle", "openSourceURL": "https://github.com/SCNetwork/CustomDCBot/tree/main/modules/betterstatus", - "description-en": "Give you more features to make your status even better - change it when someone joins, change it every x seconds and more!", - "description-de": "Mache den Status deines Bots noch besser - Nutze Variablen, Intervalle und vieles mehr!", "events-dir": "/events", "config-example-files": [ "config.json" ], - "tags": ["bot"] -} \ No newline at end of file + "tags": [ + "bot" + ], + "humanReadableName": { + "en": "Betterstatus" + }, + "description": { + "en": "Give you more features to make your status even better - change it when someone joins, change it every x seconds and more!", + "de": "Mache den Status deines Bots noch besser - Nutze Variablen, Intervalle und vieles mehr!" + } +} diff --git a/modules/birthday/commands/birthday.js b/modules/birthday/commands/birthday.js index 99b90c23..2418d1d9 100644 --- a/modules/birthday/commands/birthday.js +++ b/modules/birthday/commands/birthday.js @@ -24,7 +24,7 @@ module.exports.subcommands = { dd: interaction.birthday.day, mm: interaction.birthday.month, yyyy: (interaction.birthday.year ? `.${interaction.birthday.year}` : ''), - age: interaction.birthday.year ? (localize('birthdays', 'your-age', {age: new AgeFromDateString(`${interaction.birthday.year}-${interaction.birthday.month - 1}-${interaction.birthday.day}`).age})) : '', + age: interaction.birthday.year ? (localize('birthdays', 'your-age', {age: ' ' + new AgeFromDateString(`${interaction.birthday.year}-${interaction.birthday.month - 1}-${interaction.birthday.day}`).age})) : '', syncstatus: interaction.client.configurations['birthday']['config'].disableSync ? '' : interaction.birthday.sync ? localize('birthdays', 'sync-on') : localize('birthdays', 'sync-off') // eslint-disable-line no-nested-ternary }) }); diff --git a/modules/birthday/config.json b/modules/birthday/config.json index 601b98f2..d65d2c3a 100644 --- a/modules/birthday/config.json +++ b/modules/birthday/config.json @@ -1,137 +1,173 @@ { + "description": {}, + "humanName": { + "en": "Configuration", + "de": "Konfiguration" + }, "filename": "config.json", - "humanname-de": "Konfiguration", - "humanname-en": "Configuration", "content": [ { - "field_name": "channelID", - "humanname-en": "Birthday-Channel", - "humanname-de": "Geburtstag-Channel", - "default": "", - "type": "channelID", - "description-en": "Channel-ID to run all operations in it", - "description-de": "Channel-ID des Geburtstags-Channels" + "name": "channelID", + "humanName": { + "en": "Birthday-Channel", + "de": "Geburtstag-Channel" + }, + "default": { + "en": "" + }, + "description": { + "en": "Channel-ID to run all operations in it", + "de": "Channel-ID des Geburtstags-Channels" + }, + "type": "channelID" }, { - "field_name": "enableBirthdayEmbed", - "humanname-en": "Birthday-Embed enabled", - "humanname-de": "Birthday-Embed aktiviert", - "default": true, - "type": "boolean", - "description-de": "Wenn aktiviert, wird in den Geburtstag-Channel einen Nachricht gesendet (aktualisiert sich automatisch), welche alle Geburtstage enthält", - "description-en": "If enabled, a messages (which will update itself) will be sent in the Birthday-Channel, which contains all Birthdays" + "name": "enableBirthdayEmbed", + "humanName": { + "en": "Birthday-Embed enabled", + "de": "Birthday-Embed aktiviert" + }, + "default": { + "en": true + }, + "description": { + "en": "If enabled, a messages (which will update itself) will be sent in the Birthday-Channel, which contains all Birthdays", + "de": "Wenn aktiviert, wird in den Geburtstag-Channel einen Nachricht gesendet (aktualisiert sich automatisch), welche alle Geburtstage enthält" + }, + "type": "boolean" }, { - "field_name": "birthday_message", - "humanname-de": "Geburtstags-Nachricht", - "humanname-en": "Giveaway-Message", - "default": "Happy birthday, %mention%!", + "name": "birthday_message", + "humanName": { + "en": "Giveaway-Message", + "de": "Geburtstags-Nachricht" + }, + "default": { + "en": "Happy birthday, %mention%!" + }, + "description": { + "en": "Message that gets send if the user has not set a birthday", + "de": "Diese Nachricht wird verschickt, wenn der Nutzer kein Geburtsjahr angegeben hat und Geburtstag hat" + }, "type": "string", "allowEmbed": true, - "description-en": "Message that gets send if the user has not set a birthday", - "description-de": "Diese Nachricht wird verschickt, wenn der Nutzer kein Geburtsjahr angegeben hat und Geburtstag hat", - "params-en": [ - { - "name": "%tag%", - "description": "Tag of the user" - }, + "params": [ { - "name": "%mention%", - "description": "Mention of the user" - } - ], - "params-de": [ - { - "name": "%tag%", - "description": "Tag des Nutzers" + "name": "tag", + "description": { + "en": "Tag of the user", + "de": "Tag des Nutzers" + } }, { - "name": "%mention%", - "description": "Erwähnung des Nutzers" + "name": "mention", + "description": { + "en": "Mention of the user", + "de": "Erwähnung des Nutzers" + } } ] }, { - "field_name": "birthday_message_with_age", - "humanname-de": "Geburtstags-Nachricht mit Alter", - "humanname-en": "Giveaway-Message with age", - "default-en": "Happy birthday, %mention%! You are now %age% years old!", - "default-de": "Alles Gute zum %age%ten Geburtstag, %mention%!", + "name": "birthday_message_with_age", + "humanName": { + "en": "Giveaway-Message with age", + "de": "Geburtstags-Nachricht mit Alter" + }, + "default": { + "en": "Happy birthday, %mention%! You are now %age% years old!", + "de": "Alles Gute zum %age%ten Geburtstag, %mention%!" + }, + "description": { + "en": "Message that gets send if the user has not set a birthday", + "de": "Diese Nachricht wird verschickt, wenn der Nutzer kein Geburtsjahr angegeben hat und Geburtstag hat" + }, "type": "string", "allowEmbed": true, - "description-en": "Message that gets send if the user has not set a birthday", - "description-de": "Diese Nachricht wird verschickt, wenn der Nutzer kein Geburtsjahr angegeben hat und Geburtstag hat", - "params-en": [ - { - "name": "%tag%", - "description": "Tag of the user" - }, - { - "name": "%mention%", - "description": "Mention of the user" - }, + "params": [ { - "name": "%age%", - "description": "New age of user" - } - ], - "params-de": [ - { - "name": "%tag%", - "description": "Tag des Nutzers" + "name": "tag", + "description": { + "en": "Tag of the user", + "de": "Tag des Nutzers" + } }, { - "name": "%mention%", - "description": "Erwähnung des Nutzers" + "name": "mention", + "description": { + "en": "Mention of the user", + "de": "Erwähnung des Nutzers" + } }, { - "name": "%age%", - "description": "Neues Alter des Nutzers" + "name": "age", + "description": { + "en": "New age of user", + "de": "Neues Alter des Nutzers" + } } ] }, { - "field_name": "birthday_role", - "humanname-de": "Geburtstags-Rolle", - "humanname-en": "Birthday-Role", - "description-en": "Role that is given to users when they have birthday (Leave out to disable)", - "description-de": "Diese Rolle wird an Leute vergeben, die Geburtstag haben und wieder entfernt, wenn ihr Geburtstag vorbei ist (Leer lassen, um zu deaktivieren) [Tipp: Stelle diese Rolle so ein, dass sie ganz oben angezeigt wird, denn Geburtstage sind etwas besonderes ^^]", - "default": "", + "name": "birthday_role", + "humanName": { + "en": "Birthday-Role", + "de": "Geburtstags-Rolle" + }, + "default": { + "en": "" + }, + "description": { + "en": "Role that is given to users when they have birthday (Leave out to disable)", + "de": "Diese Rolle wird an Leute vergeben, die Geburtstag haben und wieder entfernt, wenn ihr Geburtstag vorbei ist (Leer lassen, um zu deaktivieren) [Tipp: Stelle diese Rolle so ein, dass sie ganz oben angezeigt wird, denn Geburtstage sind etwas besonderes ^^]" + }, "type": "roleID", "allowNull": true }, { - "field_name": "successfully_changed", - "humanname-de": "\"Erfolgreich geändert\"-Nachricht", - "humanname-en": "\"Successfully changed\"-Message", - "default-en": "Successfully changed record!", - "default-de": "Die Änderungen wurden gespeichert!", - "allowEmbed": true, + "name": "successfully_changed", + "humanName": { + "en": "\"Successfully changed\"-Message", + "de": "\"Erfolgreich geändert\"-Nachricht" + }, + "default": { + "en": "Successfully changed record!", + "de": "Die Änderungen wurden gespeichert!" + }, + "description": { + "en": "Message that gets send when the bot changes an item", + "de": "Diese Nachricht wird verschickt, wenn eine Änderung übernommen wurde." + }, "type": "string", - "description-en": "Message that gets send when the bot changes an item", - "description-de": "Diese Nachricht wird verschickt, wenn eine Änderung übernommen wurde." + "allowEmbed": true }, { - "field_name": "birthdayEmbed", - "humanname-en": "Birthday-Embed", - "humanname-de": "Geburtstags-Embed", - "description-de": "Passe hier das Geburtstage-Embed an (Du kannst einige Optionen gerne leer lassen)", - "description-en": "Change settings of the birthday-embed here", - "type": "keyed", - "default-en": { - "title": "Birthdays", - "color": "GREEN", - "thumbnail": " ", - "image": " ", - "description": "Here you can find every birthday - add yours with !birthday [Year]" - }, - "default-de": { - "title": "Geburtstage", - "color": "GREEN", - "thumbnail": " ", - "image": " ", - "description": "Hier siehst du die Geburtstage unserer Mitglieder - du kannst deinen Geburtstag mit `/birthday set [Year]` hinzufügen." + "name": "birthdayEmbed", + "humanName": { + "en": "Birthday-Embed", + "de": "Geburtstags-Embed" + }, + "default": { + "en": { + "title": "Birthdays", + "color": "GREEN", + "thumbnail": " ", + "image": " ", + "description": "Here you can find every birthday - add yours with !birthday [Year]" + }, + "de": { + "title": "Geburtstage", + "color": "GREEN", + "thumbnail": " ", + "image": " ", + "description": "Hier siehst du die Geburtstage unserer Mitglieder - du kannst deinen Geburtstag mit `/birthday set [Year]` hinzufügen." + } + }, + "description": { + "en": "Change settings of the birthday-embed here", + "de": "Passe hier das Geburtstage-Embed an (Du kannst einige Optionen gerne leer lassen)" }, + "type": "keyed", "content": { "key": "string", "value": "string" @@ -139,32 +175,50 @@ "disableKeyEdits": true }, { - "field_name": "forceSCNetworkSync", - "humanname-en": "Force SC Network Account Sync", - "humanname-de": "SC Network Account Synchronisierung erzwingen", - "default": false, - "type": "boolean", - "description-en": "If enabled, users can not set a local birthday on this server, instead they have to use the SC Network Dashboard to set their birthday", - "description-de": "Wenn aktiviert können Nutzer ihr Geburtsdatum nur über das SC Network Dashboard anpassen - dies kann eventuellen Missbrauch verhindern und als Sicherheitsmaßnahme dienen (empfohlen, wenn Preise für Geburtstags-Kinder gegeben werden)" + "name": "forceSCNetworkSync", + "humanName": { + "en": "Force SC Network Account Sync", + "de": "SC Network Account Synchronisierung erzwingen" + }, + "default": { + "en": false + }, + "description": { + "en": "If enabled, users can not set a local birthday on this server, instead they have to use the SC Network Dashboard to set their birthday", + "de": "Wenn aktiviert können Nutzer ihr Geburtsdatum nur über das SC Network Dashboard anpassen - dies kann eventuellen Missbrauch verhindern und als Sicherheitsmaßnahme dienen (empfohlen, wenn Preise für Geburtstags-Kinder gegeben werden)" + }, + "type": "boolean" }, { - "field_name": "useTags", - "humanname-en": "Use User's Tags instead of their Mention", - "humanname-de": "Nutze den Tag der Nutzer, anstatt eine Erwähnung", - "default": false, - "type": "boolean", - "description-de": "Wenn aktiviert, wird im Geburtags-Embed der Tag des Nutzers angezeigt und nicht eine Erwähnung (bei großen Servern empfohlen)", - "description-en": "If enabled, the bot will use the tag of users in the birthday embed instead of their mention." + "name": "useTags", + "humanName": { + "en": "Use User's Tags instead of their Mention", + "de": "Nutze den Tag der Nutzer, anstatt eine Erwähnung" + }, + "default": { + "en": false + }, + "description": { + "en": "If enabled, the bot will use the tag of users in the birthday embed instead of their mention.", + "de": "Wenn aktiviert, wird im Geburtags-Embed der Tag des Nutzers angezeigt und nicht eine Erwähnung (bei großen Servern empfohlen)" + }, + "type": "boolean" }, { - "field_name": "disableSync", - "humanname-en": "Disable SC Network Account Sync & Age calculations", - "humanname-de": "SC Network Account Synchronization und Altersberechnungen deaktivieren", - "pro": true, - "default": false, + "name": "disableSync", + "humanName": { + "en": "Disable SC Network Account Sync & Age calculations", + "de": "SC Network Account Synchronization und Altersberechnungen deaktivieren" + }, + "default": { + "en": false + }, + "description": { + "en": "If enabled, users can't sync their birthdays and can't calculate their age.", + "de": "Wenn aktiviert, werden Nutzer nicht mehr ihre Geburtstage synchronisieren oder berechnen könne." + }, "type": "boolean", - "description-en": "If enabled, users can't sync their birthdays and can't calculate their age.", - "description-de": "Wenn aktiviert, werden Nutzer nicht mehr ihre Geburtstage synchronisieren oder berechnen könne." + "pro": true } ] } \ No newline at end of file diff --git a/modules/birthday/module.json b/modules/birthday/module.json index badf14a7..9ee4d819 100644 --- a/modules/birthday/module.json +++ b/modules/birthday/module.json @@ -1,14 +1,11 @@ { "name": "birthday", - "humanReadableName-en": "Birthday-Calendar", - "humanReadableName-de": "Geburtstags-Kalender", - "description-en": "Let users set their birthday and congratulate them when they have birthday", "fa-icon": "fas fa-birthday-cake", - "description-de": "Lasse deine Nutzer ihre Geburtstage eintragen und gratuliere automatisch, wenn sie Geburtstag haben!", "openSourceURL": "https://github.com/SCNetwork/CustomDCBot/tree/main/modules/birthday", "author": { "scnxOrgID": "1", - "name": "SCDerox (SC Network Team)", "link": "https://github.com/SCDerox" + "name": "SCDerox (SC Network Team)", + "link": "https://github.com/SCDerox" }, "commands-dir": "/commands", "models-dir": "/models", @@ -16,5 +13,15 @@ "config-example-files": [ "config.json" ], - "tags": ["community"] -} \ No newline at end of file + "tags": [ + "community" + ], + "humanReadableName": { + "en": "Birthday-Calendar", + "de": "Geburtstags-Kalender" + }, + "description": { + "en": "Let users set their birthday and congratulate them when they have birthday", + "de": "Lasse deine Nutzer ihre Geburtstage eintragen und gratuliere automatisch, wenn sie Geburtstag haben!" + } +} diff --git a/modules/channel-stats/channels.json b/modules/channel-stats/channels.json index 692dab81..72f6017d 100644 --- a/modules/channel-stats/channels.json +++ b/modules/channel-stats/channels.json @@ -1,181 +1,175 @@ { + "description": {}, + "humanName": { + "en": "Configuration", + "de": "Konfiguration" + }, "filename": "channels.json", - "humanname-de": "Konfiguration", - "humanname-en": "Configuration", "configElements": true, "content": [ { - "field_name": "channelID", - "default": "", - "type": "channelID", - "description": "ID of the voice channel", - "humanname-de": "Kanal", - "description-de": "ID des Sprachkanals", - "params-de": {}, - "default-de": "" + "name": "channelID", + "humanName": { + "de": "Kanal" + }, + "default": { + "en": "" + }, + "description": { + "en": "ID of the voice channel", + "de": "ID des Sprachkanals" + }, + "type": "channelID" }, { - "field_name": "channelName", - "default": "", - "description": "Name of Channel", + "name": "channelName", + "humanName": { + "de": "Kanalname" + }, + "default": { + "en": "" + }, + "description": { + "en": "Name of Channel", + "de": "Name des Kanals" + }, "type": "string", "params": [ { - "name": "%userCount%", - "description": "Total count of users on your server" + "name": "userCount", + "description": { + "en": "Total count of users on your server", + "de": "Anzahl an Nutzern auf dem Server" + } }, { - "name": "%memberCount%", - "description": "Total count of members (not bots) on your server" + "name": "memberCount", + "description": { + "en": "Total count of members (not bots) on your server", + "de": "Anzahl an Mitgliedern (keine Bots) auf dem Server" + } }, { - "name": "%onlineUserCount%", - "description": "Total count of online (dnd or online status) users on your server" + "name": "onlineUserCount", + "description": { + "en": "Total count of online (dnd or online status) users on your server", + "de": "Anzahl an Mitgliedern (keine Bots) auf dem Server, welche Online sind (Bitte nicht stören oder Online Status)" + } }, { - "name": "%onlineMemberCount%", - "description": "Total count of online (dnd or online status) members (not bots) on your server" + "name": "channelCount", + "description": { + "en": "Total count of channels on your server", + "de": "Anzahl der Kanäle auf dem Server" + } }, { - "name": "%channelCount%", - "description": "Total count of channels on your server" + "name": "roleCount", + "description": { + "en": "Total count of roles on your server", + "de": "Anzahl der Rollen auf dem Server" + } }, { - "name": "%roleCount%", - "description": "Total count of roles on your server" + "name": "botCount", + "description": { + "en": "Count of Bots on your server", + "de": "Anzahl der Bots auf dem Server" + } }, { - "name": "%botCount%", - "description": "Count of Bots on your server" + "name": "dndCount", + "description": { + "en": "Count of members (not bots) with DND as status", + "de": "Anzahl der Mitglieder (keine Bots) mit Bitte nicht stören als Status" + } }, { - "name": "%dndCount%", - "description": "Count of members (not bots) with DND as status" + "name": "onlineMemberCount", + "description": { + "en": "Count of members (not bots) with online (and only online) as status", + "de": "Anzahl der Mitglieder (keine Bots) mit Online (und NUR Online) als Status" + } }, { - "name": "%onlineMemberCount%", - "description": "Count of members (not bots) with online (and only online) as status" + "name": "awayCount", + "description": { + "en": "Count of members (not bots) with away status", + "de": "Anzahl der Mitglieder (keine Bots) mit \"Abwesend\" Status" + } }, { - "name": "%awayCount%", - "description": "Count of members (not bots) with away status" + "name": "offlineCount", + "description": { + "en": "Count of members (not bots) with offline status", + "de": "Anzahl der Mitglieder (keine Bots) mit \"Offline\" status" + } }, { - "name": "%offlineCount%", - "description": "Count of members (not bots) with offline status" + "name": "guildBoosts", + "description": { + "en": "Show how often this guild was boosted", + "de": "Zeigt, wie oft der Server geboostet wurde" + } }, { - "name": "%guildBoosts%", - "description": "Show how often this guild was boosted" + "name": "boostLevel", + "description": { + "en": "Shows the current boost-level of this guild", + "de": "Zeigt das aktuelle Boost-Level des Servers" + } }, { - "name": "%boostLevel%", - "description": "Shows the current boost-level of this guild" + "name": "boosterCount", + "description": { + "en": "Count of boosters on this guild", + "de": "Anzahl an Boostern auf dem Server" + } }, { - "name": "%boosterCount%", - "description": "Count of boosters on this guild" + "name": "emojiCount", + "description": { + "en": "Count of emojis on this guild", + "de": "Anzahl an Emojis auf dem Server" + } }, { - "name": "%emojiCount%", - "description": "Count of emojis on this guild" + "name": "currentTime", + "description": { + "en": "Current time and date", + "de": "Aktuelles Datum und Uhrzeit" + } }, { - "name": "%currentTime%", - "description": "Current time and date" + "name": "userWithRoleCount-", + "description": { + "en": "Count of members with a specific role (replace \"\" with an actual role-id)", + "de": "Anzahl von Nutzern mit einer bestimmen Rolle (bitte \"\" mit einer echten Rollen-ID ersetzen)" + } }, { - "name": "%userWithRoleCount-%", - "description": "Count of members with a specific role (replace \"\" with an actual role-id)" - }, - { - "name": "%onlineUserWithRoleCount-%", - "description": "Count of members with a specific role who are online (replace \"\" with an actual role-id)" - } - ], - "humanname-de": "Kanalname", - "description-de": "Name des Kanals", - "params-de": [ - { - "name": "%userCount%", - "description": "Anzahl an Nutzern auf dem Server" - }, - { - "name": "%memberCount%", - "description": "Anzahl an Mitgliedern (keine Bots) auf dem Server" - }, - { - "name": "%onlineUserCount%", - "description": "Anzahl an Mitgliedern (keine Bots) auf dem Server, welche Online sind (Bitte nicht stören oder Online Status)" - }, - { - "name": "%channelCount%", - "description": "Anzahl der Kanäle auf dem Server" - }, - { - "name": "%roleCount%", - "description": "Anzahl der Rollen auf dem Server" - }, - { - "name": "%botCount%", - "description": "Anzahl der Bots auf dem Server" - }, - { - "name": "%dndCount%", - "description": "Anzahl der Mitglieder (keine Bots) mit Bitte nicht stören als Status" - }, - { - "name": "%onlineMemberCount%", - "description": "Anzahl der Mitglieder (keine Bots) mit Online (und NUR Online) als Status" - }, - { - "name": "%awayCount%", - "description": "Anzahl der Mitglieder (keine Bots) mit \"Abwesend\" Status" - }, - { - "name": "%offlineCount%", - "description": "Anzahl der Mitglieder (keine Bots) mit \"Offline\" status" - }, - { - "name": "%guildBoosts%", - "description": "Zeigt, wie oft der Server geboostet wurde" - }, - { - "name": "%boostLevel%", - "description": "Zeigt das aktuelle Boost-Level des Servers" - }, - { - "name": "%boosterCount%", - "description": "Anzahl an Boostern auf dem Server" - }, - { - "name": "%emojiCount%", - "description": "Anzahl an Emojis auf dem Server" - }, - { - "name": "%currentTime%", - "description": "Aktuelles Datum und Uhrzeit" - }, - { - "name": "%userWithRoleCount-%", - "description": "Anzahl von Nutzern mit einer bestimmen Rolle (bitte \"\" mit einer echten Rollen-ID ersetzen)" - }, - { - "name": "%onlineUserWithRoleCount-%", - "description": "Anzahl von Nutzern mit einer bestimmen Rolle, die online sind (bitte \"\" mit einer echten Rollen-ID ersetzen)" + "name": "onlineUserWithRoleCount-", + "description": { + "en": "Count of members with a specific role who are online (replace \"\" with an actual role-id)", + "de": "Anzahl von Nutzern mit einer bestimmen Rolle, die online sind (bitte \"\" mit einer echten Rollen-ID ersetzen)" + } } - ], - "default-de": "" + ] }, { - "field_name": "updateInterval", - "default": "15", - "type": "integer", - "description": "You can set an interval here in which the bot should update the channels. Must be higher than seven; in minutes.", - "humanname-de": "Aktualisierungsintervall", - "description-de": "Du kannst hier ein Intervall einstellen, in welchem der Bot die Kanäle aktualisieren soll. Muss höher als sieben sein; in Minuten.", - "params-de": {}, - "default-de": 15 + "name": "updateInterval", + "humanName": { + "de": "Aktualisierungsintervall" + }, + "default": { + "en": "15", + "de": 15 + }, + "description": { + "en": "You can set an interval here in which the bot should update the channels. Must be higher than seven; in minutes.", + "de": "Du kannst hier ein Intervall einstellen, in welchem der Bot die Kanäle aktualisieren soll. Muss höher als sieben sein; in Minuten." + }, + "type": "integer" } ] } \ No newline at end of file diff --git a/modules/channel-stats/module.json b/modules/channel-stats/module.json index 7bf35651..3477b059 100644 --- a/modules/channel-stats/module.json +++ b/modules/channel-stats/module.json @@ -1,9 +1,5 @@ { "name": "channel-stats", - "humanReadableName-en": "Channel-Stats", - "humanReadableName-de": "Channel-Statistiken", - "description-de": "Modul, um Channel mit automatisch aktualisierenden Namen mit Statistiken zu erstellen", - "description-en": "Simply create channels containing some stats about your server - updated automatically", "fa-icon": "fas fa-stream", "author": { "scnxOrgID": "1", @@ -17,5 +13,13 @@ "tags": [ "administration" ], - "openSourceURL": "https://github.com/SCNetwork/CustomDCBot/tree/main/modules/channel-stats" + "openSourceURL": "https://github.com/SCNetwork/CustomDCBot/tree/main/modules/channel-stats", + "humanReadableName": { + "en": "Channel-Stats", + "de": "Channel-Statistiken" + }, + "description": { + "en": "Simply create channels containing some stats about your server - updated automatically", + "de": "Modul, um Channel mit automatisch aktualisierenden Namen mit Statistiken zu erstellen" + } } diff --git a/modules/color-me/configs/config.json b/modules/color-me/configs/config.json index e149dae7..c5668c2a 100644 --- a/modules/color-me/configs/config.json +++ b/modules/color-me/configs/config.json @@ -1,54 +1,88 @@ { + "description": { + "en": "Configure the function of the module here", + "de": "Stelle hier die Funktionen des Modules ein" + }, + "humanName": { + "en": "Configuration", + "de": "Konfiguration" + }, "filename": "config.json", - "humanname-de": "Konfiguration", - "humanname-en": "Configuration", - "description-en": "Configure the function of the module here", - "description-de": "Stelle hier die Funktionen des Modules ein", "content": [ { - "field_name": "recreateRole", - "humanname-en": "Recreate roles", - "humanname-de": "Rollen wiederherstellen", - "description-en": "Should the role be created again if the user boosts again?", - "description-de": "Soll die Rolle wiederhergestellt werden, wenn ein Nutzer erneut boostet?", - "type": "boolean", - "default": true + "name": "recreateRole", + "humanName": { + "en": "Recreate roles", + "de": "Rollen wiederherstellen" + }, + "default": { + "en": true + }, + "description": { + "en": "Should the role be created again if the user boosts again?", + "de": "Soll die Rolle wiederhergestellt werden, wenn ein Nutzer erneut boostet?" + }, + "type": "boolean" }, { - "field_name": "listRoles", - "humanname-en": "Separate roles in member-list", - "humanname-de": "Rollen in Mitgliederliste separieren", - "description-en": "Should the role be listed separately in the member-list?", - "description-de": "Soll die Rolle in der Mitgliederliste separat gelistet werden?", - "type": "boolean", - "default": false + "name": "listRoles", + "humanName": { + "en": "Separate roles in member-list", + "de": "Rollen in Mitgliederliste separieren" + }, + "default": { + "en": false + }, + "description": { + "en": "Should the role be listed separately in the member-list?", + "de": "Soll die Rolle in der Mitgliederliste separat gelistet werden?" + }, + "type": "boolean" }, { - "field_name": "removeOnUnboost", - "humanname-en": "Remove role on unboost", - "humanname-de": "Rolle bei Unboost entfernen", - "description-en": "Should the role be deleted automatically, if the user stops boosting your server? (disable, if also non-boosters should be able to use this command)", - "description-de": "Soll die Rolle automatisch gelöscht werden, wenn der Nutzer den Server nicht mehr boostet? (deaktivieren, wenn auch nicht-Booster den Befehl verwenden können sollen)", - "type": "boolean", - "default": false + "name": "removeOnUnboost", + "humanName": { + "en": "Remove role on unboost", + "de": "Rolle bei Unboost entfernen" + }, + "default": { + "en": false + }, + "description": { + "en": "Should the role be deleted automatically, if the user stops boosting your server? (disable, if also non-boosters should be able to use this command)", + "de": "Soll die Rolle automatisch gelöscht werden, wenn der Nutzer den Server nicht mehr boostet? (deaktivieren, wenn auch nicht-Booster den Befehl verwenden können sollen)" + }, + "type": "boolean" }, { - "field_name": "updateCooldown", - "humanname-en": "Role update cooldown", - "humanname-de": "Rollenbearbeitungscooldown", - "description-en": "The amount of time a user needs to wait util they can edit their role again (in hours)", - "description-de": "Die Dauer, die Benutzer*innen warten müssen, bevor ihre Rolle wieder bearbeitet werden kann (in Stunden)", - "type": "integer", - "default": 24 + "name": "updateCooldown", + "humanName": { + "en": "Role update cooldown", + "de": "Rollenbearbeitungscooldown" + }, + "default": { + "en": 24 + }, + "description": { + "en": "The amount of time a user needs to wait util they can edit their role again (in hours)", + "de": "Die Dauer, die Benutzer*innen warten müssen, bevor ihre Rolle wieder bearbeitet werden kann (in Stunden)" + }, + "type": "integer" }, { - "field_name": "rolePosition", - "humanname-en": "Role position", - "humanname-de": "Rollenposition", - "description-en": "The role, beneath which the custom-roles should be created", - "description-de": "Die Rolle unter welcher die Custom-Rollen erstellt werden sollen", - "type": "roleID", - "default": "" + "name": "rolePosition", + "humanName": { + "en": "Role position", + "de": "Rollenposition" + }, + "default": { + "en": "" + }, + "description": { + "en": "The role, beneath which the custom-roles should be created", + "de": "Die Rolle unter welcher die Custom-Rollen erstellt werden sollen" + }, + "type": "roleID" } ] } \ No newline at end of file diff --git a/modules/color-me/configs/strings.json b/modules/color-me/configs/strings.json index 31c1f499..df908b1b 100644 --- a/modules/color-me/configs/strings.json +++ b/modules/color-me/configs/strings.json @@ -1,86 +1,124 @@ { + "description": { + "en": "Edit the messages and strings of the module here", + "de": "Stelle hier die Nachrichten des Modules ein" + }, + "humanName": { + "en": "Messages", + "de": "Nachrichten" + }, "filename": "strings.json", - "humanname-de": "Nachrichten", - "humanname-en": "Messages", - "description-en": "Edit the messages and strings of the module here", - "description-de": "Stelle hier die Nachrichten des Modules ein", "content": [ { - "field_name": "created", - "humanname-en": "Role created", - "humanname-de": "Rolle erstellt", - "default-en": "Your role was created successfully.", - "default-de": "Deine Rolle wurde erfolgreich erstellt.", + "name": "created", + "humanName": { + "en": "Role created", + "de": "Rolle erstellt" + }, + "default": { + "en": "Your role was created successfully.", + "de": "Deine Rolle wurde erfolgreich erstellt." + }, + "description": { + "en": "This messages gets send when a booster sucessfully created their custom role", + "de": "Diese Nachricht wird verschickt, wenn ein Booster seine/ihre Custom-Rolle erstellt hat" + }, "type": "string", - "allowEmbed": true, - "description-en": "This messages gets send when a booster sucessfully created their custom role", - "description-de": "Diese Nachricht wird verschickt, wenn ein Booster seine/ihre Custom-Rolle erstellt hat", - "params-de": {} + "allowEmbed": true }, { - "field_name": "updated", - "humanname-en": "Role updated", - "humanname-de": "Rolle aktualisiert", - "default-en": "Your role was updated successfully.", - "default-de": "Deine Rolle wurde erfolgreich aktualisiert.", + "name": "updated", + "humanName": { + "en": "Role updated", + "de": "Rolle aktualisiert" + }, + "default": { + "en": "Your role was updated successfully.", + "de": "Deine Rolle wurde erfolgreich aktualisiert." + }, + "description": { + "en": "This messages gets send when a booster sucessfully updates their custom role", + "de": "Diese Nachricht wird verschickt, wenn ein Booster seine/ihre Custom-Rolle aktualisiert hat" + }, "type": "string", - "allowEmbed": true, - "description-en": "This messages gets send when a booster sucessfully updates their custom role", - "description-de": "Diese Nachricht wird verschickt, wenn ein Booster seine/ihre Custom-Rolle aktualisiert hat", - "params-de": {} + "allowEmbed": true }, { - "field_name": "removed", - "humanname-en": "Role removed", - "humanname-de": "Rolle entfernt", - "default-en": "Your role was removed successfully.", - "default-de": "Deine Rolle wurde erfolgreich entfernt.", + "name": "removed", + "humanName": { + "en": "Role removed", + "de": "Rolle entfernt" + }, + "default": { + "en": "Your role was removed successfully.", + "de": "Deine Rolle wurde erfolgreich entfernt." + }, + "description": { + "en": "This messages gets send when a booster deleted their custom role", + "de": "Diese Nachricht wird verschickt, wenn ein Booster seine/ihre Custom-Rolle entfernt hat" + }, "type": "string", - "allowEmbed": true, - "description-en": "This messages gets send when a booster deleted their custom role", - "description-de": "Diese Nachricht wird verschickt, wenn ein Booster seine/ihre Custom-Rolle entfernt hat", - "params-de": {} + "allowEmbed": true }, { - "field_name": "roleLimit", - "humanname-en": "Role-limit reached", - "humanname-de": "Rollenlimit erreicht", - "default-en": "Your role couldn't be created. This could be, because this server has reached the maximum of roles set by Discord. Ask the staff to delete an unnecessary role to make space for your role or try again later.", - "default-de": "Deine Rolle konnte nicht erstellt werden. Das kann daran liegen, dass dieser Server die von Discord vorgegebene maximale Rollenzahl erreicht hat. Frag das Team nach der Löschung einer überflüssigen Rolle um Platz zu machen, oder versuche es später erneut.", + "name": "roleLimit", + "humanName": { + "en": "Role-limit reached", + "de": "Rollenlimit erreicht" + }, + "default": { + "en": "Your role couldn't be created. This could be, because this server has reached the maximum of roles set by Discord. Ask the staff to delete an unnecessary role to make space for your role or try again later.", + "de": "Deine Rolle konnte nicht erstellt werden. Das kann daran liegen, dass dieser Server die von Discord vorgegebene maximale Rollenzahl erreicht hat. Frag das Team nach der Löschung einer überflüssigen Rolle um Platz zu machen, oder versuche es später erneut." + }, + "description": { + "en": "This messages gets send when a booster-role couldn't be created", + "de": "Diese Nachricht wird verschickt, wenn eine Booster-Rolle nicht erstellt werden konnte" + }, "type": "string", - "allowEmbed": true, - "description-en": "This messages gets send when a booster-role couldn't be created", - "description-de": "Diese Nachricht wird verschickt, wenn eine Booster-Rolle nicht erstellt werden konnte", - "params-de": {} + "allowEmbed": true }, { - "field_name": "cooldown", - "humanname-en": "Cooldown", - "humanname-de": "Cooldown", - "default-en": "Your role couldn't be edited, since you have to wait until %cooldown% for the cooldown to expire.", - "default-de": "Deine Rolle konnte nicht bearbeitet werden, da du bis %cooldown% warten musst, dass der Cooldown abläuft.", + "name": "cooldown", + "humanName": { + "en": "Cooldown", + "de": "Cooldown" + }, + "default": { + "en": "Your role couldn't be edited, since you have to wait until %cooldown% for the cooldown to expire.", + "de": "Deine Rolle konnte nicht bearbeitet werden, da du bis %cooldown% warten musst, dass der Cooldown abläuft." + }, + "description": { + "en": "This messages gets send when a booster-role couldn't be edited, since the user is on cooldown", + "de": "Diese Nachricht wird verschickt, wenn eine Booster-Rolle nicht bearbeitet werden konnte, da der Nutzer den Cooldown abwarten muss" + }, "type": "string", "allowEmbed": true, - "description-en": "This messages gets send when a booster-role couldn't be edited, since the user is on cooldown", - "description-de": "Diese Nachricht wird verschickt, wenn eine Booster-Rolle nicht bearbeitet werden konnte, da der Nutzer den Cooldown abwarten muss", - "params-de": [ + "params": [ { - "name": "%cooldown%", - "description": "Timestamp the cooldown expires at" + "name": "cooldown", + "description": { + "en": "Timestamp the cooldown expires at", + "de": "Zeitpunkt, an welchem der Cooldown abläuft" + } } ] }, { - "field_name": "invalidColor", - "humanname-en": "Invalid Color", - "humanname-de": "Falsche Farbe", - "default-en": "The color you provided is not a valid HEX-Code.", - "default-de": "Die angegebene Farbe ist kein gültiger HEX-Code.", + "name": "invalidColor", + "humanName": { + "en": "Invalid Color", + "de": "Falsche Farbe" + }, + "default": { + "en": "The color you provided is not a valid HEX-Code.", + "de": "Die angegebene Farbe ist kein gültiger HEX-Code." + }, + "description": { + "en": "This messages gets send when the user provides a wrong color code", + "de": "Diese Nachricht wird verschickt, wenn der Nutzer einen falschen Farbcode angibt" + }, "type": "string", - "allowEmbed": true, - "description-en": "This messages gets send when the user provides a wrong color code", - "description-de": "Diese Nachricht wird verschickt, wenn der Nutzer einen falschen Farbcode angibt", - "params-de": {} + "allowEmbed": true } ] -} \ No newline at end of file +} diff --git a/modules/color-me/module.json b/modules/color-me/module.json index 61aa5b06..7f6689d5 100644 --- a/modules/color-me/module.json +++ b/modules/color-me/module.json @@ -1,14 +1,14 @@ { "name": "color-me", - "humanReadableName": "Color me", + "humanReadableName": { + "en": "Color me" + }, "author": { "name": "hfgd", "link": "https://github.com/hfgd123", "scnxOrgID": "2" }, "openSourceURL": "https://github.com/hfgd123/CustomDCBot/tree/main/modules/color-me", - "description-en": "Simple module to reward users who have boosted your server with a custom role!", - "description-de": "Einfaches Modul, um Nutzer mit einer eigenen Rolle zu belohnen, die deinen Server boosten!", "commands-dir": "/commands", "events-dir": "/events", "fa-icon": "fas fa-palette", @@ -19,5 +19,9 @@ ], "tags": [ "community" - ] -} \ No newline at end of file + ], + "description": { + "en": "Simple module to reward users who have boosted your server with a custom role!", + "de": "Einfaches Modul, um Nutzer mit einer eigenen Rolle zu belohnen, die deinen Server boosten!" + } +} diff --git a/modules/counter/config.json b/modules/counter/config.json index da922a0b..6c23e360 100644 --- a/modules/counter/config.json +++ b/modules/counter/config.json @@ -1,72 +1,91 @@ { + "description": {}, + "humanName": { + "en": "Configuration", + "de": "Konfiguration" + }, "filename": "config.json", - "humanname-de": "Konfiguration", - "humanname-en": "Configuration", "content": [ { - "field_name": "channels", - "default": [], - "content": "channelID", + "name": "channels", + "humanName": { + "de": "Kanäle" + }, + "default": { + "en": [], + "de": [] + }, + "description": { + "en": "ID of channels with the counter game", + "de": "ID der Kanäle mit dem Zählspiel" + }, "type": "array", - "description": "ID of channels with the counter game", - "humanname-de": "Kanäle", - "description-de": "ID der Kanäle mit dem Zählspiel", - "params-de": {}, - "default-de": [] + "content": "channelID" }, { - "field_name": "channelDescription", - "default": "Next number %x%", + "name": "channelDescription", + "humanName": { + "de": "Kanalbeschreibung" + }, + "default": { + "en": "Next number %x%", + "de": "Nächste Zahl: %x%" + }, + "description": { + "en": "Text which should be set after someone counted (leave blank to disable)", + "de": "Text, welcher gesetzt werden soll, nachdem jemand gezählt hat (leer lassen zum deaktivieren)" + }, "type": "string", "allowNull": true, - "description": "Text which should be set after someone counted (leave blank to disable)", "params": [ { - "name": "%x%", - "description": "Next number users should count" + "name": "x", + "description": { + "en": "Next number users should count", + "de": "Nächste Zahl, welche die Nutzer zählen sollen" + } } - ], - "humanname-de": "Kanalbeschreibung", - "description-de": "Text, welcher gesetzt werden soll, nachdem jemand gezählt hat (leer lassen zum deaktivieren)", - "params-de": [ - { - "name": "%x%", - "description": "Nächste Zahl, welche die Nutzer zählen sollen" - } - ], - "default-de": "Nächste Zahl: %x%" + ] }, { - "field_name": "success-reaction", - "default": "✅", - "type": "string", - "description": "Reaction which the bot should give when someone counts successfully", - "humanname-de": "Erfolgsreaktion", - "description-de": "Reaktion welche der Bot geben soll, wenn jemand erfolgreich gezählt hat", - "params-de": {}, - "default-de": "✅" + "name": "success-reaction", + "humanName": { + "de": "Erfolgsreaktion" + }, + "default": { + "en": "✅", + "de": "✅" + }, + "description": { + "en": "Reaction which the bot should give when someone counts successfully", + "de": "Reaktion welche der Bot geben soll, wenn jemand erfolgreich gezählt hat" + }, + "type": "string" }, { - "field_name": "wrong-input-message", - "default": "⚠ %err%", + "name": "wrong-input-message", + "humanName": { + "de": "Nachricht bei falscher Eingabe" + }, + "default": { + "en": "⚠ %err%", + "de": "⚠ %err%" + }, + "description": { + "en": "Message that gets send if a user provides an invalid input", + "de": "Nachricht, welche gesendet wird, wenn ein Nutzer eine ungültige Nachricht sendet" + }, "type": "string", "allowEmbed": true, - "description": "Message that gets send if a user provides an invalid input", "params": [ { - "name": "%err%", - "description": "Description of what they did wrong" - } - ], - "humanname-de": "Nachricht bei falscher Eingabe", - "description-de": "Nachricht, welche gesendet wird, wenn ein Nutzer eine ungültige Nachricht sendet", - "params-de": [ - { - "name": "%err%", - "description": "Beschreibung, was der Nutzer falsch gemacht hat" + "name": "err", + "description": { + "en": "Description of what they did wrong", + "de": "Beschreibung, was der Nutzer falsch gemacht hat" + } } - ], - "default-de": "⚠ %err%" + ] } ] } diff --git a/modules/counter/milestones.json b/modules/counter/milestones.json index d6ec0fd6..94802505 100644 --- a/modules/counter/milestones.json +++ b/modules/counter/milestones.json @@ -1,43 +1,60 @@ { + "description": { + "en": "Reward your users, when they reach certain goals", + "de": "Belohne deine Nutzer, wenn diese bestimmte Ziele erreichen" + }, + "humanName": { + "en": "Milestones", + "de": "Ziele" + }, "filename": "milestones.json", - "humanname-de": "Ziele", - "description-de": "Belohne deine Nutzer, wenn diese bestimmte Ziele erreichen", - "description-en": "Reward your users, when they reach certain goals", - "humanname-en": "Milestones", "configElements": true, "content": [ { - "field_name": "userMessageCount", - "default": "", - "type": "integer", - "description": "Count of valid counter-messages the users has to archive this goal", - "humanname-de": "Nachrichtenzahl", - "description-de": "Anzahl der gültigen Zähl-Nachrichten, die der Nutzer schreiben muss, um dieses Ziel zu erreichen", - "params-de": {}, - "default-de": "" + "name": "userMessageCount", + "humanName": { + "de": "Nachrichtenzahl" + }, + "default": { + "en": "" + }, + "description": { + "en": "Count of valid counter-messages the users has to archive this goal", + "de": "Anzahl der gültigen Zähl-Nachrichten, die der Nutzer schreiben muss, um dieses Ziel zu erreichen" + }, + "type": "integer" }, { - "field_name": "giveRoles", - "default": [], + "name": "giveRoles", + "humanName": { + "de": "Rollen" + }, + "default": { + "en": [], + "de": [] + }, + "description": { + "en": "These roles are given to the user if they archive this goal (optional)", + "de": "Diese Rollen werden an den Nutzer vergeben, wenn er dieses Ziel erreicht (optional)" + }, "type": "array", - "content": "roleID", - "description": "These roles are given to the user if they archive this goal (optional)", - "humanname-de": "Rollen", - "description-de": "Diese Rollen werden an den Nutzer vergeben, wenn er dieses Ziel erreicht (optional)", - "params-de": {}, - "default-de": [] + "content": "roleID" }, { - "field_name": "sendMessage", - "default": "", + "name": "sendMessage", + "humanName": { + "de": "Nachricht" + }, + "default": { + "en": "" + }, + "description": { + "en": "This message gets send when they archive this goal", + "de": "Diese Nachricht wird gesendet, wenn er dieses Ziel erreicht" + }, "type": "string", "allowNull": true, - "allowEmbed": true, - "description": "This message gets send when they archive this goal", - "humanname-de": "Nachricht", - "description-de": "Diese Nachricht wird gesendet, wenn er dieses Ziel erreicht", - "params-de": {}, - "default-de": "" + "allowEmbed": true } ] -} +} \ No newline at end of file diff --git a/modules/counter/module.json b/modules/counter/module.json index 2c301641..2430f1e0 100644 --- a/modules/counter/module.json +++ b/modules/counter/module.json @@ -1,9 +1,5 @@ { "name": "counter", - "humanReadableName-en": "Count-Game", - "humanReadableName-de": "Zähl-Spiel", - "description-en": "Allow your users to count together", - "description-de": "Erlaubt es deinen Nutzern, zusammen zu zählen!", "fa-icon": "fas fa-arrow-up-1-9", "author": { "scnxOrgID": "1", @@ -19,5 +15,13 @@ "tags": [ "fun" ], - "openSourceURL": "https://github.com/SCNetwork/CustomDCBot/tree/main/modules/counter" + "openSourceURL": "https://github.com/SCNetwork/CustomDCBot/tree/main/modules/counter", + "humanReadableName": { + "en": "Count-Game", + "de": "Zähl-Spiel" + }, + "description": { + "en": "Allow your users to count together", + "de": "Erlaubt es deinen Nutzern, zusammen zu zählen!" + } } diff --git a/modules/economy-system/commands/economy-system.js b/modules/economy-system/commands/economy-system.js index 06e5b0fd..63c612c3 100644 --- a/modules/economy-system/commands/economy-system.js +++ b/modules/economy-system/commands/economy-system.js @@ -43,16 +43,16 @@ async function cooldown (command, duration, userId, client) { module.exports.subcommands = { 'work': async function (interaction) { - if (!await cooldown('work', interaction.config['workCooldown'] * 60000, interaction.user.id, interaction.client)) return interaction.reply(embedType(interaction.str['cooldown'], {}, { ephemeral: !interaction.config['publicCommandReplies'] })); + if (!await cooldown('work', interaction.config['workCooldown'] * 60000, interaction.user.id, interaction.client)) return interaction.reply(embedType(interaction.str['cooldown'], {}, {ephemeral: !interaction.config['publicCommandReplies']})); const moneyToAdd = randomIntFromInterval(parseInt(interaction.config['maxWorkMoney']), parseInt(interaction.config['minWorkMoney'])); await editBalance(interaction.client, interaction.user.id, 'add', moneyToAdd); - interaction.reply(embedType(randomElementFromArray(interaction.str['workSuccess']), {'%earned%': `${moneyToAdd} ${interaction.config['currencySymbol']}`}, { ephemeral: !interaction.config['publicCommandReplies'] })); + interaction.reply(embedType(randomElementFromArray(interaction.str['workSuccess']), {'%earned%': `${moneyToAdd} ${interaction.config['currencySymbol']}`}, {ephemeral: !interaction.config['publicCommandReplies']})); createleaderboard(interaction.client); interaction.client.logger.info('[economy-system] ' + localize('economy-system', 'work-earned-money', {u: interaction.user.tag, m: moneyToAdd, c: interaction.config['currencySymbol']})); if (interaction.client.logChannel) interaction.client.logChannel.send('[economy-system] ' + localize('economy-system', 'work-earned-money', {u: interaction.user.tag, m: moneyToAdd, c: interaction.config['currencySymbol']})); }, 'crime': async function (interaction) { - if (!await cooldown('crime', interaction.config['crimeCooldown'] * 60000, interaction.user.id, interaction.client)) return interaction.reply(embedType(interaction.str['cooldown'], {}, { ephemeral: !interaction.config['publicCommandReplies'] })); + if (!await cooldown('crime', interaction.config['crimeCooldown'] * 60000, interaction.user.id, interaction.client)) return interaction.reply(embedType(interaction.str['cooldown'], {}, {ephemeral: !interaction.config['publicCommandReplies']})); if (Math.floor(Math.random() * 2) === 0) { const user = await interaction.client.models['economy-system']['Balance'].findOne({ where: { @@ -61,13 +61,17 @@ module.exports.subcommands = { }); money = user.balance / 2; await editBalance(interaction.client, interaction.user.id, 'remove', money); - interaction.reply(embedType(randomElementFromArray(interaction.str['crimeFail']), {'%loose%': `${money} ${interaction.config['currencySymbol']}`}, { ephemeral: !interaction.config['publicCommandReplies'] })); - interaction.client.logger.info('[economy-system] ' + localize('economy-system', 'crime-loose-money', {u: interaction.user.tag, m: money, c: interaction.config['currencySymbol']})); + interaction.reply(embedType(randomElementFromArray(interaction.str['crimeFail']), {'%loose%': `${money} ${interaction.config['currencySymbol']}`}, {ephemeral: !interaction.config['publicCommandReplies']})); + interaction.client.logger.info('[economy-system] ' + localize('economy-system', 'crime-loose-money', { + u: interaction.user.tag, + m: money, + c: interaction.config['currencySymbol'] + })); if (interaction.client.logChannel) interaction.client.logChannel.send('[economy-system] ' + localize('economy-system', 'crime-loose-money', {u: interaction.user.tag, m: money, c: interaction.config['currencySymbol']})); } else { const money = randomIntFromInterval(parseInt(interaction.config['maxCrimeMoney']), parseInt(interaction.config['minCrimeMoney'])); await editBalance(interaction.client, interaction.user.id, 'add', money); - interaction.reply(embedType(randomElementFromArray(interaction.str['crimeSuccess']), {'%earned%': `${money} ${interaction.config['currencySymbol']}`}, { ephemeral: !interaction.config['publicCommandReplies'] })); + interaction.reply(embedType(randomElementFromArray(interaction.str['crimeSuccess']), {'%earned%': `${money} ${interaction.config['currencySymbol']}`}, {ephemeral: !interaction.config['publicCommandReplies']})); createleaderboard(interaction.client); interaction.client.logger.info('[economy-system] ' + localize('economy-system', 'crime-earned-money', {u: interaction.user.tag, m: money, c: interaction.config['currencySymbol']})); if (interaction.client.logChannel) interaction.client.logChannel.send('[economy-system] ' + localize('economy-system', 'crime-earned-money', {u: interaction.user.tag, m: money, c: interaction.config['currencySymbol']})); @@ -80,19 +84,32 @@ module.exports.subcommands = { id: user.id } }); - if (!robbedUser) return interaction.reply(embedType(interaction.str['userNotFound']), {'%user%': `${interaction.user.username}#${interaction.user.discriminator}`}, { ephemeral: !interaction.config['publicCommandReplies'] }); - if (!await cooldown('rob', interaction.config['robCooldown'] * 60000, interaction.user.id, interaction.client)) return interaction.reply(embedType(interaction.str['cooldown'], {}, { ephemeral: !interaction.config['publicCommandReplies'] })); + if (!robbedUser) return interaction.reply(embedType(interaction.str['userNotFound']), {'%user%': `${interaction.user.username}#${interaction.user.discriminator}`}, {ephemeral: !interaction.config['publicCommandReplies']}); + if (!await cooldown('rob', interaction.config['robCooldown'] * 60000, interaction.user.id, interaction.client)) return interaction.reply(embedType(interaction.str['cooldown'], {}, {ephemeral: !interaction.config['publicCommandReplies']})); let toRob = parseInt(robbedUser.balance) * (parseInt(interaction.config['robPercent']) / 100); if (toRob >= parseInt(interaction.config['maxRobAmount'])) toRob = parseInt(interaction.config['maxRobAmount']); await editBalance(interaction.client, interaction.user.id, 'add', toRob); await editBalance(interaction.client, user.id, 'remove', toRob); - interaction.reply(embedType(interaction.str['robSuccess'], {'%earned%': `${toRob} ${interaction.config['currencySymbol']}`, '%user%': `<@${user.id}>`}, { ephemeral: !interaction.config['publicCommandReplies'] })); + interaction.reply(embedType(interaction.str['robSuccess'], { + '%earned%': `${toRob} ${interaction.config['currencySymbol']}`, + '%user%': `<@${user.id}>` + }, {ephemeral: !interaction.config['publicCommandReplies']})); createleaderboard(interaction.client); - interaction.client.logger.info('[economy-system] ' + localize('economy-system', 'crime-earned-money', {u: interaction.user.tag, v: user.tag, m: toRob, c: interaction.config['currencySymbol']})); - if (interaction.client.logChannel) interaction.client.logChannel.send('[economy-system] ' + localize('economy-system', 'crime-earned-money', {v: user.tag, u: interaction.user.tag, m: toRob, c: interaction.config['currencySymbol']})); + interaction.client.logger.info('[economy-system] ' + localize('economy-system', 'crime-earned-money', { + u: interaction.user.tag, + v: user.tag, + m: toRob, + c: interaction.config['currencySymbol'] + })); + if (interaction.client.logChannel) interaction.client.logChannel.send('[economy-system] ' + localize('economy-system', 'crime-earned-money', { + v: user.tag, + u: interaction.user.tag, + m: toRob, + c: interaction.config['currencySymbol'] + })); }, 'add': async function (interaction) { - if (!interaction.client.configurations['economy-system']['config']['admins'].includes(interaction.user.id) && !interaction.client.config['botOperators'].includes(interaction.user.id)) return interaction.reply(embedType(interaction.client.strings['not_enough_permissions'], {}, { ephemeral: !interaction.config['publicCommandReplies'] })); + if (!interaction.client.configurations['economy-system']['config']['admins'].includes(interaction.user.id) && !interaction.client.config['botOperators'].includes(interaction.user.id)) return interaction.reply(embedType(interaction.client.strings['not_enough_permissions'], {}, {ephemeral: !interaction.config['publicCommandReplies']})); console.log(interaction.options.getUser('user').id); console.log(interaction.user.id); if (interaction.options.getUser('user').id === interaction.user.id && !interaction.client.configurations['economy-system']['config']['selfBalance']) { @@ -112,7 +129,7 @@ module.exports.subcommands = { if (interaction.client.logChannel) interaction.client.logChannel.send(`[economy-system] ` + localize('economy-system', 'added-money-log', {v: interaction.options.getUser('user').tag, i: interaction.options.get('amount')['value'], c: interaction.client.configurations['economy-system']['config']['currencySymbol'], u: interaction.user.tag})); }, 'remove': async function (interaction) { - if (!interaction.client.configurations['economy-system']['config']['admins'].includes(interaction.user.id) && !interaction.client.config['botOperators'].includes(interaction.user.id)) return interaction.reply(embedType(interaction.client.strings['not_enough_permissions'], {}, { ephemeral: !interaction.config['publicCommandReplies'] })); + if (!interaction.client.configurations['economy-system']['config']['admins'].includes(interaction.user.id) && !interaction.client.config['botOperators'].includes(interaction.user.id)) return interaction.reply(embedType(interaction.client.strings['not_enough_permissions'], {}, {ephemeral: !interaction.config['publicCommandReplies']})); if (interaction.options.getUser('user').id === interaction.user.id && !interaction.client.configurations['economy-system']['config']['selfBalance']) { if (interaction.client.logChannel) interaction.client.logChannel.send(localize('economy-system', 'admin-self-abuse')); return interaction.reply({ @@ -129,7 +146,7 @@ module.exports.subcommands = { if (interaction.client.logChannel) interaction.client.logChannel.send(`[economy-system] ` + localize('economy-system', 'removed-money-log', {v: interaction.options.getUser('user').tag, i: interaction.options.get('amount')['value'], c: interaction.client.configurations['economy-system']['config']['currencySymbol'], u: interaction.user.tag})); }, 'set': async function (interaction) { - if (!interaction.client.configurations['economy-system']['config']['admins'].includes(interaction.user.id) && !interaction.client.config['botOperators'].includes(interaction.user.id)) return interaction.reply(embedType(interaction.client.strings['not_enough_permissions'], {}, { ephemeral: !interaction.config['publicCommandReplies'] })); + if (!interaction.client.configurations['economy-system']['config']['admins'].includes(interaction.user.id) && !interaction.client.config['botOperators'].includes(interaction.user.id)) return interaction.reply(embedType(interaction.client.strings['not_enough_permissions'], {}, {ephemeral: !interaction.config['publicCommandReplies']})); if (interaction.options.getUser('user').id === interaction.user.id && !interaction.client.configurations['economy-system']['config']['selfBalance']) { if (interaction.client.logChannel) interaction.client.logChannel.send(localize('economy-system', 'admin-self-abuse')); return interaction.reply({ @@ -146,17 +163,25 @@ module.exports.subcommands = { if (interaction.client.logChannel) interaction.client.logChannel.send(`[economy-system] ` + localize('economy-system', 'set-money-log', {v: interaction.options.getUser('user').tag, i: interaction.options.get('balance')['value'], c: interaction.client.configurations['economy-system']['config']['currencySymbol'], u: interaction.user.tag})); }, 'daily': async function (interaction) { - if (!await cooldown('daily', 86400000, interaction.user.id, interaction.client)) return interaction.reply(embedType(interaction.str['cooldown'], {}, { ephemeral: !interaction.config['publicCommandReplies'] })); + if (!await cooldown('daily', 86400000, interaction.user.id, interaction.client)) return interaction.reply(embedType(interaction.str['cooldown'], {}, {ephemeral: !interaction.config['publicCommandReplies']})); await editBalance(interaction.client, interaction.user.id, 'add', parseInt(interaction.client.configurations['economy-system']['config']['dailyReward'])); - interaction.reply(embedType(interaction.str['dailyReward'], {'%earned%': `${interaction.client.configurations['economy-system']['config']['dailyReward']} ${interaction.client.configurations['economy-system']['config']['currencySymbol']}`}, { ephemeral: !interaction.config['publicCommandReplies'] })); - interaction.client.logger.info(`[economy-system] ` + localize('economy-system', 'daily-earned-money', {u: interaction.user.tag, m: interaction.client.configurations['economy-system']['config']['dailyReward'], c: interaction.client.configurations['economy-system']['config']['currencySymbol']})); + interaction.reply(embedType(interaction.str['dailyReward'], {'%earned%': `${interaction.client.configurations['economy-system']['config']['dailyReward']} ${interaction.client.configurations['economy-system']['config']['currencySymbol']}`}, {ephemeral: !interaction.config['publicCommandReplies']})); + interaction.client.logger.info(`[economy-system] ` + localize('economy-system', 'daily-earned-money', { + u: interaction.user.tag, + m: interaction.client.configurations['economy-system']['config']['dailyReward'], + c: interaction.client.configurations['economy-system']['config']['currencySymbol'] + })); if (interaction.client.logChannel) interaction.client.logChannel.send(`[economy-system] ` + localize('economy-system', 'daily-earned-money', {u: interaction.user.tag, m: interaction.client.configurations['economy-system']['config']['dailyReward'], c: interaction.client.configurations['economy-system']['config']['currencySymbol']})); }, 'weekly': async function (interaction) { - if (!await cooldown('weekly', 604800000, interaction.user.id, interaction.client)) return interaction.reply(embedType(interaction.str['cooldown'], {}, { ephemeral: !interaction.config['publicCommandReplies'] })); + if (!await cooldown('weekly', 604800000, interaction.user.id, interaction.client)) return interaction.reply(embedType(interaction.str['cooldown'], {}, {ephemeral: !interaction.config['publicCommandReplies']})); await editBalance(interaction.client, interaction.user.id, 'add', parseInt(interaction.client.configurations['economy-system']['config']['weeklyReward'])); - interaction.reply(embedType(interaction.str['weeklyReward'], {'%earned%': `${interaction.client.configurations['economy-system']['config']['weeklyReward']} ${interaction.client.configurations['economy-system']['config']['currencySymbol']}`}, { ephemeral: !interaction.config['publicCommandReplies'] })); - interaction.client.logger.info(`[economy-system] ` + localize('economy-system', 'weekly-earned-money', {u: interaction.user.tag, m: interaction.client.configurations['economy-system']['config']['dailyReward'], c: interaction.client.configurations['economy-system']['config']['currencySymbol']})); + interaction.reply(embedType(interaction.str['weeklyReward'], {'%earned%': `${interaction.client.configurations['economy-system']['config']['weeklyReward']} ${interaction.client.configurations['economy-system']['config']['currencySymbol']}`}, {ephemeral: !interaction.config['publicCommandReplies']})); + interaction.client.logger.info(`[economy-system] ` + localize('economy-system', 'weekly-earned-money', { + u: interaction.user.tag, + m: interaction.client.configurations['economy-system']['config']['dailyReward'], + c: interaction.client.configurations['economy-system']['config']['currencySymbol'] + })); if (interaction.client.logChannel) interaction.client.logChannel.send(`[economy-system] ` + localize('economy-system', 'weekly-earned-money', {u: interaction.user.tag, m: interaction.client.configurations['economy-system']['config']['dailyReward'], c: interaction.client.configurations['economy-system']['config']['currencySymbol']})); }, 'balance': async function (interaction) { @@ -167,8 +192,13 @@ module.exports.subcommands = { id: user.id } }); - if (!balanceV) return interaction.reply(embedType(interaction.str['userNotFound']), {'%user%': `${interaction.user.username}#${interaction.user.discriminator}`}, { ephemeral: !interaction.config['publicCommandReplies'] }); - interaction.reply(embedType(interaction.str['balanceReply'], {'%user%': `${user.username}#${user.discriminator}`, '%balance%': `${balanceV['balance']} ${interaction.client.configurations['economy-system']['config']['currencySymbol']}`, '%bank%': `${balanceV['bank']} ${interaction.client.configurations['economy-system']['config']['currencySymbol']}`, '%total%': `${parseInt(balanceV['balance']) + parseInt(balanceV['bank'])} ${interaction.client.configurations['economy-system']['config']['currencySymbol']}`}, { ephemeral: !interaction.config['publicCommandReplies'] })); + if (!balanceV) return interaction.reply(embedType(interaction.str['userNotFound']), {'%user%': `${interaction.user.username}#${interaction.user.discriminator}`}, {ephemeral: !interaction.config['publicCommandReplies']}); + interaction.reply(embedType(interaction.str['balanceReply'], { + '%user%': `${user.username}#${user.discriminator}`, + '%balance%': `${balanceV['balance']} ${interaction.client.configurations['economy-system']['config']['currencySymbol']}`, + '%bank%': `${balanceV['bank']} ${interaction.client.configurations['economy-system']['config']['currencySymbol']}`, + '%total%': `${parseInt(balanceV['balance']) + parseInt(balanceV['bank'])} ${interaction.client.configurations['economy-system']['config']['currencySymbol']}` + }, {ephemeral: !interaction.config['publicCommandReplies']})); }, 'deposit': async function (interaction) { let amount = interaction.options.get('amount')['value']; @@ -178,9 +208,9 @@ module.exports.subcommands = { } }); if (amount === 'all') amount = user.balance; - if (isNaN(amount)) return interaction.reply(embedType(interaction.str['NaN'], {'%input%': amount}, { ephemeral: !interaction.config['publicCommandReplies'] })); + if (isNaN(amount)) return interaction.reply(embedType(interaction.str['NaN'], {'%input%': amount}, {ephemeral: !interaction.config['publicCommandReplies']})); await editBank(interaction.client, interaction.user.id, 'deposit', amount); - interaction.reply(embedType(interaction.str['depositMsg'], {'%amount%': amount}, { ephemeral: !interaction.config['publicCommandReplies'] })); + interaction.reply(embedType(interaction.str['depositMsg'], {'%amount%': amount}, {ephemeral: !interaction.config['publicCommandReplies']})); }, 'withdraw': async function (interaction) { let amount = interaction.options.get('amount')['value']; @@ -190,9 +220,9 @@ module.exports.subcommands = { } }); if (amount === 'all') amount = user.bank; - if (isNaN(amount)) return interaction.reply(embedType(interaction.str['NaN'], {'%input%': amount}, { ephemeral: !interaction.config['publicCommandReplies'] })); + if (isNaN(amount)) return interaction.reply(embedType(interaction.str['NaN'], {'%input%': amount}, {ephemeral: !interaction.config['publicCommandReplies']})); await editBank(interaction.client, interaction.user.id, 'withdraw', amount); - interaction.reply(embedType(interaction.str['withdrawMsg'], {'%amount%': amount}, { ephemeral: !interaction.config['publicCommandReplies'] })); + interaction.reply(embedType(interaction.str['withdrawMsg'], {'%amount%': amount}, {ephemeral: !interaction.config['publicCommandReplies']})); }, 'msg_drop_msg': { 'enable': async function (interaction) { @@ -201,9 +231,9 @@ module.exports.subcommands = { id: interaction.user.id } }); - if (!user) return interaction.reply(embedType(interaction.str['msgDropAlreadyEnabled'], {}, { ephemeral: !interaction.config['publicCommandReplies'] })); + if (!user) return interaction.reply(embedType(interaction.str['msgDropAlreadyEnabled'], {}, {ephemeral: !interaction.config['publicCommandReplies']})); await user.destroy(); - interaction.reply(embedType(interaction.str['msgDropEnabled'], {}, { ephemeral: !interaction.config['publicCommandReplies'] })); + interaction.reply(embedType(interaction.str['msgDropEnabled'], {}, {ephemeral: !interaction.config['publicCommandReplies']})); }, 'disable': async function (interaction) { const user = await interaction.client.models['economy-system']['dropMsg'].findOne({ @@ -211,15 +241,15 @@ module.exports.subcommands = { id: interaction.user.id } }); - if (user) return interaction.reply(embedType(interaction.str['msgDropAlreadyDisabled'], {}, { ephemeral: !interaction.config['publicCommandReplies'] })); + if (user) return interaction.reply(embedType(interaction.str['msgDropAlreadyDisabled'], {}, {ephemeral: !interaction.config['publicCommandReplies']})); await interaction.client.models['economy-system']['dropMsg'].create({ id: interaction.user.id }); - interaction.reply(embedType(interaction.str['msgDropDisabled'], {}, { ephemeral: !interaction.config['publicCommandReplies'] })); + interaction.reply(embedType(interaction.str['msgDropDisabled'], {}, {ephemeral: !interaction.config['publicCommandReplies']})); } }, 'destroy': async function (interaction) { - if (!interaction.client.configurations['economy-system']['config']['admins'].includes(interaction.user.id) && !interaction.client.config['botOperators'].includes(interaction.user.id)) return interaction.reply(embedType(interaction.client.strings['not_enough_permissions'], {}, { ephemeral: !interaction.config['publicCommandReplies'] })); + if (!interaction.client.configurations['economy-system']['config']['admins'].includes(interaction.user.id) && !interaction.client.config['botOperators'].includes(interaction.user.id)) return interaction.reply(embedType(interaction.client.strings['not_enough_permissions'], {}, {ephemeral: !interaction.config['publicCommandReplies']})); if (!interaction.options.getBoolean('confirm')) return interaction.reply({ content: localize('economy-system', 'destroy-cancel-reply'), ephemeral: !interaction.config['publicCommandReplies'] diff --git a/modules/economy-system/configs/config.json b/modules/economy-system/configs/config.json index bbbb6898..84dabbf9 100644 --- a/modules/economy-system/configs/config.json +++ b/modules/economy-system/configs/config.json @@ -1,210 +1,348 @@ { + "description": { + "en": "Configure here, how the module should behave", + "de": "Stelle hier ein, wie sich das Modul verhalten soll" + }, + "humanName": { + "en": "Configuration", + "de": "Konfiguration" + }, "filename": "config.json", - "humanname-de": "Konfiguration", - "humanname-en": "Configuration", - "description-en": "Configure here, how the module should behave", - "description-de": "Stelle hier ein, wie sich das Modul verhalten soll", "content": [ { - "field_name": "startMoney", - "humanname-en": "Start Money", - "humanname-de": "Start Geld", - "default": 100, - "type": "integer", - "description-en": "The amount of money that is given to a new user", - "description-de": "Das Geld, welches einem neuen Benutzer gegeben wird" + "name": "startMoney", + "humanName": { + "en": "Start Money", + "de": "Start Geld" + }, + "default": { + "en": 100 + }, + "description": { + "en": "The amount of money that is given to a new user", + "de": "Das Geld, welches einem neuen Benutzer gegeben wird" + }, + "type": "integer" }, { - "field_name": "shopManagers", - "humanname-en": "shop-managers", - "humanname-de": "Shop-Verwaltung", - "default": [], + "name": "shopManagers", + "humanName": { + "en": "shop-managers", + "de": "Shop-Verwaltung" + }, + "default": { + "en": [] + }, + "description": { + "en": "The Ids of the shop managers (Bot Operators have this permission always)", + "de": "Die Benutzer-IDs der Shopverwaltung (Bot-Operatoren haben immer diese Berechtigung)" + }, "type": "array", - "content": "integer", - "description-en": "The Ids of the shop managers (Bot Operators have this permission always)", - "description-de": "Die Benutzer-IDs der Shopverwaltung (Bot-Operatoren haben immer diese Berechtigung)" - }, - { - "field_name": "currencyName", - "humanname-en": "currency name", - "humanname-de": "Währungsbezeichnung", - "default": "", - "type": "string", - "description-en": "The name of the currency", - "description-de": "Der Name der Währung", - "allowEmbed": false - }, - { - "field_name": "currencySymbol", - "humanname-en": "Symbol of the currency", - "humanname-de": "Symbol der Währung", - "default": "\uD83D\uDCB0", - "type": "string", - "description-en": "The symbol of the currency", - "description-de": "Das Symbol der Währung", - "allowEmbed": false - }, - { - "field_name": "maxWorkMoney", - "humanname-en": "max work money", - "humanname-de": "Maximaler Arbeits Lohn", - "default": 100, - "type": "integer", - "description-en": "The highest amount of money you can get for working", - "description-de": "Der höchte Betrag, den man fürs Arbeiten bekommen kann" - }, - { - "field_name": "minWorkMoney", - "humanname-en": "min work money", - "humanname-de": "Mainimaler Arbeits Lohn", - "default": 20, - "type": "integer", - "description-en": "The lowest amount of money you can get for working", - "description-de": "Der niedrigste Betrag, den man fürs Arbeiten bekommen kann" - }, - { - "field_name": "workCooldown", - "humanname-en": "work cooldown", - "humanname-de": "Arbeits Cooldown", - "default": 20, - "type": "integer", - "description-en": "The amount of time a user needs to wait util they can use the work command again (in minutes)", - "description-de": "Die Dauer, die Benutzer*innen warten müssen, bevor der Arbeits-Command wieder ausgeführt werden kann (in Minuten)" - }, - { - "field_name": "maxCrimeMoney", - "humanname-en": "max crime money", - "humanname-de": "Maximales Verbrechens Geld", - "default": 1000, - "type": "integer", - "description-en": "The highest amount of money you can get for crime", - "description-de": "Das maximale Geld, was man dafür bekommen kann, ein Verbrechen zu begehen" - }, - { - "field_name": "minCrimeMoney", - "humanname-en": "min crime money", - "humanname-de": "Minimales Verbrechens Geld", - "default": 100, - "type": "integer", - "description-en": "The lowest amount of money you can get for crime", - "description-de": "Das minimale Geld, was man dafür bekommen kann, ein Verbrechen zu begehen" - }, - { - "field_name": "crimeCooldown", - "humanname-en":"crime cooldown", - "humanname-de": "Verbrechens Cooldown", - "default": 30, - "type": "integer", - "description-en": "The amount of time a user needs to wait util they can use the crime command again (in minutes)", - "description-de": "Die Dauer, die Benutzer*innen warten müssen, bevor der Verbrechens-Command wieder ausgeführt werden kann (in Minuten)" - }, - { - "field_name": "maxRobAmount", - "humanname-en": "max rob amount", - "humanname-de": "Maximale Raub Beute", - "default": 400, - "type": "integer", - "description-en": "The highest amount of money that a user can rob", - "description-de": "Das maximale Geld, was man durch Rauben bekommen kann" - }, - { - "field_name": "robPercent", - "humanname-en": "rob percent", - "humanname-de": "Raub Prozent", - "default": 10, - "type": "integer", - "description-en": "The amount that can get robed in percent", - "description-de": "Das maximale Geld, was bei einem Raub erbeutet werden kann, in Prozent" - }, - { - "field_name": "robCooldown", - "humanname-en": "rob cooldown", - "humanname-de": "Raub Cooldown", - "default": 60, - "type": "integer", - "description-en": "The amount of time a user needs to wait util they can use the rob command again (in minutes)", - "description-de": "Die Zeit die Benutzer warten müssen, bis sie den Raub-Command nochmal ausführen können (in Minuten)" - }, - { - "field_name": "leaderboardChannel", - "humanname-en": "leaderboard-channel", - "humanname-de": "Leaderboard-Kanal", - "default": "", - "type": "channelID", - "description-en": "The ID if the channel for the leaderboard. On this leaderboard everyone can see who has the most money.", - "description-de": "Die ID des Kanals für das Leaderboard. Hier kann jeder sehen, wer das meiste Geld hat" - }, - { - "field_name": "admins", - "humanname-en": "Administrators", - "humanname-de": "Administartoren", - "default": [], + "content": "integer" + }, + { + "name": "currencyName", + "humanName": { + "en": "currency name", + "de": "Währungsbezeichnung" + }, + "default": { + "en": "" + }, + "description": { + "en": "The name of the currency", + "de": "Der Name der Währung" + }, + "type": "string" + }, + { + "name": "currencySymbol", + "humanName": { + "en": "Symbol of the currency", + "de": "Symbol der Währung" + }, + "default": { + "en": "💰" + }, + "description": { + "en": "The symbol of the currency", + "de": "Das Symbol der Währung" + }, + "type": "string" + }, + { + "name": "maxWorkMoney", + "humanName": { + "en": "max work money", + "de": "Maximaler Arbeits Lohn" + }, + "default": { + "en": 100 + }, + "description": { + "en": "The highest amount of money you can get for working", + "de": "Der höchte Betrag, den man fürs Arbeiten bekommen kann" + }, + "type": "integer" + }, + { + "name": "minWorkMoney", + "humanName": { + "en": "min work money", + "de": "Mainimaler Arbeits Lohn" + }, + "default": { + "en": 20 + }, + "description": { + "en": "The lowest amount of money you can get for working", + "de": "Der niedrigste Betrag, den man fürs Arbeiten bekommen kann" + }, + "type": "integer" + }, + { + "name": "workCooldown", + "humanName": { + "en": "work cooldown", + "de": "Arbeits Cooldown" + }, + "default": { + "en": 20 + }, + "description": { + "en": "The amount of time a user needs to wait util they can use the work command again (in minutes)", + "de": "Die Dauer, die Benutzer*innen warten müssen, bevor der Arbeits-Command wieder ausgeführt werden kann (in Minuten)" + }, + "type": "integer" + }, + { + "name": "maxCrimeMoney", + "humanName": { + "en": "max crime money", + "de": "Maximales Verbrechens Geld" + }, + "default": { + "en": 1000 + }, + "description": { + "en": "The highest amount of money you can get for crime", + "de": "Das maximale Geld, was man dafür bekommen kann, ein Verbrechen zu begehen" + }, + "type": "integer" + }, + { + "name": "minCrimeMoney", + "humanName": { + "en": "min crime money", + "de": "Minimales Verbrechens Geld" + }, + "default": { + "en": 100 + }, + "description": { + "en": "The lowest amount of money you can get for crime", + "de": "Das minimale Geld, was man dafür bekommen kann, ein Verbrechen zu begehen" + }, + "type": "integer" + }, + { + "name": "crimeCooldown", + "humanName": { + "en": "crime cooldown", + "de": "Verbrechens Cooldown" + }, + "default": { + "en": 30 + }, + "description": { + "en": "The amount of time a user needs to wait util they can use the crime command again (in minutes)", + "de": "Die Dauer, die Benutzer*innen warten müssen, bevor der Verbrechens-Command wieder ausgeführt werden kann (in Minuten)" + }, + "type": "integer" + }, + { + "name": "maxRobAmount", + "humanName": { + "en": "max rob amount", + "de": "Maximale Raub Beute" + }, + "default": { + "en": 400 + }, + "description": { + "en": "The highest amount of money that a user can rob", + "de": "Das maximale Geld, was man durch Rauben bekommen kann" + }, + "type": "integer" + }, + { + "name": "robPercent", + "humanName": { + "en": "rob percent", + "de": "Raub Prozent" + }, + "default": { + "en": 10 + }, + "description": { + "en": "The amount that can get robed in percent", + "de": "Das maximale Geld, was bei einem Raub erbeutet werden kann, in Prozent" + }, + "type": "integer" + }, + { + "name": "robCooldown", + "humanName": { + "en": "rob cooldown", + "de": "Raub Cooldown" + }, + "default": { + "en": 60 + }, + "description": { + "en": "The amount of time a user needs to wait util they can use the rob command again (in minutes)", + "de": "Die Zeit die Benutzer warten müssen, bis sie den Raub-Command nochmal ausführen können (in Minuten)" + }, + "type": "integer" + }, + { + "name": "leaderboardChannel", + "humanName": { + "en": "leaderboard-channel", + "de": "Leaderboard-Kanal" + }, + "default": { + "en": "" + }, + "description": { + "en": "The ID if the channel for the leaderboard. On this leaderboard everyone can see who has the most money.", + "de": "Die ID des Kanals für das Leaderboard. Hier kann jeder sehen, wer das meiste Geld hat" + }, + "type": "channelID" + }, + { + "name": "admins", + "humanName": { + "en": "Administrators", + "de": "Administartoren" + }, + "default": { + "en": [] + }, + "description": { + "en": "Users who can perform admin only actions e.g. manage the balance of users (Bot Operators always have this permission)", + "de": "Benuter*innen die Admin only Aktionen ausführen können, wie z.B. die Balance von Benutzern ändern (Bot-Operatoren haben immer diese Berrechtigung)" + }, "type": "array", - "content": "integer", - "description-en": "Users who can perform admin only actions e.g. manage the balance of users (Bot Operators always have this permission)", - "description-de": "Benuter*innen die Admin only Aktionen ausführen können, wie z.B. die Balance von Benutzern ändern (Bot-Operatoren haben immer diese Berrechtigung)", - "allowEmbed": false + "content": "integer" }, { - "field_name": "allowCheats", - "default": false, - "type": "boolean", - "description": "Allow admins to edit the balance of users (for a fair system not recommended!)" + "name": "allowCheats", + "humanName": {}, + "default": { + "en": false + }, + "description": { + "en": "Allow admins to edit the balance of users (for a fair system not recommended!)" + }, + "type": "boolean" }, { - "field_name": "selfBalance", - "default": false, - "type": "boolean", - "description": "Allow admins to edit their own balance (for a fair system not recommended! DON'T DO THIS!!!!!)" + "name": "selfBalance", + "humanName": {}, + "default": { + "en": false + }, + "description": { + "en": "Allow admins to edit their own balance (for a fair system not recommended! DON'T DO THIS!!!!!)" + }, + "type": "boolean" }, { - "field_name": "msgDropsIgnoredChannels", - "humanname-en": "message-drops ignored channels", - "humanname-de": "Ignorierte Message-Drop Kanäle", - "default": [], + "name": "msgDropsIgnoredChannels", + "humanName": { + "en": "message-drops ignored channels", + "de": "Ignorierte Message-Drop Kanäle" + }, + "default": { + "en": [] + }, + "description": { + "en": "List of Channels where Users can't get message-drops", + "de": "Liste an Kanälen, in denen Benutzer keine Message-Drops bekommen können" + }, "type": "array", - "content": "string", - "description-en": "List of Channels where Users can't get message-drops", - "description-de": "Liste an Kanälen, in denen Benutzer keine Message-Drops bekommen können" + "content": "string" }, { - "field_name": "messageDrops", - "default": 25, - "type": "integer", - "description": "Chance to become money for a message (Chance: 1/ This value). Set to 0 to disable message drops" + "name": "messageDrops", + "humanName": {}, + "default": { + "en": 25 + }, + "description": { + "en": "Chance to become money for a message (Chance: 1/ This value). Set to 0 to disable message drops" + }, + "type": "integer" }, { - "field_name": "messageDropsMax", - "default": 50, - "type": "integer", - "description": "The max amount of money in a message Drop" + "name": "messageDropsMax", + "humanName": {}, + "default": { + "en": 50 + }, + "description": { + "en": "The max amount of money in a message Drop" + }, + "type": "integer" }, { - "field_name": "messageDropsMin", - "default": 5, - "type": "integer", - "description": "The min amount of money in a message Drop" + "name": "messageDropsMin", + "humanName": {}, + "default": { + "en": 5 + }, + "description": { + "en": "The min amount of money in a message Drop" + }, + "type": "integer" }, { - "field_name": "dailyReward", - "default": 25, - "type": "integer", - "description": "The daily reward" + "name": "dailyReward", + "humanName": {}, + "default": { + "en": 25 + }, + "description": { + "en": "The daily reward" + }, + "type": "integer" }, { - "field_name": "weeklyReward", - "default": 100, - "type": "integer", - "description": "The weekly reward" + "name": "weeklyReward", + "humanName": {}, + "default": { + "en": 100 + }, + "description": { + "en": "The weekly reward" + }, + "type": "integer" }, { - "field_name": "publicCommandReplies", - "humanname-de": "Öffentliche Command-Antworten", - "humanname-en": "Public Command-Replies", - "default": false, - "type": "boolean", - "description-de": "Sollen die Command-Antworten für alle angezeigt werden?", - "description-en": "Should the Command-replies be displayed for everyone?" + "name": "publicCommandReplies", + "humanName": { + "en": "Public Command-Replies", + "de": "Öffentliche Command-Antworten" + }, + "default": { + "en": false + }, + "description": { + "en": "Should the Command-replies be displayed for everyone?", + "de": "Sollen die Command-Antworten für alle angezeigt werden?" + }, + "type": "boolean" } ] } \ No newline at end of file diff --git a/modules/economy-system/configs/strings.json b/modules/economy-system/configs/strings.json index c2437a89..d2eace83 100644 --- a/modules/economy-system/configs/strings.json +++ b/modules/economy-system/configs/strings.json @@ -1,341 +1,523 @@ { + "description": { + "en": "Configure messages of this module here", + "de": "Passe hier die Nachrichten des Modules an" + }, + "humanName": { + "en": "Messages", + "de": "Nachrichten" + }, "filename": "strings.json", - "humanname-de": "Nachrichten", - "humanname-en": "Messages", - "description-en": "Configure messages of this module here", - "description-de": "Passe hier die Nachrichten des Modules an", "content": [ { - "field_name": "notFound", - "humanname-en": "not found message", - "humanname-de": "Nicht gefunden Nachricht", - "default-en": "This item could not be found", - "default-de": "Dieses Item konnte nicht gefunden werden", + "name": "notFound", + "humanName": { + "en": "not found message", + "de": "Nicht gefunden Nachricht" + }, + "default": { + "en": "This item could not be found", + "de": "Dieses Item konnte nicht gefunden werden" + }, + "description": { + "en": "The message that is send if the item wasn't found", + "de": "Die Nachricht, die gesendet wird, wenn das Item nicht gefunden wird" + }, "type": "string", - "allowEmbed": true, - "description-en": "The message that is send if the item wasn't found", - "description-de": "Die Nachricht, die gesendet wird, wenn das Item nicht gefunden wird" + "allowEmbed": true }, { - "field_name": "notEnoughMoney", - "humanname-en": "not enough money", - "humanname-de": "Nicht genug Geld", - "default-en": "You haven't enough money to buy this Item", - "default-de": "Du hast nicht genug Geld, um dieses Item zu kaufen", + "name": "notEnoughMoney", + "humanName": { + "en": "not enough money", + "de": "Nicht genug Geld" + }, + "default": { + "en": "You haven't enough money to buy this Item", + "de": "Du hast nicht genug Geld, um dieses Item zu kaufen" + }, + "description": { + "en": "The message that is send if the user haven't enough money to buy an item", + "de": "Die Nachricht, die gesendet wird, wenn ein Benutzer nicht genug geld hat, um ein Item zu kaufen" + }, "type": "string", - "allowEmbed": true, - "description-en": "The message that is send if the user haven't enough money to buy an item", - "description-de": "Die Nachricht, die gesendet wird, wenn ein Benutzer nicht genug geld hat, um ein Item zu kaufen" + "allowEmbed": true }, { - "field_name": "shopMsg", - "humanname-en": "shop message", - "humanname-de": "Shop-Nachricht", + "name": "shopMsg", + "humanName": { + "en": "shop message", + "de": "Shop-Nachricht" + }, + "default": { + "en": { + "title": "Shop", + "description": "%shopItems%" + } + }, + "description": { + "en": "Message for the shop. The Items gets added at the end", + "de": "Die Nachricht, die den aktuellen Shop anzeigt" + }, "type": "string", "allowEmbed": true, - "default": { - "title": "Shop", - "description": "%shopItems%" - }, - "params": [{ - "name": "%shopItems%", - "description-en": "Current items in the shop", - "description-de": "Items die aktuell im Shop verfügbar sind" - }], - "description-en": "Message for the shop. The Items gets added at the end", - "description-de": "Die Nachricht, die den aktuellen Shop anzeigt" + "params": [ + { + "name": "shopItems", + "description": {} + } + ] }, { - "field_name": "cooldown", - "humanname-en": "cooldown", - "humanname-de": "Cooldown", + "name": "cooldown", + "humanName": { + "en": "cooldown", + "de": "Cooldown" + }, + "default": { + "en": "Please wait before using this command again" + }, + "description": { + "en": "This message gets send when a user is currently in cooldown" + }, "type": "string", - "description": "This message gets send when a user is currently in cooldown", - "allowEmbed": true, - "default": "Please wait before using this command again" + "allowEmbed": true }, { - "field_name": "workSuccess", + "name": "workSuccess", + "humanName": {}, + "default": { + "en": [ + "You worked and earned **%earned%**" + ] + }, + "description": { + "en": "Array of messages from which one random gets send when a user works successfully" + }, "type": "array", "content": "string", "allowEmbed": true, - "description": "Array of messages from which one random gets send when a user works successfully", - "default": ["You worked and earned **%earned%**"], "params": [ { - "name": "%earned%", - "description": "Money that the user had earned" + "name": "earned", + "description": { + "en": "Money that the user had earned" + } } ] }, { - "field_name": "crimeSuccess", + "name": "crimeSuccess", + "humanName": {}, + "default": { + "en": [ + "You stole a wallet and earned **%earned%**" + ] + }, + "description": { + "en": "Array of messages from which one random gets send when a user commits a crime successfully" + }, "type": "array", "content": "string", "allowEmbed": true, - "description": "Array of messages from which one random gets send when a user commits a crime successfully", - "default": ["You stole a wallet and earned **%earned%**"], "params": [ { - "name": "%earned%", - "description": "Money that the user had earned" + "name": "earned", + "description": { + "en": "Money that the user had earned" + } } ] }, { - "field_name": "crimeFail", + "name": "crimeFail", + "humanName": {}, + "default": { + "en": [ + "You've stolen a wallet and get caught.You loose **%loose%**" + ] + }, + "description": { + "en": "Array of messages from which one random gets send when a user fails to do some crime" + }, "type": "array", "content": "string", "allowEmbed": true, - "description": "Array of messages from which one random gets send when a user fails to do some crime", - "default": ["You've stolen a wallet and get caught.You loose **%loose%**"], "params": [ { - "name": "%loose%", - "description": "Money that the user looses" + "name": "loose", + "description": { + "en": "Money that the user looses" + } } ] }, { - "field_name": "robSuccess", + "name": "robSuccess", + "humanName": {}, + "default": { + "en": "You robed %user% earned **%earned%**" + }, + "description": { + "en": "This message gets send when a user robs another user successfully" + }, "type": "string", "allowEmbed": true, - "description": "This message gets send when a user robs another user successfully", - "default": "You robed %user% earned **%earned%**", "params": [ { - "name": "%earned%", - "description": "Money that the user had earned" + "name": "earned", + "description": { + "en": "Money that the user had earned" + } }, { - "name": "%user%", - "description": "The user that gets robed by you" + "name": "user", + "description": { + "en": "The user that gets robed by you" + } } ] }, { - "field_name": "leaderboardEmbed", - "description": "Configure the leaderboard embed here", - "allowEmbed": true, - "type": "keyed", + "name": "leaderboardEmbed", + "humanName": {}, "default": { - "title": "Leaderboard", - "color": "GREEN", - "thumbnail": " ", - "image": " ", - "description": "Here you can see who has the most money" + "en": { + "title": "Leaderboard", + "color": "GREEN", + "thumbnail": " ", + "image": " ", + "description": "Here you can see who has the most money" + } + }, + "description": { + "en": "Configure the leaderboard embed here" }, + "type": "keyed", "content": { "key": "string", "value": "string" }, - "disableKeyEdits": true + "disableKeyEdits": true, + "allowEmbed": true }, { - "field_name": "dailyReward", - "allowEmbed": true, + "name": "dailyReward", + "humanName": {}, + "default": { + "en": "You earned **%earned%** by collecting your daily reward" + }, + "description": { + "en": "Message that gets send after the user has claimed the daily reward" + }, "type": "string", - "default": "You earned **%earned%** by collecting your daily reward", - "description": "Message that gets send after the user has claimed the daily reward", + "allowEmbed": true, "params": [ { - "name": "%earned%", - "description": "Money that the user had earned" + "name": "earned", + "description": { + "en": "Money that the user had earned" + } } ] }, { - "field_name": "weeklyReward", - "allowEmbed": true, + "name": "weeklyReward", + "humanName": {}, + "default": { + "en": "You earned **%earned%** by collecting your weekly reward" + }, + "description": { + "en": "Message that gets send after the user has claimed the weekly reward" + }, "type": "string", - "default": "You earned **%earned%** by collecting your weekly reward", - "description": "Message that gets send after the user has claimed the weekly reward", + "allowEmbed": true, "params": [ { - "name": "%earned%", - "description": "Money that the user had earned" + "name": "earned", + "description": { + "en": "Money that the user had earned" + } } ] }, { - "field_name": "balanceReply", - "allowEmbed": true, - "type": "string", + "name": "balanceReply", + "humanName": {}, "default": { - "title": "Balance of %user%", - "description": "%shopItems%", - "fields": [{ - "name": "Balance:", - "value": "%balance%" - }, - { - "name": "Bank:", - "value": "%bank%" - },{ - "name": "Total:", - "value": "%total%" - }] - }, - "description": "Reply for the balance command", + "en": { + "title": "Balance of %user%", + "description": "%shopItems%", + "fields": [ + { + "name": "Balance:", + "value": "%balance%" + }, + { + "name": "Bank:", + "value": "%bank%" + }, + { + "name": "Total:", + "value": "%total%" + } + ] + } + }, + "description": { + "en": "Reply for the balance command" + }, + "type": "string", + "allowEmbed": true, "params": [ { - "name": "%balance%", - "description": "Current balance of the user" + "name": "balance", + "description": { + "en": "Current balance of the user" + } }, { - "name": "%bank%", - "description": "Current value that the user has on the bank" + "name": "bank", + "description": { + "en": "Current value that the user has on the bank" + } }, { - "name": "%total%", - "description": "Total balance of the user" + "name": "total", + "description": { + "en": "Total balance of the user" + } }, { - "name": "%user%", - "description": "Username and discriminator of the User" + "name": "user", + "description": { + "en": "Username and discriminator of the User" + } } ] }, { - "field_name": "userNotFound", + "name": "userNotFound", + "humanName": {}, + "default": { + "en": "I can't find the user **%user%**" + }, + "description": { + "en": "The message that gets sent when the bot can't find a user" + }, "type": "string", "allowEmbed": true, - "description": "The message that gets sent when the bot can't find a user", - "default": "I can't find the user **%user%**", "params": [ { - "name": "%user%", - "description": "User that can't been found" + "name": "user", + "description": { + "en": "User that can't been found" + } } ] }, { - "field_name": "buyMsg", - "allowEmbed": true, + "name": "buyMsg", + "humanName": {}, + "default": { + "en": "You got the item **%item%**" + }, + "description": { + "en": "Message that gets send when a user buys something in the shop" + }, "type": "string", - "description": "Message that gets send when a user buys something in the shop", - "default": "You got the item **%item%**", + "allowEmbed": true, "params": [ { - "name": "%item%", - "description": "Name of the item" + "name": "item", + "description": { + "en": "Name of the item" + } } ] }, { - "field_name": "itemCreate", + "name": "itemCreate", + "humanName": {}, + "default": { + "en": "Successfully created the item %item%. It costs %price% and you get the role %role%" + }, + "description": { + "en": "Message that gets send when a new shop item gets created" + }, "type": "string", "allowEmbed": true, - "description": "Message that gets send when a new shop item gets created", - "default": "Successfully created the item %item%. It costs %price% and you get the role %role%", "params": [ { - "name": "%item%", - "description": "Name of the created item" + "name": "item", + "description": { + "en": "Name of the created item" + } }, { - "name": "%price%", - "description": "Price of the created item" + "name": "price", + "description": { + "en": "Price of the created item" + } }, { - "name": "%role%", - "description": "Role that everyone gets who buys the item" + "name": "role", + "description": { + "en": "Role that everyone gets who buys the item" + } } ] }, { - "field_name": "itemDelete", + "name": "itemDelete", + "humanName": {}, + "default": { + "en": "Successfully deleted the item %item%." + }, + "description": { + "en": "Message that gets send when a new shop item gets deleted" + }, "type": "string", "allowEmbed": true, - "description": "Message that gets send when a new shop item gets deleted", - "default": "Successfully deleted the item %item%.", "params": [ { - "name": "%item%", - "description": "Name of the deleted item" + "name": "item", + "description": { + "en": "Name of the deleted item" + } } ] }, { - "field_name": "depositMsg", - "humanname-en": "deposit message", + "name": "depositMsg", + "humanName": { + "en": "deposit message" + }, + "default": { + "en": "Successfully deposited **%amount%** to your bank" + }, + "description": { + "en": "The reply when a user deposits money to the bank" + }, "type": "string", - "description-en": "The reply when a user deposits money to the bank", - "default-en": "Successfully deposited **%amount%** to your bank", "params": [ { - "name": "%amount%", - "description-en": "Amount that is deposited" + "name": "amount", + "description": {} } ] }, { - "field_name": "withdrawMsg", - "humanname-en": "withdraw message", + "name": "withdrawMsg", + "humanName": { + "en": "withdraw message" + }, + "default": { + "en": "Successfully withdrew **%amount%** from your bank" + }, + "description": { + "en": "The reply when a user withdraws money from the bank" + }, "type": "string", - "description-en": "The reply when a user withdraws money from the bank", - "default-en": "Successfully withdrew **%amount%** from your bank", "params": [ { - "name": "%amount%", - "description-en": "Amount that is withdrew" + "name": "amount", + "description": {} } ] }, { - "field_name": "msgDropMsg", - "humanname-en": "message drop message", + "name": "msgDropMsg", + "humanName": { + "en": "message drop message" + }, + "default": { + "en": [ + "Message-Drop: You earned %earned% simply by chatting!" + ] + }, + "description": { + "en": "The message that gets sent on a message-drop" + }, "type": "array", "content": "string", - "description-en": "The message that gets sent on a message-drop", - "default-en": ["Message-Drop: You earned %earned% simply by chatting!"], "params": [ { - "name": "%erned%", - "description-en": "Amount of money that the user had erned" + "name": "erned", + "description": {} } ] }, { - "field_name": "NaN", - "humanname-en": "not a number", + "name": "NaN", + "humanName": { + "en": "not a number" + }, + "default": { + "en": "**%input%** isn't a number" + }, + "description": { + "en": "Message that gets send if the bot needs a number but gets something different" + }, "type": "string", - "description-en": "Message that gets send if the bot needs a number but gets something different", - "default-en": "**%input%** isn't a number", "params": [ { - "name": "%input%", - "description-en": "False input" + "name": "input", + "description": {} } ] }, { - "field_name": "msgDropAlreadyEnabled", - "humanname-en": "message-drop already enabled", - "type": "string", - "description-en": "Message that gets send if a User trys to enable the Message-Drop message, but it's already enabled", - "default-en": "The Mesage-Drop message is already enabled!" + "name": "msgDropAlreadyEnabled", + "humanName": { + "en": "message-drop already enabled" + }, + "default": { + "en": "The Mesage-Drop message is already enabled!" + }, + "description": { + "en": "Message that gets send if a User trys to enable the Message-Drop message, but it's already enabled" + }, + "type": "string" }, { - "field_name": "msgDropEnabled", - "humanname-en": "message-drop enabled", - "type": "string", - "description-en": "Message that gets send when a User enables the Message-Drop message", - "default-en": "Successfully enabled the Message-Drop message" + "name": "msgDropEnabled", + "humanName": { + "en": "message-drop enabled" + }, + "default": { + "en": "Successfully enabled the Message-Drop message" + }, + "description": { + "en": "Message that gets send when a User enables the Message-Drop message" + }, + "type": "string" }, { - "field_name": "msgDropAlreadyDisabled", - "humanname-en": "message-drop already disabled", - "type": "string", - "description-en": "Message that gets send if a User trys to disable the Message-Drop message, but it's already disabled", - "default-en": "The Mesage-Drop message is already disabled!" + "name": "msgDropAlreadyDisabled", + "humanName": { + "en": "message-drop already disabled" + }, + "default": { + "en": "The Mesage-Drop message is already disabled!" + }, + "description": { + "en": "Message that gets send if a User trys to disable the Message-Drop message, but it's already disabled" + }, + "type": "string" }, { - "field_name": "msgDropDisabled", - "humanname-en": "message-drop disabled", - "type": "string", - "description-en": "Message that gets send when a User disables the Message-Drop message", - "default-en": "Successfully disabled the Message-Drop message" + "name": "msgDropDisabled", + "humanName": { + "en": "message-drop disabled" + }, + "default": { + "en": "Successfully disabled the Message-Drop message" + }, + "description": { + "en": "Message that gets send when a User disables the Message-Drop message" + }, + "type": "string" } ] -} \ No newline at end of file +} diff --git a/modules/economy-system/economy-system.js b/modules/economy-system/economy-system.js index e69d60b9..214488d1 100644 --- a/modules/economy-system/economy-system.js +++ b/modules/economy-system/economy-system.js @@ -146,7 +146,7 @@ async function createShopItem(item, price, role, client) { price: price, role: role }); - resolve(localize('economy-system', 'item-created')); + resolve(localize('economy-system', 'created-item')); } }); } diff --git a/modules/economy-system/module.json b/modules/economy-system/module.json index 871b35b6..43d4b816 100644 --- a/modules/economy-system/module.json +++ b/modules/economy-system/module.json @@ -1,15 +1,12 @@ { "name": "economy-system", "beta": true, - "humanReadableName-en": "Economy", "author": { "scnxOrgID": "4", "name": "jateute", "link": "https://github.com/jateute" }, "openSourceURL": "https://github.com/jateute/CustomDCBot/tree/main/modules/economy-system", - "description-en": "A simple economy-system, containing a shop system, message-drops and commands to earn money", - "description-de": "Ein einfaches economy-system mit einem Shop, Nachrichten-Drops und Befehlen, um Geld zu verdienen", "commands-dir": "/commands", "events-dir": "/events", "fa-icon": "fa-solid fa-bank", @@ -18,5 +15,14 @@ "configs/config.json", "configs/strings.json" ], - "tags": ["community"] -} \ No newline at end of file + "tags": [ + "community" + ], + "humanReadableName": { + "en": "Economy" + }, + "description": { + "en": "A simple economy-system, containing a shop system, message-drops and commands to earn money", + "de": "Ein einfaches economy-system mit einem Shop, Nachrichten-Drops und Befehlen, um Geld zu verdienen" + } +} diff --git a/modules/fun/config.json b/modules/fun/config.json index 660c07fd..212cbd93 100644 --- a/modules/fun/config.json +++ b/modules/fun/config.json @@ -1,366 +1,403 @@ { + "description": {}, + "humanName": { + "en": "Configuration", + "de": "Konfiguration" + }, "filename": "config.json", - "humanname-de": "Konfiguration", - "humanname-en": "Configuration", "content": [ { - "field_name": "ikeaMessage", - "default": "Here's a ikea-product-name: %name%", + "name": "ikeaMessage", + "humanName": { + "de": "IKEA-Nachricht" + }, + "default": { + "en": "Here's a ikea-product-name: %name%", + "de": "Hier ist ein IKEA-Produkt-Name: %name%" + }, + "description": { + "en": "Message that gets send when someone uses !ikea", + "de": "Nachricht welche gesendet wird, wenn jemand /random ikea benutzt" + }, "type": "string", "allowEmbed": true, "params": [ { - "name": "%name%", - "description": "Randomly generated name of an ikea product (probably not real)" + "name": "name", + "description": { + "en": "Randomly generated name of an ikea product (probably not real)", + "de": "Zufällig generierter Name eines IKEA-Produkts (wahrscheinlich nicht real)" + } } - ], - "description": "Message that gets send when someone uses !ikea", - "humanname-de": "IKEA-Nachricht", - "description-de": "Nachricht welche gesendet wird, wenn jemand /random ikea benutzt", - "params-de": [ - { - "name": "%name%", - "description": "Zufällig generierter Name eines IKEA-Produkts (wahrscheinlich nicht real)" - } - ], - "default-de": "Hier ist ein IKEA-Produkt-Name: %name%" + ] }, { - "field_name": "randomNumberMessage", - "default": "Here your random number between %min% and %max%: %number%", + "name": "randomNumberMessage", + "humanName": { + "de": "Zufallszahl-Nachricht" + }, + "default": { + "en": "Here your random number between %min% and %max%: %number%", + "de": "Hier ist deine Zufallszahl zwischen %min% und %max%: %number%" + }, + "description": { + "en": "Message that gets send when someone uses !random", + "de": "Nachricht, welche gesendet wird, wenn jemand /random number benutzt" + }, "type": "string", "allowEmbed": true, "params": [ { - "name": "%min%", - "description": "Minimal value" + "name": "min", + "description": { + "en": "Minimal value", + "de": "Niedrigster Wert" + } }, { - "name": "%max%", - "description": "Maximal value" + "name": "max", + "description": { + "en": "Maximal value", + "de": "Höchster Wert" + } }, { - "name": "%number%", - "description": "Generated number" + "name": "number", + "description": { + "en": "Generated number", + "de": "Generierte Zahl" + } } - ], - "description": "Message that gets send when someone uses !random", - "humanname-de": "Zufallszahl-Nachricht", - "description-de": "Nachricht, welche gesendet wird, wenn jemand /random number benutzt", - "params-de": [ - { - "name": "%min%", - "description": "Niedrigster Wert" - }, - { - "name": "%max%", - "description": "Höchster Wert" - }, - { - "name": "%number%", - "description": "Generierte Zahl" - } - ], - "default-de": "Hier ist deine Zufallszahl zwischen %min% und %max%: %number%" + ] }, { - "field_name": "diceRollMessage", - "default": "🎲 %number%", + "name": "diceRollMessage", + "humanName": { + "de": "Würfel-Nachricht" + }, + "default": { + "en": "🎲 %number%", + "de": "🎲 %number%" + }, + "description": { + "en": "Message that gets send when someone uses !dice", + "de": "Nachricht, welche gesendet wird, wenn jemand /random dice benutzt" + }, "type": "string", "allowEmbed": true, "params": [ { - "name": "%number%", - "description": "Generated number" - } - ], - "description": "Message that gets send when someone uses !dice", - "humanname-de": "Würfel-Nachricht", - "description-de": "Nachricht, welche gesendet wird, wenn jemand /random dice benutzt", - "params-de": [ - { - "name": "%number%", - "description": "Generierte Zahl" + "name": "number", + "description": { + "en": "Generated number", + "de": "Generierte Zahl" + } } - ], - "default-de": "🎲 %number%" + ] }, { - "field_name": "hugMessage", - "default": "<@%authorID%> hugs <@%userID%>\n%imgUrl%", - "allowEmbed": true, + "name": "hugMessage", + "humanName": { + "de": "Umarmungsnachricht" + }, + "default": { + "en": "<@%authorID%> hugs <@%userID%>\n%imgUrl%", + "de": "<@%authorID%> umarmt <@%userID%>\n%imgUrl%" + }, + "description": { + "de": "Nachricht, welche gesendet wird, wenn jemand /hug benutzt" + }, "type": "string", + "allowEmbed": true, "params": [ { - "name": "%authorID%", - "description": "ID of the user who ran this command" + "name": "authorID", + "description": { + "en": "ID of the user who ran this command", + "de": "ID des Nutzers, welcher den Befehl aus" + } }, { - "name": "%userID%", - "description": "ID of the user that gets hugged" + "name": "userID", + "description": { + "en": "ID of the user that gets hugged", + "de": "ID des umarmten Nutzers" + } }, { - "name": "%imgUrl%", - "isImage": true, - "description": "Randomly selected URL to a image" + "name": "imgUrl", + "description": { + "en": "Randomly selected URL to a image", + "de": "Zufällig ausgewählte URL zu einem Bild" + }, + "isImage": true } - ], - "humanname-de": "Umarmungsnachricht", - "description-de": "Nachricht, welche gesendet wird, wenn jemand /hug benutzt", - "params-de": [ - { - "name": "%authorID%", - "description": "ID des Nutzers, welcher den Befehl aus" - }, - { - "name": "%userID%", - "description": "ID des umarmten Nutzers" - }, - { - "name": "%imgUrl%", - "isImage": true, - "description": "Zufällig ausgewählte URL zu einem Bild" - } - ], - "default-de": "<@%authorID%> umarmt <@%userID%>\n%imgUrl%" + ] }, { - "field_name": "hugImages", - "default": [ - "https://media1.tenor.com/images/94989f6312726739893d41231942bb1b/tenor.gif?itemid=14106856", - "https://media1.tenor.com/images/d7529f6003b20f3b21f1c992dffb8617/tenor.gif?itemid=4782499", - "https://media1.tenor.com/images/fd47e55dfb49ae1d39675d6eff34a729/tenor.gif?itemid=12687187" - ], + "name": "hugImages", + "humanName": { + "de": "Umarmungsbilder" + }, + "default": { + "en": [ + "https://media1.tenor.com/images/94989f6312726739893d41231942bb1b/tenor.gif?itemid=14106856", + "https://media1.tenor.com/images/d7529f6003b20f3b21f1c992dffb8617/tenor.gif?itemid=4782499", + "https://media1.tenor.com/images/fd47e55dfb49ae1d39675d6eff34a729/tenor.gif?itemid=12687187" + ], + "de": [ + "https://media1.tenor.com/images/94989f6312726739893d41231942bb1b/tenor.gif?itemid=14106856", + "https://media1.tenor.com/images/d7529f6003b20f3b21f1c992dffb8617/tenor.gif?itemid=4782499", + "https://media1.tenor.com/images/fd47e55dfb49ae1d39675d6eff34a729/tenor.gif?itemid=12687187" + ] + }, + "description": { + "de": "Bilder aus welchen, wenn jemand /hug ausführt, zufällig ausgewählt wird" + }, "type": "array", - "content": "imgURL", - "humanname-de": "Umarmungsbilder", - "description-de": "Bilder aus welchen, wenn jemand /hug ausführt, zufällig ausgewählt wird", - "params-de": {}, - "default-de": [ - "https://media1.tenor.com/images/94989f6312726739893d41231942bb1b/tenor.gif?itemid=14106856", - "https://media1.tenor.com/images/d7529f6003b20f3b21f1c992dffb8617/tenor.gif?itemid=4782499", - "https://media1.tenor.com/images/fd47e55dfb49ae1d39675d6eff34a729/tenor.gif?itemid=12687187" - ] + "content": "imgURL" }, { - "field_name": "kissMessage", - "default": "<@%authorID%> kissed <@%userID%>\n%imgUrl%", - "allowEmbed": true, + "name": "kissMessage", + "humanName": { + "de": "Kuss-Nachrichten" + }, + "default": { + "en": "<@%authorID%> kissed <@%userID%>\n%imgUrl%", + "de": "<@%authorID%> küsst <@%userID%>\n%imgUrl%" + }, + "description": { + "de": "Nachricht, welche gesendet wird, wenn jemand /kiss benutzt" + }, "type": "string", + "allowEmbed": true, "params": [ { - "name": "%authorID%", - "description": "ID of the user who ran this command" + "name": "authorID", + "description": { + "en": "ID of the user who ran this command", + "de": "ID des Nutzers, welcher den Befehl aus" + } }, { - "name": "%userID%", - "description": "ID of the user that gets kissed" + "name": "userID", + "description": { + "en": "ID of the user that gets kissed", + "de": "ID des geküssten Nutzers" + } }, { - "name": "%imgUrl%", - "isImage": true, - "description": "Randomly selected URL to a image" + "name": "imgUrl", + "description": { + "en": "Randomly selected URL to a image", + "de": "Zufällig ausgewählte URL zu einem Bild" + }, + "isImage": true } - ], - "humanname-de": "Kuss-Nachrichten", - "description-de": "Nachricht, welche gesendet wird, wenn jemand /kiss benutzt", - "params-de": [ - { - "name": "%authorID%", - "description": "ID des Nutzers, welcher den Befehl aus" - }, - { - "name": "%userID%", - "description": "ID des geküssten Nutzers" - }, - { - "name": "%imgUrl%", - "isImage": true, - "description": "Zufällig ausgewählte URL zu einem Bild" - } - ], - "default-de": "<@%authorID%> küsst <@%userID%>\n%imgUrl%" + ] }, { - "field_name": "kissImages", - "default": [ - "https://media1.tenor.com/images/ef9687b36e36605b375b4e9b0cde51db/tenor.gif?itemid=12498627", - "https://media1.tenor.com/images/2d2a1af1568277f2bc52467f984cb697/tenor.gif?itemid=14190535", - "https://media1.tenor.com/images/78095c007974aceb72b91aeb7ee54a71/tenor.gif?itemid=5095865" - ], + "name": "kissImages", + "humanName": { + "de": "Kussbilder" + }, + "default": { + "en": [ + "https://media1.tenor.com/images/ef9687b36e36605b375b4e9b0cde51db/tenor.gif?itemid=12498627", + "https://media1.tenor.com/images/2d2a1af1568277f2bc52467f984cb697/tenor.gif?itemid=14190535", + "https://media1.tenor.com/images/78095c007974aceb72b91aeb7ee54a71/tenor.gif?itemid=5095865" + ], + "de": [ + "https://media1.tenor.com/images/ef9687b36e36605b375b4e9b0cde51db/tenor.gif?itemid=12498627", + "https://media1.tenor.com/images/2d2a1af1568277f2bc52467f984cb697/tenor.gif?itemid=14190535", + "https://media1.tenor.com/images/78095c007974aceb72b91aeb7ee54a71/tenor.gif?itemid=5095865" + ] + }, + "description": { + "de": "Bilder aus welchen, wenn jemand /kiss ausführt, zufällig ausgewählt wird" + }, "type": "array", - "content": "imgURL", - "humanname-de": "Kussbilder", - "description-de": "Bilder aus welchen, wenn jemand /kiss ausführt, zufällig ausgewählt wird", - "params-de": {}, - "default-de": [ - "https://media1.tenor.com/images/ef9687b36e36605b375b4e9b0cde51db/tenor.gif?itemid=12498627", - "https://media1.tenor.com/images/2d2a1af1568277f2bc52467f984cb697/tenor.gif?itemid=14190535", - "https://media1.tenor.com/images/78095c007974aceb72b91aeb7ee54a71/tenor.gif?itemid=5095865" - ] + "content": "imgURL" }, { - "field_name": "slapMessage", - "default": "<@%authorID%> slapped <@%userID%>\n%imgUrl%", - "allowEmbed": true, + "name": "slapMessage", + "humanName": { + "de": "Schlag-Nachricht" + }, + "default": { + "en": "<@%authorID%> slapped <@%userID%>\n%imgUrl%", + "de": "<@%authorID%> schlägt <@%userID%>\n%imgUrl%" + }, + "description": { + "de": "Nachricht, welche gesendet wird, wenn jemand /slap benutzt" + }, "type": "string", + "allowEmbed": true, "params": [ { - "name": "%authorID%", - "description": "ID of the user who ran this command" + "name": "authorID", + "description": { + "en": "ID of the user who ran this command", + "de": "ID des Nutzers, welcher den Befehl aus" + } }, { - "name": "%userID%", - "description": "ID of the user that gets slapped" + "name": "userID", + "description": { + "en": "ID of the user that gets slapped", + "de": "ID des geschlagenen Nutzers" + } }, { - "name": "%imgUrl%", - "isImage": true, - "description": "Randomly selected URL to a image" + "name": "imgUrl", + "description": { + "en": "Randomly selected URL to a image", + "de": "Zufällig ausgewählte URL zu einem Bild" + }, + "isImage": true } - ], - "humanname-de": "Schlag-Nachricht", - "description-de": "Nachricht, welche gesendet wird, wenn jemand /slap benutzt", - "params-de": [ - { - "name": "%authorID%", - "description": "ID des Nutzers, welcher den Befehl aus" - }, - { - "name": "%userID%", - "description": "ID des geschlagenen Nutzers" - }, - { - "name": "%imgUrl%", - "isImage": true, - "description": "Zufällig ausgewählte URL zu einem Bild" - } - ], - "default-de": "<@%authorID%> schlägt <@%userID%>\n%imgUrl%" + ] }, { - "field_name": "slapImages", - "default": [ - "https://media1.tenor.com/images/3c161bd7d6c6fba17bb3e5c5ecc8493e/tenor.gif?itemid=5196956", - "https://media1.tenor.com/images/73adef04dadf613cb96ed3b2c8a192b4/tenor.gif?itemid=9631495", - "https://media.tenor.com/images/bfda4a429071a7fa51c7e45685849f76/tenor.gif", - "https://media1.tenor.com/images/97624764cb41414ad2c60d2028c19394/tenor.gif?itemid=16739345", - "https://media1.tenor.com/images/03ea2379718496fbbd144c5bc50f8e96/tenor.gif?itemid=18908545" - ], + "name": "slapImages", + "humanName": { + "de": "Schlag-Bilder" + }, + "default": { + "en": [ + "https://media1.tenor.com/images/3c161bd7d6c6fba17bb3e5c5ecc8493e/tenor.gif?itemid=5196956", + "https://media1.tenor.com/images/73adef04dadf613cb96ed3b2c8a192b4/tenor.gif?itemid=9631495", + "https://media.tenor.com/images/bfda4a429071a7fa51c7e45685849f76/tenor.gif", + "https://media1.tenor.com/images/97624764cb41414ad2c60d2028c19394/tenor.gif?itemid=16739345", + "https://media1.tenor.com/images/03ea2379718496fbbd144c5bc50f8e96/tenor.gif?itemid=18908545" + ], + "de": [ + "https://media1.tenor.com/images/3c161bd7d6c6fba17bb3e5c5ecc8493e/tenor.gif?itemid=5196956", + "https://media1.tenor.com/images/73adef04dadf613cb96ed3b2c8a192b4/tenor.gif?itemid=9631495", + "https://media.tenor.com/images/bfda4a429071a7fa51c7e45685849f76/tenor.gif", + "https://media1.tenor.com/images/97624764cb41414ad2c60d2028c19394/tenor.gif?itemid=16739345", + "https://media1.tenor.com/images/03ea2379718496fbbd144c5bc50f8e96/tenor.gif?itemid=18908545" + ] + }, + "description": { + "de": "Bilder aus welchen, wenn jemand /slap ausführt, zufällig ausgewählt wird" + }, "type": "array", - "content": "imgURL", - "humanname-de": "Schlag-Bilder", - "description-de": "Bilder aus welchen, wenn jemand /slap ausführt, zufällig ausgewählt wird", - "params-de": {}, - "default-de": [ - "https://media1.tenor.com/images/3c161bd7d6c6fba17bb3e5c5ecc8493e/tenor.gif?itemid=5196956", - "https://media1.tenor.com/images/73adef04dadf613cb96ed3b2c8a192b4/tenor.gif?itemid=9631495", - "https://media.tenor.com/images/bfda4a429071a7fa51c7e45685849f76/tenor.gif", - "https://media1.tenor.com/images/97624764cb41414ad2c60d2028c19394/tenor.gif?itemid=16739345", - "https://media1.tenor.com/images/03ea2379718496fbbd144c5bc50f8e96/tenor.gif?itemid=18908545" - ] + "content": "imgURL" }, { - "field_name": "patMessage", - "default": "<@%authorID%> patted <@%userID%>\n%imgUrl%", - "allowEmbed": true, + "name": "patMessage", + "humanName": { + "de": "Tätschel-Nachricht" + }, + "default": { + "en": "<@%authorID%> patted <@%userID%>\n%imgUrl%", + "de": "<@%authorID%> tätschelt <@%userID%>\n%imgUrl%" + }, + "description": { + "de": "Nachricht, welche gesendet wird, wenn jemand /pat benutzt" + }, "type": "string", + "allowEmbed": true, "params": [ { - "name": "%authorID%", - "description": "ID of the user who ran this command" + "name": "authorID", + "description": { + "en": "ID of the user who ran this command", + "de": "ID des Nutzers, welcher den Befehl aus" + } }, { - "name": "%userID%", - "description": "ID of the user that gets patted" + "name": "userID", + "description": { + "en": "ID of the user that gets patted", + "de": "ID des getätschelten Nutzers" + } }, { - "isImage": true, - "name": "%imgUrl%", - "description": "Randomly selected URL to a image" + "name": "imgUrl", + "description": { + "en": "Randomly selected URL to a image", + "de": "Zufällig ausgewählte URL zu einem Bild" + }, + "isImage": true } - ], - "humanname-de": "Tätschel-Nachricht", - "description-de": "Nachricht, welche gesendet wird, wenn jemand /pat benutzt", - "params-de": [ - { - "name": "%authorID%", - "description": "ID des Nutzers, welcher den Befehl aus" - }, - { - "name": "%userID%", - "description": "ID des getätschelten Nutzers" - }, - { - "name": "%imgUrl%", - "isImage": true, - "description": "Zufällig ausgewählte URL zu einem Bild" - } - ], - "default-de": "<@%authorID%> tätschelt <@%userID%>\n%imgUrl%" + ] }, { - "field_name": "patImages", - "default": [ - "https://media1.tenor.com/images/da8f0e8dd1a7f7db5298bda9cc648a9a/tenor.gif?itemid=12018819", - "https://media1.tenor.com/images/f5176d4c5cbb776e85af5dcc5eea59be/tenor.gif?itemid=5081286", - "https://media.tenor.com/images/0e5b7f4be25e309ecaafff8700438a72/tenor.gif", - "https://media1.tenor.com/images/be0c22e0af951aa7fa8753381663eb2c/tenor.gif?itemid=15824856" - ], + "name": "patImages", + "humanName": { + "de": "Tätschel-Bilder" + }, + "default": { + "en": [ + "https://media1.tenor.com/images/da8f0e8dd1a7f7db5298bda9cc648a9a/tenor.gif?itemid=12018819", + "https://media1.tenor.com/images/f5176d4c5cbb776e85af5dcc5eea59be/tenor.gif?itemid=5081286", + "https://media.tenor.com/images/0e5b7f4be25e309ecaafff8700438a72/tenor.gif", + "https://media1.tenor.com/images/be0c22e0af951aa7fa8753381663eb2c/tenor.gif?itemid=15824856" + ], + "de": [ + "https://media1.tenor.com/images/da8f0e8dd1a7f7db5298bda9cc648a9a/tenor.gif?itemid=12018819", + "https://media1.tenor.com/images/f5176d4c5cbb776e85af5dcc5eea59be/tenor.gif?itemid=5081286", + "https://media.tenor.com/images/0e5b7f4be25e309ecaafff8700438a72/tenor.gif", + "https://media1.tenor.com/images/be0c22e0af951aa7fa8753381663eb2c/tenor.gif?itemid=15824856" + ] + }, + "description": { + "de": "Bilder aus welchen, wenn jemand /pat ausführt, zufällig ausgewählt wird" + }, "type": "array", - "content": "imgURL", - "humanname-de": "Tätschel-Bilder", - "description-de": "Bilder aus welchen, wenn jemand /pat ausführt, zufällig ausgewählt wird", - "params-de": {}, - "default-de": [ - "https://media1.tenor.com/images/da8f0e8dd1a7f7db5298bda9cc648a9a/tenor.gif?itemid=12018819", - "https://media1.tenor.com/images/f5176d4c5cbb776e85af5dcc5eea59be/tenor.gif?itemid=5081286", - "https://media.tenor.com/images/0e5b7f4be25e309ecaafff8700438a72/tenor.gif", - "https://media1.tenor.com/images/be0c22e0af951aa7fa8753381663eb2c/tenor.gif?itemid=15824856" - ] + "content": "imgURL" }, { - "field_name": "8ballMessage", - "default": "%answer%", - "allowEmbed": true, + "name": "8ballMessage", + "humanName": { + "de": "8ball-Nachricht" + }, + "default": { + "en": "%answer%", + "de": "Das Orakel hat gesprochen... %answer%" + }, + "description": { + "de": "Nachricht, welche gesendet wird, wenn jemand /random 8ball benutzt" + }, "type": "string", + "allowEmbed": true, "params": [ { - "name": "The oracle has spoken... %answer%", - "description": "Answer to the question" + "name": "The oracle has spoken... answer", + "description": { + "en": "Answer to the question" + } } - ], - "humanname-de": "8ball-Nachricht", - "description-de": "Nachricht, welche gesendet wird, wenn jemand /random 8ball benutzt", - "params-de": [ - { - "name": "%answer%", - "description": "Answer to the question" - } - ], - "default-de": "Das Orakel hat gesprochen... %answer%" + ] }, { - "field_name": "8BallMessages", - "default": [ - "Yes", - "No", - "Maybe", - "Try again", - "42 is the answer" - ], + "name": "8BallMessages", + "humanName": { + "de": "8ball-Antworten" + }, + "default": { + "en": [ + "Yes", + "No", + "Maybe", + "Try again", + "42 is the answer" + ], + "de": [ + "Yes", + "No", + "Maybe", + "Try again", + "42 is the answer" + ] + }, + "description": { + "de": "Mögliche Antworten für /random 8ball" + }, "type": "array", - "content": "string", - "humanname-de": "8ball-Antworten", - "description-de": "Mögliche Antworten für /random 8ball", - "params-de": {}, - "default-de": [ - "Yes", - "No", - "Maybe", - "Try again", - "42 is the answer" - ] + "content": "string" } ] -} \ No newline at end of file +} diff --git a/modules/fun/module.json b/modules/fun/module.json index a40dd59e..1368ba0c 100644 --- a/modules/fun/module.json +++ b/modules/fun/module.json @@ -1,9 +1,5 @@ { "name": "fun", - "humanReadableName-en": "Fun-Commands", - "humanReadableName-de": "Fun-Befehle", - "description-en": "Some random fun commands", - "description-de": "Einige Spaß-Commands, wie !hug oder !random", "fa-icon": "fas fa-laugh-squint", "author": { "scnxOrgID": "1", @@ -17,5 +13,13 @@ "tags": [ "fun" ], - "openSourceURL": "https://github.com/SCNetwork/CustomDCBot/tree/main/modules/fun" + "openSourceURL": "https://github.com/SCNetwork/CustomDCBot/tree/main/modules/fun", + "humanReadableName": { + "en": "Fun-Commands", + "de": "Fun-Befehle" + }, + "description": { + "en": "Some random fun commands like /hug or /random", + "de": "Einige Spaß-Commands, wie /hug oder /random" + } } diff --git a/modules/giveaways/configs/config.json b/modules/giveaways/configs/config.json index 1f72b774..917fd262 100644 --- a/modules/giveaways/configs/config.json +++ b/modules/giveaways/configs/config.json @@ -1,9 +1,13 @@ { + "description": { + "en": "Configure the function of the module here", + "de": "Stelle hier die Funktionen des Modules ein" + }, + "humanName": { + "en": "Configuration", + "de": "Konfiguration" + }, "filename": "config.json", - "humanname-de": "Konfiguration", - "humanname-en": "Configuration", - "description-en": "Configure the function of the module here", - "description-de": "Stelle hier die Funktionen des Modules ein", "commandsWarnings": { "normal": [ "/gmanage" @@ -11,82 +15,109 @@ }, "content": [ { - "field_name": "bypassRoles", - "humanname-en": "Giveaway-Requirement-Bypass-Roles", - "humanname-de": "Gewinnspiel-Voraussetzungen-Ignorierung-Rollen", - "default": [], + "name": "bypassRoles", + "humanName": { + "en": "Giveaway-Requirement-Bypass-Roles", + "de": "Gewinnspiel-Voraussetzungen-Ignorierung-Rollen" + }, + "default": { + "en": [], + "de": [] + }, + "description": { + "en": "Roles who can participate in giveaways even if they don't meet the requirements", + "de": "Rollen, die an Gewinnspielen teilnehmen können, ohne die Bedingungen erfüllen zu müssen" + }, "type": "array", - "content": "roleID", - "description-de": "Rollen, die an Gewinnspielen teilnehmen können, ohne die Bedingungen erfüllen zu müssen", - "description-en": "Roles who can participate in giveaways even if they don't meet the requirements", - "params-de": {}, - "default-de": [] + "content": "roleID" }, { - "field_name": "messageCountMode", - "humanname-en": "Message-Count-Mode", - "humanname-de": "Nachrichten-Zähl-Modus", - "default": "all", + "name": "messageCountMode", + "humanName": { + "en": "Message-Count-Mode", + "de": "Nachrichten-Zähl-Modus" + }, + "default": { + "en": "all", + "de": "all" + }, + "description": { + "en": "Modus in which messages should get counted", + "de": "Modus, in welchem Nachrichten gezählt werden sollen" + }, "type": "select", "content": [ "all", "blacklist", "whitelist" - ], - "description-en": "Modus in which messages should get counted", - "description-de": "Modus, in welchem Nachrichten gezählt werden sollen", - "params-de": {}, - "default-de": "all" + ] }, { - "field_name": "blacklist", - "humanname": "Blacklist", - "default": [], + "name": "blacklist", + "humanName": { + "en": "Blacklist" + }, + "default": { + "en": [], + "de": [] + }, + "description": { + "en": "Channel in which messages should get ignored (only if messageCountMode = \"blacklist\")", + "de": "Channel in welchen Nachrichten nicht gezählt werden sollen (nur wenn messageCountMode = \"blacklist\")" + }, "type": "array", - "content": "channelID", - "description-en": "Channel in which messages should get ignored (only if messageCountMode = \"blacklist\")", - "description-de": "Channel in welchen Nachrichten nicht gezählt werden sollen (nur wenn messageCountMode = \"blacklist\")", - "humanname-de": "", - "params-de": {}, - "default-de": [] + "content": "channelID" }, { - "field_name": "whitelist", - "humanname": "Whitelist", - "default": [], + "name": "whitelist", + "humanName": { + "en": "Whitelist" + }, + "default": { + "en": [], + "de": [] + }, + "description": { + "en": "Channel in which messages should get counted (only if messageCountMode = \"whitelist\")", + "de": "Channel in welchen Nachrichten gezählt werden sollen (nur wenn messageCountMode = \"whitelist\")" + }, "type": "array", - "content": "channelID", - "description-en": "Channel in which messages should get counted (only if messageCountMode = \"whitelist\")", - "description-de": "Channel in welchen Nachrichten gezählt werden sollen (nur wenn messageCountMode = \"whitelist\")", - "humanname-de": "", - "params-de": {}, - "default-de": [] + "content": "channelID" }, { - "field_name": "multipleEntries", - "humanname-en": "Multiple Entries", - "humanname-de": "Zusätzliche Gewinnchancen", - "default": {}, + "name": "multipleEntries", + "humanName": { + "en": "Multiple Entries", + "de": "Zusätzliche Gewinnchancen" + }, + "default": { + "en": {}, + "de": {} + }, + "description": { + "en": "Allow certain users with a specified role to enter multiple times.\n⚠ Please remember that allowing multiple entries for users who invited other users is against Discord's Terms of Service", + "de": "Erlaubt es, Nutzern mit einer bestimmten Rollen mehre Gewinnchancen zu geben.\n⚠ Please remember that allowing multiple entries for users who invited other users is against Discord's Terms of Service" + }, "type": "keyed", - "description-en": "Allow certain users with a specified role to enter multiple times.\n⚠ Please remember that allowing multiple entries for users who invited other users is against Discord's Terms of Service", - "description-de": "Erlaubt es, Nutzern mit einer bestimmten Rollen mehre Gewinnchancen zu geben.\n⚠ Please remember that allowing multiple entries for users who invited other users is against Discord's Terms of Service", "content": { "key": "roleID", "value": "integer" - }, - "params-de": {}, - "default-de": {} + } }, { - "field_name": "sendDMOnWin", - "humanname-en": "Send DM-message to winner", - "humanname-de": "PN-Nachricht an Gewinner senden", - "default": false, - "type": "boolean", - "description-en": "If enabled the bot will send each winner a DM when they win.", - "description-de": "Wenn aktiviert wird der Bot eine Nachricht an den Gewinner senden, wenn diese gewinnen.", - "params-de": {}, - "default-de": false + "name": "sendDMOnWin", + "humanName": { + "en": "Send DM-message to winner", + "de": "PN-Nachricht an Gewinner senden" + }, + "default": { + "en": false + }, + "description": { + "en": "If enabled the bot will send each winner a DM when they win.", + "de": "Wenn aktiviert wird der Bot eine Nachricht an den Gewinner senden, wenn diese gewinnen." + }, + "type": "boolean" } ] } \ No newline at end of file diff --git a/modules/giveaways/configs/strings.json b/modules/giveaways/configs/strings.json index 9b436b12..dc2d8dbd 100644 --- a/modules/giveaways/configs/strings.json +++ b/modules/giveaways/configs/strings.json @@ -1,484 +1,498 @@ { + "description": { + "en": "Edit the messages and strings of the module here", + "de": "Stelle hier die Nachrichten des Modules ein" + }, + "humanName": { + "en": "Nachrichten", + "de": "Nachrichten" + }, "filename": "strings.json", - "humanname-de": "Nachrichten", - "humanname-en": "Nachrichten", - "description-en": "Edit the messages and strings of the module here", - "description-de": "Stelle hier die Nachrichten des Modules ein", "content": [ { - "field_name": "giveaway_message", - "humanname-en": "Giveaway-Message", - "humanname-de": "Gewinnspiel-Nachricht", - "default-en": "**NEW GIVEAWAY :tada:**\\n\\nPrize: %prize%\\nEnds at: %endAtDiscordFormation%\\nWinners: %winners%\\nOrganiser: %organiser%\\nCurrently valid entries: %entryCount% (%enteredCount% users)\\nSponsor-Website: %sponsorLink%\\n\\nPress the big button below to participate!", - "default-de": "**NEUES GEWINNSPIEL :tada:**\\n\\nPreis: %prize%\\nLäuft bis: %endAtDiscordFormation%\\\nAnzahl Gewinner: %winners%\\nVeranstalter: %organiser%\\nSponsor-Website: %sponsorLink%\nGültige Teilnahmen: %entryCount% (von %enteredCount% Teilnehmern)\\n\\nKlicke den großen Knopf unten, um teilzunehmen!", + "name": "giveaway_message", + "humanName": { + "en": "Giveaway-Message", + "de": "Gewinnspiel-Nachricht" + }, + "default": { + "en": "**NEW GIVEAWAY :tada:**\n\nPrize: %prize%\nEnds at: %endAtDiscordFormation%\nWinners: %winners%\nOrganiser: %organiser%\nCurrently valid entries: %entryCount% (%enteredCount% users)\nSponsor-Website: %sponsorLink%\n\nPress the big button below to participate!", + "de": "**NEUES GEWINNSPIEL :tada:**\n\nPreis: %prize%\nLäuft bis: %endAtDiscordFormation%\\nAnzahl Gewinner: %winners%\nVeranstalter: %organiser%\nSponsor-Website: %sponsorLink%\nGültige Teilnahmen: %entryCount% (von %enteredCount% Teilnehmern)\n\nKlicke den großen Knopf unten, um teilzunehmen!" + }, + "description": { + "en": "Message that gets send in the giveaway channel if a new giveaway gets created", + "de": "Diese Nachricht wird verschickt, wenn ein Gewinnspiel gestartet wird." + }, "type": "string", - "description-en": "Message that gets send in the giveaway channel if a new giveaway gets created", - "description-de": "Diese Nachricht wird verschickt, wenn ein Gewinnspiel gestartet wird.", "allowEmbed": true, - "params-en": [ + "params": [ { - "name": "%prize%", - "description": "Prize of the giveaway" + "name": "prize", + "description": { + "en": "Prize of the giveaway", + "de": "Preis des Gewinnspiels" + } }, { - "name": "%endAtDiscordFormation%", - "description": "When using this variable, Discord will automatically format the timestamp in the client of the user" + "name": "endAtDiscordFormation", + "description": { + "en": "When using this variable, Discord will automatically format the timestamp in the client of the user", + "de": "Beim Nutzen dieser Variable wird Discord direkt beim Nutzer die Zeit rendern (Beispiel: \"In 4 Stunden\")" + } }, { - "name": "%endAt%", - "description": "Date of the end of the giveaway" + "name": "endAt", + "description": { + "en": "Date of the end of the giveaway", + "de": "Datum und Uhrzeit, wenn das Gewinnspiel endet" + } }, { - "name": "%winners%", - "description": "Count of possible winners" + "name": "winners", + "description": { + "en": "Count of possible winners", + "de": "Anzahl möglicher Gewinner" + } }, { - "name": "%sponsorLink%", - "description": "Link of the sponsor, if specified." + "name": "sponsorLink", + "description": { + "en": "Link of the sponsor, if specified.", + "de": "Link des Sponsoren, wenn angegeben." + } }, { - "name": "%organiser%", - "description": "Mention of the organiser of the giveaway" + "name": "organiser", + "description": { + "en": "Mention of the organiser of the giveaway", + "de": "Erwähnung des Veranstalters des Gewinnspieles" + } }, { - "name": "%enteredCount%", - "description": "Count of users who entered this giveaway already" + "name": "enteredCount", + "description": { + "en": "Count of users who entered this giveaway already", + "de": "Anzahl an Teilnehmern am Gewinnspiel" + } }, { - "name": "%entryCount%", - "description": "Count of valid entries" - } - ], - "params-de": [ - { - "name": "%prize%", - "description": "Preis des Gewinnspiels" - }, - { - "name": "%endAt%", - "description": "Datum und Uhrzeit, wenn das Gewinnspiel endet" - }, - { - "name": "%endAtDiscordFormation%", - "description": "Beim Nutzen dieser Variable wird Discord direkt beim Nutzer die Zeit rendern (Beispiel: \"In 4 Stunden\")" - }, - { - "name": "%winners%", - "description": "Anzahl möglicher Gewinner" - }, - { - "name": "%sponsorLink%", - "description": "Link des Sponsoren, wenn angegeben." - }, - { - "name": "%organiser%", - "description": "Erwähnung des Veranstalters des Gewinnspieles" - }, - { - "name": "%enteredCount%", - "description": "Anzahl an Teilnehmern am Gewinnspiel" - }, - { - "name": "%entryCount%", - "description": "Anzahl von gültigen Teilnahmen" + "name": "entryCount", + "description": { + "en": "Count of valid entries", + "de": "Anzahl von gültigen Teilnahmen" + } } ] }, { - "field_name": "giveaway_message_with_requirements", - "humanname-en": "Giveaway-Message with requirements", - "humanname-de": "Gewinnspiel-Nachricht mit Voraussetzungen", - "default-en": "**NEW GIVEAWAY :tada:**\\n\\nPrize: %prize%\\nEnds at: %endAtDiscordFormation%\\nWinners: %winners%\\nOrganiser: %organiser%\\nSponsor-Website: %sponsorLink%\\n\\n__Requirements__\\n%requirements%\\n\\nCurrently valid entries: %entryCount% (%enteredCount% users)\\nPress the big button under this message to join the giveaway!", - "default-de": "**NEUES GEWINNSPIEL :tada:**\n\nPreis: %prize%\nLäuft bis: %endAtDiscordFormation%\nAnzahl Gewinner: %winners%\nVeranstalter: %organiser%\nSponsor-Website: %sponsorLink%\n__Voraussetzungen__\n%requirements%\nGültige Teilnahmen: %entryCount% (von %enteredCount% Teilnehmern)\n\nDrücke auf den großen Knopf unten, um teilzunehmen.", + "name": "giveaway_message_with_requirements", + "humanName": { + "en": "Giveaway-Message with requirements", + "de": "Gewinnspiel-Nachricht mit Voraussetzungen" + }, + "default": { + "en": { + "title": "New Giveaway 🎉", + "description": "Prize: %prize%\nEnds at: %endAtDiscordFormation%\nWinners: %winners%\nOrganiser: %organiser%\nSponsor-Website: %sponsorLink%\n\n__Requirements__\n%requirements%\n\nCurrently valid entries: %entryCount% (%enteredCount% users)\nPress the big button under this message to join the giveaway!", + "color": "GREEN" + }, + "de": { + "title": "Neues Gewinnspiel 🎉", + "description": "Preis: %prize%\nLäuft bis: %endAtDiscordFormation%\nAnzahl Gewinner: %winners%\nVeranstalter: %organiser%\nSponsor-Website: %sponsorLink%\n__Voraussetzungen__\n%requirements%\nGültige Teilnahmen: %entryCount% (von %enteredCount% Teilnehmern)\n\nDrücke auf den großen Knopf unten, um teilzunehmen.", + "color": "GREEN" + } + }, + "description": { + "en": "Message that gets send in the giveaway channel if a new giveaway gets created", + "de": "Diese Nachricht wird in den Gewinnspiel-Channel versendet, wenn ein Gewinnspiel mit Voraussetzungen gestartet wird" + }, "type": "string", - "description-en": "Message that gets send in the giveaway channel if a new giveaway gets created", - "description-de": "Diese Nachricht wird in den Gewinnspiel-Channel versendet, wenn ein Gewinnspiel mit Voraussetzungen gestartet wird", "allowEmbed": true, - "params-en": [ - { - "name": "%prize%", - "description": "Prize of the giveaway" - }, - { - "name": "%endAtDiscordFormation%", - "description": "When using this variable, Discord will automatically format the timestamp in the client of the user" - }, - { - "name": "%endAt%", - "description": "Date of the end of the giveaway" - }, - { - "name": "%winners%", - "description": "Count of possible winners" - }, - { - "name": "%sponsorLink%", - "description": "Link of the sponsor, if specified." - }, - { - "name": "%organiser%", - "description": "Mention of the organiser of the giveaway" - }, - { - "name": "%enteredCount%", - "description": "Count of users who entered this giveaway already" - }, - { - "name": "%entryCount%", - "description": "Count of valid entries" - }, + "params": [ { - "name": "%requirements%", - "description": "Requirements for this giveaway" - } - ], - "params-de": [ - { - "name": "%prize%", - "description": "Preis des Gewinnspiels" + "name": "prize", + "description": { + "en": "Prize of the giveaway", + "de": "Preis des Gewinnspiels" + } }, { - "name": "%endAt%", - "description": "Datum und Uhrzeit, wenn das Gewinnspiel endet" + "name": "endAtDiscordFormation", + "description": { + "en": "When using this variable, Discord will automatically format the timestamp in the client of the user", + "de": "Beim Nutzen dieser Variable wird Discord direkt beim Nutzer die Zeit rendern (Beispiel: \"In 4 Stunden\")" + } }, { - "name": "%endAtDiscordFormation%", - "description": "Beim Nutzen dieser Variable wird Discord direkt beim Nutzer die Zeit rendern (Beispiel: \"In 4 Stunden\")" + "name": "endAt", + "description": { + "en": "Date of the end of the giveaway", + "de": "Datum und Uhrzeit, wenn das Gewinnspiel endet" + } }, { - "name": "%winners%", - "description": "Anzahl möglicher Gewinner" + "name": "winners", + "description": { + "en": "Count of possible winners", + "de": "Anzahl möglicher Gewinner" + } }, { - "name": "%sponsorLink%", - "description": "Link des Sponsoren, wenn angegeben." + "name": "sponsorLink", + "description": { + "en": "Link of the sponsor, if specified.", + "de": "Link des Sponsoren, wenn angegeben." + } }, { - "name": "%organiser%", - "description": "Erwähnung des Veranstalters des Gewinnspieles" + "name": "organiser", + "description": { + "en": "Mention of the organiser of the giveaway", + "de": "Erwähnung des Veranstalters des Gewinnspieles" + } }, { - "name": "%enteredCount%", - "description": "Anzahl an Teilnehmern am Gewinnspiel" + "name": "enteredCount", + "description": { + "en": "Count of users who entered this giveaway already", + "de": "Anzahl an Teilnehmern am Gewinnspiel" + } }, { - "name": "%entryCount%", - "description": "Anzahl von gültigen Teilnahmen" + "name": "entryCount", + "description": { + "en": "Count of valid entries", + "de": "Anzahl von gültigen Teilnahmen" + } }, { - "name": "%requirements%", - "description": "Voraussetzungen für dieses Gewinnspiel" + "name": "requirements", + "description": { + "en": "Requirements for this giveaway", + "de": "Voraussetzungen für dieses Gewinnspiel" + } } ] }, { - "field_name": "requirementsNotPassed", - "humanname-en": "Requirement-Not-Passed-Message", - "humanname-de": "Gewinnspiel-Voraussetzungen-Nicht-Erfüllt-Nachricht", - "default-en": "I am sorry but you did not pass the requirement-check for this giveaway.\\nYou need to fulfill these requirements:\\n%requirements%", - "default-de": "Huch, scheint als würdest du die Voraussetzungen für dieses Gewinnspiel nicht erfüllen.\nDu musst folgende Voraussetzungen noch erfüllen:\n%requirements%", + "name": "requirementsNotPassed", + "humanName": { + "en": "Requirement-Not-Passed-Message", + "de": "Gewinnspiel-Voraussetzungen-Nicht-Erfüllt-Nachricht" + }, + "default": { + "en": "I am sorry but you did not pass the requirement-check for this giveaway.\nYou need to fulfill these requirements:\n%requirements%", + "de": "Huch, scheint als würdest du die Voraussetzungen für dieses Gewinnspiel nicht erfüllen.\nDu musst folgende Voraussetzungen noch erfüllen:\n%requirements%" + }, + "description": {}, "type": "string", "allowEmbed": "true", - "params-de": [ - { - "name": "%requirements%", - "description": "Voraussetzungen des Gewinnspieles, die der Nutzer noch erfüllen muss" - } - ], - "params-en": [ + "params": [ { - "name": "%requirements%", - "description": "Requirements of this giveaway" + "name": "requirements", + "description": { + "en": "Requirements of this giveaway", + "de": "Voraussetzungen des Gewinnspieles, die der Nutzer noch erfüllen muss" + } } - ], - "description-de": "" + ] }, { - "field_name": "giveaway_message_edit_after_winning", - "humanname-de": "Gewinnspiel-Nachricht nach Beendung des Gewinnspiels", - "humanname-en": "Giveaway-Message after message ended", - "default-en": "**GIVEAWAY ENDED**\\n\\nPrize: %prize%\\nEnded at: %endAtDiscordFormation%\\nWinners: %winners%\\nCurrently valid entries: %entryCount% (%enteredCount% users)\\nOrganiser: %organiser%\\nSponsor-Website: %sponsorLink%", - "default-de": "**GEWINNSPIEL BEENDET**\n\nPreis: %prize%\\nEnddatum: %endAtDiscordFormation%\\nGewinner: %winners%\\nVeranstalter: %organiser%\\nGültige Teilnahmen: %entryCount% (von %enteredCount% Nutzern)\\nSponsor-Website: %sponsorLink", + "name": "giveaway_message_edit_after_winning", + "humanName": { + "en": "Giveaway-Message after message ended", + "de": "Gewinnspiel-Nachricht nach Beendung des Gewinnspiels" + }, + "default": { + "en": { + "title": "Giveaway ended", + "description": "Price: %price%\nEnded at: %endAtDiscordFormation%\nWinners: %winners%\nCurrently valid entries: %entryCount% (%enteredCount% users)\nOrganiser: %organiser%\nSponsor-Website: %sponsorLink%", + "color": "RED" + }, + "de": { + "title": "Gewinnspiel beended", + "description": "Price: Preis: %prize%\nEnddatum: %endAtDiscordFormation%\nGewinner: %winners%\nVeranstalter: %organiser%\nGültige Teilnahmen: %entryCount% (von %enteredCount% Nutzern)\nSponsor-Website: %sponsorLink", + "color": "RED" + } + }, + "description": { + "en": "Message that gets send after a giveaway ended", + "de": "Wenn ein Gewinnspiel endet wird die Gewinnspiel-Nachricht zu dieser Nachricht editiert." + }, "type": "string", - "description-en": "Message that gets send after a giveaway ended", - "description-de": "Wenn ein Gewinnspiel endet wird die Gewinnspiel-Nachricht zu dieser Nachricht editiert.", "allowEmbed": true, - "params-en": [ - { - "name": "%prize%", - "description": "Prize of the giveaway" - }, - { - "name": "%sponsorLink%", - "description": "Link of the sponsor, if specified." - }, - { - "name": "%endAtDiscordFormation%", - "description": "When using this variable, Discord will automatically format the timestamp in the client of the user" - }, - { - "name": "%endAt%", - "description": "Date of the end of the giveaway" - }, - { - "name": "%winners%", - "description": "Winners of this giveaway" - }, - { - "name": "%organiser%", - "description": "Mention of the organiser of the giveaway" - }, - { - "name": "%enteredCount%", - "description": "Count of users who entered this giveaway already" - }, - { - "name": "%entryCount%", - "description": "Count of valid entries" - } - ], - "params-de": [ + "params": [ { - "name": "%prize%", - "description": "Preis des Gewinnspieles" + "name": "prize", + "description": { + "en": "Prize of the giveaway", + "de": "Preis des Gewinnspieles" + } }, { - "name": "%endAt%", - "description": "End-Datum des Gewinnspieles" + "name": "sponsorLink", + "description": { + "en": "Link of the sponsor, if specified.", + "de": "Link des Sponsoren, wenn angegeben." + } }, { - "name": "%endAtDiscordFormation%", - "description": "Beim Nutzen dieser Variable wird Discord direkt beim Nutzer die Zeit rendern (Beispiel: \"In 4 Stunden\")" + "name": "endAtDiscordFormation", + "description": { + "en": "When using this variable, Discord will automatically format the timestamp in the client of the user", + "de": "Beim Nutzen dieser Variable wird Discord direkt beim Nutzer die Zeit rendern (Beispiel: \"In 4 Stunden\")" + } }, { - "name": "%winners%", - "description": "Gewinner des Gewinnspieles" + "name": "endAt", + "description": { + "en": "Date of the end of the giveaway", + "de": "End-Datum des Gewinnspieles" + } }, { - "name": "%sponsorLink%", - "description": "Link des Sponsoren, wenn angegeben." + "name": "winners", + "description": { + "en": "Winners of this giveaway", + "de": "Gewinner des Gewinnspieles" + } }, { - "name": "%organiser%", - "description": "Erwähnung des Veranstalters" + "name": "organiser", + "description": { + "en": "Mention of the organiser of the giveaway", + "de": "Erwähnung des Veranstalters" + } }, { - "name": "%enteredCount%", - "description": "Anzahl von Teilnahmen" + "name": "enteredCount", + "description": { + "en": "Count of users who entered this giveaway already", + "de": "Anzahl von Teilnahmen" + } }, { - "name": "%entryCount%", - "description": "Anzahl von Teilnehmern" + "name": "entryCount", + "description": { + "en": "Count of valid entries", + "de": "Anzahl von Teilnehmern" + } } ] }, { - "field_name": "winner_message", - "humanname-de": "Gewinn-Nachricht", - "humanname-en": "Win-Message", - "default-en": "%winners% won this giveaway. Shoot a DM at %organiser% to claim your prize!", - "default-de": "%winners% haben **%prize%** in folgendem Gewinnspiel gewonnen: %url%. Schreib %organiser% eine PN, um den Preis zu erhalten!", + "name": "winner_message", + "humanName": { + "en": "Win-Message", + "de": "Gewinn-Nachricht" + }, + "default": { + "en": "%winners% won this giveaway. Shoot a DM at %organiser% to claim your prize!", + "de": "%winners% haben **%prize%** in folgendem Gewinnspiel gewonnen: %url%. Schreib %organiser% eine PN, um den Preis zu erhalten!" + }, + "description": { + "en": "Message that gets send when the giveaway ends.", + "de": "Diese Nachricht wird verschickt, wenn das Gewinnspiel endet" + }, "type": "string", - "description-en": "Message that gets send when the giveaway ends.", - "description-de": "Diese Nachricht wird verschickt, wenn das Gewinnspiel endet", "allowEmbed": true, - "params-en": [ + "params": [ { - "name": "%winners", - "description": "Winners of the giveaway" + "name": "winners", + "description": { + "en": "Winners of the giveaway", + "de": "Gewinner des Gewinnspieles" + } }, { - "name": "%sponsorLink%", - "description": "Link of the sponsor, if specified." + "name": "sponsorLink", + "description": { + "en": "Link of the sponsor, if specified.", + "de": "Link des Sponsoren, wenn angegeben." + } }, { - "name": "%organiser%", - "description": "Mention of the organiser of the giveaway" + "name": "organiser", + "description": { + "en": "Mention of the organiser of the giveaway", + "de": "Erwähnung des Veranstalters des Gewinnspieles" + } }, { - "name": "%prize%", - "description": "Prize of the giveaway" - } - ], - "params-de": [ - { - "name": "%winners%", - "description": "Gewinner des Gewinnspieles" - }, - { - "name": "%sponsorLink%", - "description": "Link des Sponsoren, wenn angegeben." - }, - { - "name": "%url%", - "description": "URL zum Gewinnspiel" - }, - { - "name": "%organiser%", - "description": "Erwähnung des Veranstalters des Gewinnspieles" - }, - { - "name": "%prize%", - "description": "Preis des Gewinnspieles" + "name": "prize", + "description": { + "en": "Prize of the giveaway", + "de": "Preis des Gewinnspieles" + } } ] }, { - "field_name": "no_winner_message", - "humanname-de": "Kein-Gewinner-Nachricht", - "humanname-en": "No-Winner-Message", - "default-en": "No winner could be determined for this giveaway ):", - "default-de": "Dieses Gewinnspiel hatte keinen Gewinner ): ):", + "name": "no_winner_message", + "humanName": { + "en": "No-Winner-Message", + "de": "Kein-Gewinner-Nachricht" + }, + "default": { + "en": "No winner could be determined for this giveaway ):", + "de": "Dieses Gewinnspiel hatte keinen Gewinner ): ):" + }, + "description": { + "en": "Message that gets send when the giveaway ends and no winner could be determined.", + "de": "Diese Nachricht wird gesendet, wenn ein Gewinnspiel endet, aber kein Gewinner gefunden wurde" + }, "type": "string", - "description-en": "Message that gets send when the giveaway ends and no winner could be determined.", - "description-de": "Diese Nachricht wird gesendet, wenn ein Gewinnspiel endet, aber kein Gewinner gefunden wurde", "allowEmbed": true, - "params-en": [ - { - "name": "%sponsorLink%", - "description": "Link of the sponsor, if specified." - }, - { - "name": "%organiser%", - "description": "Mention of the organiser of the giveaway" - }, + "params": [ { - "name": "%prize%", - "description": "Prize of the giveaway" - } - ], - "params-de": [ - { - "name": "%sponsorLink%", - "description": "Link zum Sponsor, falls angeben" + "name": "sponsorLink", + "description": { + "en": "Link of the sponsor, if specified.", + "de": "Link zum Sponsor, falls angeben" + } }, { - "name": "%organiser%", - "description": "Erwähnung des Veranstalters" + "name": "organiser", + "description": { + "en": "Mention of the organiser of the giveaway", + "de": "Erwähnung des Veranstalters" + } }, { - "name": "%prize%", - "description": "Preis des Gewinnspiels" + "name": "prize", + "description": { + "en": "Prize of the giveaway", + "de": "Preis des Gewinnspiels" + } } ] }, { - "field_name": "confirmationMessage", - "humanname-de": "Teilnahme-Bestätigung-Nachricht", - "humanname-en": "Confirmation-Message", + "name": "confirmationMessage", + "humanName": { + "en": "Confirmation-Message", + "de": "Teilnahme-Bestätigung-Nachricht" + }, + "default": { + "en": "Giveaway entered successfully with **%entries% entry(s)**.", + "de": "Gewinnspiel mit **%entries% Teilnahmen(s)** beigetreten." + }, + "description": { + "en": "Message that gets shown to the user after they enter the giveaway successfully.", + "de": "Nachricht die angezeigt wird, wenn ein Nutzer teilnimmt" + }, "type": "string", "allowEmbed": true, - "description-en": "Message that gets shown to the user after they enter the giveaway successfully.", - "description-de": "Nachricht die angezeigt wird, wenn ein Nutzer teilnimmt", - "default-en": "Giveaway entered successfully with **%entries% entry(s)**.", - "default-de": "Gewinnspiel mit **%entries% Teilnahmen(s)** beigetreten.", - "params-en": [ + "params": [ { - "name": "%price%", - "description": "Price of the giveaway" + "name": "price", + "description": { + "en": "Price of the giveaway", + "de": "Preis des Gewinnspiels" + } }, { - "name": "%entries%", - "description": "Count of entries the user has to this giveaway" - } - ], - "params-de": [ - { - "name": "%price%", - "description": "Preis des Gewinnspiels" - }, - { - "name": "%entries%", - "description": "Anzahl an Teilnahmen am Gewinnspiel" + "name": "entries", + "description": { + "en": "Count of entries the user has to this giveaway", + "de": "Anzahl an Teilnahmen am Gewinnspiel" + } } ] }, { - "field_name": "alreadyEnteredMessage", - "humanname-de": "Bereits teilgenommen-Nachricht", - "humanname-en": "Already-Entered-Message", + "name": "alreadyEnteredMessage", + "humanName": { + "en": "Already-Entered-Message", + "de": "Bereits teilgenommen-Nachricht" + }, + "default": { + "en": "You are already in this giveaway with **%entries% entry(s)**.", + "de": "Du nimmst bereits mit **%entries% Teilnahmen** teil." + }, + "description": { + "en": "Message that gets shown to the user when someone tries to enter when they already are in", + "de": "Nachricht, die angezeigt wird, wenn ein Nutzer teilnehmen will, obwohl er bereits teilgenommen hat" + }, "type": "string", "allowEmbed": true, - "description-en": "Message that gets shown to the user when someone tries to enter when they already are in", - "description-de": "Nachricht, die angezeigt wird, wenn ein Nutzer teilnehmen will, obwohl er bereits teilgenommen hat", - "default-en": "You are already in this giveaway with **%entries% entry(s)**.", - "default-de": "Du nimmst bereits mit **%entries% Teilnahmen** teil.", - "params-en": [ - { - "name": "%price%", - "description": "Price of the giveaway" - }, + "params": [ { - "name": "%entries%", - "description": "Count of entries the user has to this giveaway" - } - ], - "params-de": [ - { - "name": "%price%", - "description": "Preis des Gewinnspiels" + "name": "price", + "description": { + "en": "Price of the giveaway", + "de": "Preis des Gewinnspiels" + } }, { - "name": "%entries%", - "description": "Anzahl an Teilnahmen am Gewinnspiel" + "name": "entries", + "description": { + "en": "Count of entries the user has to this giveaway", + "de": "Anzahl an Teilnahmen am Gewinnspiel" + } } ] }, { - "type": "string", - "field_name": "buttonContent", - "humanname-de": "Knopf-Inhalt", - "humanname-en": "Button-Content", - "description-de": "Inhalt des Teilnehmen-Knopfes", - "description-en": "Content of the button under giveaways", - "default-en": "Join giveaway 🎉", - "default-de": "Gewinnspiel beitreten 🎉", - "params-de": {} + "name": "buttonContent", + "humanName": { + "en": "Button-Content", + "de": "Knopf-Inhalt" + }, + "default": { + "en": "Join giveaway 🎉", + "de": "Gewinnspiel beitreten 🎉" + }, + "description": { + "en": "Content of the button under giveaways", + "de": "Inhalt des Teilnehmen-Knopfes" + }, + "type": "string" }, { - "field_name": "winner_DM_message", - "humanname-de": "Gewinner-PN-Nachricht", - "humanname-en": "Winner-DM-Message", - "default-en": "Congrats, you won this giveaway: %url%", - "default-de": "Herzlichen Glückwunsch, du hast folgendes Gewinnspiel gewonnen: %url%", + "name": "winner_DM_message", + "humanName": { + "en": "Winner-DM-Message", + "de": "Gewinner-PN-Nachricht" + }, + "default": { + "en": "Congrats, you won this giveaway: %url%", + "de": "Herzlichen Glückwunsch, du hast folgendes Gewinnspiel gewonnen: %url%" + }, + "description": { + "en": "Nachricht, die an den Nutzer gesendet wird, wenn er gewinnt (wenn aktiviert).", + "de": "Message that gets send when to the winner when they win (if enabled)." + }, "type": "string", - "description-de": "Message that gets send when to the winner when they win (if enabled).", - "description-en": "Nachricht, die an den Nutzer gesendet wird, wenn er gewinnt (wenn aktiviert).", "allowEmbed": true, - "params-en": [ - { - "name": "%sponsorLink%", - "description": "Link of the sponsor, if specified." - }, - { - "name": "%organiser%", - "description": "Mention of the organiser of the giveaway" - }, - { - "name": "%prize%", - "description": "Prize of the giveaway" - }, - { - "name": "%url%", - "description": "Url to the giveaway" - } - ], - "params-de": [ + "params": [ { - "name": "%sponsorLink%", - "description": "Link des Sponsoren, wenn angegeben." + "name": "sponsorLink", + "description": { + "en": "Link of the sponsor, if specified.", + "de": "Link des Sponsoren, wenn angegeben." + } }, { - "name": "%organiser%", - "description": "Erwähnung des Veranstalters des Gewinnspieles" + "name": "organiser", + "description": { + "en": "Mention of the organiser of the giveaway", + "de": "Erwähnung des Veranstalters des Gewinnspieles" + } }, { - "name": "%prize%", - "description": "Preis des Gewinnspiels" + "name": "prize", + "description": { + "en": "Prize of the giveaway", + "de": "Preis des Gewinnspiels" + } }, { - "name": "%url%", - "description": "Url zum Gewinnspiel" + "name": "url", + "description": { + "en": "Url to the giveaway", + "de": "Url zum Gewinnspiel" + } } ] } diff --git a/modules/giveaways/module.json b/modules/giveaways/module.json index c18bdc9d..9572961a 100644 --- a/modules/giveaways/module.json +++ b/modules/giveaways/module.json @@ -1,14 +1,11 @@ { "name": "giveaways", - "humanReadableName-en": "Giveaways", - "humanReadableName-de": "Gewinnspiele", "author": { "scnxOrgID": "1", - "name": "SCDerox (SC Network Team)", "link": "https://github.com/SCDerox" + "name": "SCDerox (SC Network Team)", + "link": "https://github.com/SCDerox" }, "openSourceURL": "https://github.com/SCNetwork/CustomDCBot/tree/main/modules/giveaways", - "description-en": "Easily create a giveaway in your server", - "description-de": "Erstelle einfach Gewinnspiele auf deinem Server", "commands-dir": "/commands", "fa-icon": "fas fa-gift", "models-dir": "/models", @@ -17,5 +14,15 @@ "configs/strings.json", "configs/config.json" ], - "tags": ["community"] -} \ No newline at end of file + "tags": [ + "community" + ], + "humanReadableName": { + "en": "Giveaways", + "de": "Gewinnspiele" + }, + "description": { + "en": "Easily create a giveaway in your server", + "de": "Erstelle einfach Gewinnspiele auf deinem Server" + } +} diff --git a/modules/guess-the-number/config.json b/modules/guess-the-number/config.json index 488fee95..ac95d5e3 100644 --- a/modules/guess-the-number/config.json +++ b/modules/guess-the-number/config.json @@ -1,7 +1,10 @@ { + "description": {}, + "humanName": { + "en": "Configuration", + "de": "Konfiguration" + }, "filename": "config.json", - "humanname-de": "Konfiguration", - "humanname-en": "Configuration", "commandsWarnings": { "special": [ { @@ -15,101 +18,115 @@ }, "content": [ { - "field_name": "adminRoles", + "name": "adminRoles", + "humanName": { + "de": "Adminrollen" + }, + "default": { + "en": [], + "de": [] + }, + "description": { + "en": "Every role that can manage game sessions", + "de": "Jede Rolle, welche Spielrunden verwalten kann" + }, "type": "array", - "description": "Every role that can manage game sessions", - "default": [], - "content": "roleID", - "default-de": [], - "humanname-de": "Adminrollen", - "description-de": "Jede Rolle, welche Spielrunden verwalten kann", - "params-de": {} + "content": "roleID" }, { - "field_name": "startMessage", + "name": "startMessage", + "humanName": { + "de": "Startnachricht" + }, "default": { - "title": "Guess the Number - Game started", - "description": "Guess a number between %min% and %max%. Good look!" + "en": { + "title": "Guess the Number - Game started", + "description": "Guess a number between %min% and %max%. Good look!" + }, + "de": { + "title": "Errate die Zahl - Das Spiel beginnt", + "description": "Errate eine Zahl zwischen %min% und %max%. Viel Glück!" + } + }, + "description": { + "de": "Nachricht, die am Anfang einer Runde gesendet wird" }, "type": "string", "allowEmbed": true, "params": [ { - "name": "%min%", - "description": "Minimal value to guess" - }, - { - "name": "%max%", - "description": "Maximal value to guess" - } - ], - "humanname-de": "Startnachricht", - "description-de": "Nachricht, die am Anfang einer Runde gesendet wird", - "params-de": [ - { - "name": "%min%", - "description": "Niedrigester möglichster Wert" + "name": "min", + "description": { + "en": "Minimal value to guess", + "de": "Niedrigester möglichster Wert" + } }, { - "name": "%max%", - "description": "Höchster möglichster Wert" + "name": "max", + "description": { + "en": "Maximal value to guess", + "de": "Höchster möglichster Wert" + } } - ], - "default-de": { - "title": "Errate die Zahl - Das Spiel beginnt", - "description": "Errate eine Zahl zwischen %min% und %max%. Viel Glück!" - } + ] }, { - "field_name": "endMessage", + "name": "endMessage", + "humanName": { + "de": "Endnachricht" + }, "default": { - "title": "Guess the Number - Game ended", - "description": "Good game everyone!\nThe winner is %winner%.\nThe number was **%number%**.\nThere were around **%guessCount% guesses** in total." + "en": { + "title": "Guess the Number - Game ended", + "description": "Good game everyone!\nThe winner is %winner%.\nThe number was **%number%**.\nThere were around **%guessCount% guesses** in total." + }, + "de": { + "title": "Errate die Zahl - Das Spiel ist beendet", + "description": "Gutes Spiel!\nDer Gewinner ist %winner%.\nDie Zahl war **%number%**.\nInsgesamt wurde **%guessCount% mal** geraten." + } + }, + "description": { + "de": "Nachricht, die am Ende einer Runde gesendet wird" }, "type": "string", "allowEmbed": true, "params": [ { - "name": "%min%", - "description": "Minimal value to guess" - }, - { - "name": "%max%", - "description": "Maximal value to guess" - }, - { - "name": "%winner%", - "description": "@-mention of the winner" + "name": "min", + "description": { + "en": "Minimal value to guess", + "de": "Niedrigester möglichster Wert" + } }, { - "name": "%guessCount%", - "description": "Count of guesses in this game session" - } - ], - "humanname-de": "Endnachricht", - "description-de": "Nachricht, die am Ende einer Runde gesendet wird", - "params-de": [ - { - "name": "%min%", - "description": "Niedrigester möglichster Wert" + "name": "max", + "description": { + "en": "Maximal value to guess", + "de": "Höchster möglichster Wert" + } }, { - "name": "%max%", - "description": "Höchster möglichster Wert" + "name": "winner", + "description": { + "en": "@-mention of the winner", + "de": "@-Erwähnung des Gewinners" + } }, { - "name": "%winner%", - "description": "@-Erwähnung des Gewinners" + "name": "guessCount", + "description": { + "en": "Count of guesses in this game session", + "de": "Anzahl der Versuche in dieser Runde" + } }, { - "name": "%guessCount%", - "description": "Anzahl der Versuche in dieser Runde" + "name": "number", + "description": { + "en": "Winning number", + "de": "Nummer, die gesucht wurde" + } } - ], - "default-de": { - "title": "Errate die Zahl - Das Spiel ist beendet", - "description": "Gutes Spiel!\nDer Gewinner ist %winner%.\nDie Zahl war **%number%**.\nInsgesamt wurde **%guessCount% mal** geraten." - } + ] } ] -} \ No newline at end of file +} diff --git a/modules/guess-the-number/module.json b/modules/guess-the-number/module.json index 7d95ba2e..6112493e 100644 --- a/modules/guess-the-number/module.json +++ b/modules/guess-the-number/module.json @@ -1,14 +1,10 @@ { "name": "guess-the-number", - "humanReadableName-en": "Guess the number", - "humanReadableName-de": "Errate die Nummer", "author": { "scnxOrgID": "1", "name": "SCDerox (SC Network Team)", "link": "https://github.com/SCDerox" }, - "description-en": "Select a number and let your users guess", - "description-de": "Wähle eine Nummer und lass deine Mitglieder diese erraten", "commands-dir": "/commands", "fa-icon": "fas fa-dice-five", "models-dir": "/models", @@ -19,5 +15,13 @@ "tags": [ "fun" ], - "openSourceURL": "https://github.com/SCNetwork/CustomDCBot/tree/main/modules/guess-the-number" + "openSourceURL": "https://github.com/SCNetwork/CustomDCBot/tree/main/modules/guess-the-number", + "humanReadableName": { + "en": "Guess the number", + "de": "Errate die Nummer" + }, + "description": { + "en": "Select a number and let your users guess", + "de": "Wähle eine Nummer und lass deine Mitglieder diese erraten" + } } diff --git a/modules/hunt-the-code/module.json b/modules/hunt-the-code/module.json index 180c8c2a..ae6cbbbc 100644 --- a/modules/hunt-the-code/module.json +++ b/modules/hunt-the-code/module.json @@ -1,20 +1,26 @@ { "name": "hunt-the-code", - "humanReadableName-en": "Hunt the code", - "humanReadableName-de": "Sammel die Codes", "author": { "scnxOrgID": "1", "name": "SCDerox (SC Network Team)", "link": "https://github.com/SCDerox" }, "openSourceURL": "https://github.com/SCNetwork/CustomDCBot/tree/main/modules/hunt-the-code", - "description-en": "Hide codes and let your users collect them", - "description-de": "Verstecke Codes und lasse sie von deinen Nutzern sammeln", "commands-dir": "/commands", "models-dir": "/models", "fa-icon": "fa-solid fa-tags", "config-example-files": [ "strings.json" ], - "tags": ["community"] -} \ No newline at end of file + "tags": [ + "community" + ], + "humanReadableName": { + "en": "Hunt the code", + "de": "Sammel die Codes" + }, + "description": { + "en": "Hide codes and let your users collect them", + "de": "Verstecke Codes und lasse sie von deinen Nutzern sammeln" + } +} diff --git a/modules/hunt-the-code/strings.json b/modules/hunt-the-code/strings.json index 2d8a2cac..7ea29f94 100644 --- a/modules/hunt-the-code/strings.json +++ b/modules/hunt-the-code/strings.json @@ -1,190 +1,207 @@ { + "description": { + "en": "Edit the messages and strings of the module here", + "de": "Stelle hier die Nachrichten des Modules ein" + }, + "humanName": { + "en": "Messages", + "de": "Nachrichten" + }, "filename": "strings.json", - "humanname-de": "Nachrichten", - "humanname-en": "Messages", - "description-en": "Edit the messages and strings of the module here", - "description-de": "Stelle hier die Nachrichten des Modules ein", "content": [ { - "field_name": "codeNotFoundMessage", - "humanname-en": "Code-not-found Message", - "humanname-de": "Code-nicht-gefunden Nachricht", - "default-en": "⚠ Sorry, this code is invalid ):", - "default-de": "⚠ Dieser Code ist leider ungültig", + "name": "codeNotFoundMessage", + "humanName": { + "en": "Code-not-found Message", + "de": "Code-nicht-gefunden Nachricht" + }, + "default": { + "en": "⚠ Sorry, this code is invalid ):", + "de": "⚠ Dieser Code ist leider ungültig" + }, + "description": { + "en": "This message gets send, when an invalid code is being redeemed", + "de": "Diese Nachricht wird verschickt, wenn ein ungültiger Code eingelöst wird" + }, "type": "string", - "allowEmbed": true, - "description-en": "This message gets send, when an invalid code is being redeemed", - "description-de": "Diese Nachricht wird verschickt, wenn ein ungültiger Code eingelöst wird" + "allowEmbed": true }, { - "field_name": "codeAlreadyRedeemed", - "humanname-en": "Code-already-Redeemed Message", - "humanname-de": "Code-bereits-eingelöst Nachricht", - "default-en": "Good news, you have already redeemed this code", - "default-de": "Gute Nachrichten, du hast diesen Code bereits eingelöst", + "name": "codeAlreadyRedeemed", + "humanName": { + "en": "Code-already-Redeemed Message", + "de": "Code-bereits-eingelöst Nachricht" + }, + "default": { + "en": "Good news, you have already redeemed this code", + "de": "Gute Nachrichten, du hast diesen Code bereits eingelöst" + }, + "description": { + "en": "This message gets send, when a user tries to redeem a code that is already in their inventory", + "de": "Diese Nachricht wird verschickt, wenn ein Nutzer einen Code einlösen will, den er bereits eingelöst hat" + }, "type": "string", "allowEmbed": true, - "description-en": "This message gets send, when a user tries to redeem a code that is already in their inventory", - "description-de": "Diese Nachricht wird verschickt, wenn ein Nutzer einen Code einlösen will, den er bereits eingelöst hat", - "params-en": [ - { - "name": "%displayName%", - "description": "Display-Name of the code that the user wants to redeem" - }, + "params": [ { - "name": "%codeUseCount%", - "description": "Count of times this code has already been redeemed" - }, - { - "name": "%userCodesCount%", - "description": "Count of codes this user already has redeemed" - } - ], - "params-de": [ - { - "name": "%displayName%", - "description": "Anzeige-Name des Codes, denn der Nutzer einlösen möchte" + "name": "displayName", + "description": { + "en": "Display-Name of the code that the user wants to redeem", + "de": "Anzeige-Name des Codes, denn der Nutzer einlösen möchte" + } }, { - "name": "%userCodesCount%", - "description": "Anzahl der Codes, die dieser Nutzer bereits eingelöst hat" + "name": "codeUseCount", + "description": { + "en": "Count of times this code has already been redeemed", + "de": "Anzahl von Nutzer, die diesen Code bereits eingelöst haben" + } }, { - "name": "%codeUseCount%", - "description": "Anzahl von Nutzer, die diesen Code bereits eingelöst haben" + "name": "userCodesCount", + "description": { + "en": "Count of codes this user already has redeemed", + "de": "Anzahl der Codes, die dieser Nutzer bereits eingelöst hat" + } } ] }, { - "field_name": "codeRedeemed", - "humanname-en": "Code-Redeemed Message", - "humanname-de": "Code-eingelöst Nachricht", - "default-en": "Good job, you have successfully redeemed the code **%displayName%**", - "default-de": "Gute Arbeit, du hast erfolgreich den Code **%displayName%** eingelöst.", + "name": "codeRedeemed", + "humanName": { + "en": "Code-Redeemed Message", + "de": "Code-eingelöst Nachricht" + }, + "default": { + "en": "Good job, you have successfully redeemed the code **%displayName%**", + "de": "Gute Arbeit, du hast erfolgreich den Code **%displayName%** eingelöst." + }, + "description": { + "en": "This message gets send, when a user tries redeems a code", + "de": "Diese Nachricht wird verschickt, wenn ein Nutzer einen Code einlöst" + }, "type": "string", "allowEmbed": true, - "description-en": "This message gets send, when a user tries redeems a code", - "description-de": "Diese Nachricht wird verschickt, wenn ein Nutzer einen Code einlöst", - "params-en": [ - { - "name": "%displayName%", - "description": "Display-Name of the code" - }, - { - "name": "%codeUseCount%", - "description": "Count of times this code has already been redeemed" - }, - { - "name": "%userCodesCount%", - "description": "Count of codes this user already has redeemed" - } - ], - "params-de": [ + "params": [ { - "name": "%displayName%", - "description": "Anzeige-Name des Codes, denn der Nutzer einlöst" + "name": "displayName", + "description": { + "en": "Display-Name of the code", + "de": "Anzeige-Name des Codes, denn der Nutzer einlöst" + } }, { - "name": "%userCodesCount%", - "description": "Anzahl der Codes, die dieser Nutzer bereits eingelöst hat" + "name": "codeUseCount", + "description": { + "en": "Count of times this code has already been redeemed", + "de": "Anzahl von Nutzer, die diesen Code bereits eingelöst haben" + } }, { - "name": "%codeUseCount%", - "description": "Anzahl von Nutzer, die diesen Code bereits eingelöst haben" + "name": "userCodesCount", + "description": { + "en": "Count of codes this user already has redeemed", + "de": "Anzahl der Codes, die dieser Nutzer bereits eingelöst hat" + } } ] }, { - "field_name": "profileMessage", - "humanname-en": "Profile-Message", - "humanname-de": "Profil-Nachricht", - "default-en": { - "title": "Your profile, %username%!", - "fields": [ - { - "name": "Found codes", - "value": "%foundCodes%", - "inline": true - }, - { - "name": "Progress", - "value": "%foundCount%/%allCodesCount% found", - "inline": true - } - ] + "name": "profileMessage", + "humanName": { + "en": "Profile-Message", + "de": "Profil-Nachricht" }, - "default-de": { - "title": "Dein Profil %username%!", - "fields": [ - { - "name": "Gefunde Codes", - "value": "%foundCodes%", - "inline": true - }, - { - "name": "Fortschritt", - "value": "%foundCount%/%allCodesCount% gefunden", - "inline": true - } - ] + "default": { + "en": { + "title": "Your profile, %username%!", + "fields": [ + { + "name": "Found codes", + "value": "%foundCodes%", + "inline": true + }, + { + "name": "Progress", + "value": "%foundCount%/%allCodesCount% found", + "inline": true + } + ] + }, + "de": { + "title": "Dein Profil %username%!", + "fields": [ + { + "name": "Gefunde Codes", + "value": "%foundCodes%", + "inline": true + }, + { + "name": "Fortschritt", + "value": "%foundCount%/%allCodesCount% gefunden", + "inline": true + } + ] + } + }, + "description": { + "en": "This message gets send, when a user opens their profile", + "de": "Diese Nachricht wird versendet, wenn ein Nutzer sein Profil öffnet" }, "type": "string", "allowEmbed": true, - "description-en": "This message gets send, when a user opens their profile", - "description-de": "Diese Nachricht wird versendet, wenn ein Nutzer sein Profil öffnet", - "params-en": [ - { - "name": "%foundCodes%", - "description": "All codes that this user has found" - }, - { - "name": "%username%", - "description": "Username of the user running the command" - }, + "params": [ { - "name": "%foundCount%", - "description": "Count of found codes" - }, - { - "name": "%allCodesCount%", - "description": "Count of all available codes" - } - ], - "params-de": [ - { - "name": "%foundCodes%", - "description": "Alle Codes, die der Nutzer gefunden hat" + "name": "foundCodes", + "description": { + "en": "All codes that this user has found", + "de": "Alle Codes, die der Nutzer gefunden hat" + } }, { - "name": "%foundCount%", - "description": "Anzahl aller gefunden Codes" + "name": "username", + "description": { + "en": "Username of the user running the command", + "de": "Nutzername des Nutzers, der den Befehl ausführt" + } }, { - "name": "%username%", - "description": "Nutzername des Nutzers, der den Befehl ausführt" + "name": "foundCount", + "description": { + "en": "Count of found codes", + "de": "Anzahl aller gefunden Codes" + } }, { - "name": "%allCodesCount%", - "description": "Anzahl aller verfügbaren Codes" + "name": "allCodesCount", + "description": { + "en": "Count of all available codes", + "de": "Anzahl aller verfügbaren Codes" + } } ] }, { - "field_name": "leaderboardMessage", - "humanname-en": "Leaderboard-Message", - "humanname-de": "Leaderboard-Nachricht", + "name": "leaderboardMessage", + "humanName": { + "en": "Leaderboard-Message", + "de": "Leaderboard-Nachricht" + }, + "default": { + "en": { + "title": "Leaderboard", + "color": "GREEN", + "thumbnail": "", + "image": "" + } + }, + "description": {}, "type": "keyed", - "disableKeyEdits": true, "content": { "key": "string", "value": "string" }, - "default": { - "title": "Leaderboard", - "color": "GREEN", - "thumbnail": "", - "image": "" - } + "disableKeyEdits": true } ] -} \ No newline at end of file +} diff --git a/modules/info-commands/commands/info.js b/modules/info-commands/commands/info.js index 3cf0d089..c8e8a298 100644 --- a/modules/info-commands/commands/info.js +++ b/modules/info-commands/commands/info.js @@ -2,7 +2,7 @@ const {localize} = require('../../../src/functions/localize'); const {embedType, pufferStringToSize, dateToDiscordTimestamp} = require('../../../src/functions/helpers'); const {getUser} = require('@scnetwork/api'); const {MessageEmbed} = require('discord.js'); -const {AgeFromDateString} = require('age-calculator'); +const {AgeFromDate} = require('age-calculator'); const {stringNames} = require('../../invite-tracking/events/guildMemberJoin'); // THIS IS PAIN. Rewrite it as soon as possible @@ -169,7 +169,7 @@ module.exports.subcommands = { if (birthday) { let dateString = `${birthday.day}.${birthday.month}${birthday.year ? `.${birthday.year}` : ''}`; if (birthday.year) { - const age = new AgeFromDateString(`${birthday.year}-${birthday.month - 1}-${birthday.day}`).age; + const age = new AgeFromDate(new Date(birthday.year, birthday.month - 1, birthday.day)).age; dateString = `[${dateString}](https://sc-network.net/age?age=${age} "${localize('birthdays', 'age-hover', {a: age})}")`; } embed.addField(moduleStrings.userinfo.birthday, `${dateString} ${((scNetworkUser || {}).birthday || {}).day && birthdaySyncSymbol ? `[🗘](https://docs.sc-network.net/de/dashboard/birthday-sync-faq "${localize('birthdays', 'sync-enabled-hover')}")` : ''}${((scNetworkUser || {}).birthday || {}).day && ((scNetworkUser || {}).birthday || {}).verfied && showVerifiedItem ? `[✓](https://docs.sc-network.net/de/dashboard/birthday-sync-faq "${localize('birthdays', 'verified-hover')}")` : ''}`, true); diff --git a/modules/info-commands/module.json b/modules/info-commands/module.json index 0c3b6c25..93d917f4 100644 --- a/modules/info-commands/module.json +++ b/modules/info-commands/module.json @@ -1,15 +1,11 @@ { "name": "info-commands", - "humanReadableName-en": "Info-Commands", - "humanReadableName-de": "Info-Befehle", "fa-icon": "fa-solid fa-circle-info", "author": { "scnxOrgID": "1", "name": "SCDerox (SC Network Team)", "link": "https://github.com/SCDerox" }, - "description-en": "Adds info-commands with information about specific parts of your server", - "description-de": "Fügt viele Info-Commands zu deinen Server hinzu", "commands-dir": "/commands", "config-example-files": [ "strings.json" @@ -17,5 +13,13 @@ "tags": [ "moderation" ], - "openSourceURL": "https://github.com/SCNetwork/CustomDCBot/tree/main/modules/info-commands" + "openSourceURL": "https://github.com/SCNetwork/CustomDCBot/tree/main/modules/info-commands", + "humanReadableName": { + "en": "Info-Commands", + "de": "Info-Befehle" + }, + "description": { + "en": "Adds info-commands with information about specific parts of your server", + "de": "Fügt viele Info-Commands zu deinen Server hinzu" + } } diff --git a/modules/info-commands/strings.json b/modules/info-commands/strings.json index ba346ead..699701d7 100644 --- a/modules/info-commands/strings.json +++ b/modules/info-commands/strings.json @@ -1,256 +1,295 @@ { + "description": {}, + "humanName": {}, "filename": "strings.json", "content": [ { - "field_name": "serverinfo", + "name": "serverinfo", + "humanName": { + "de": "Serverinfo" + }, + "default": { + "en": { + "id": "ID", + "owner": "Owner", + "boosts": "Boosts", + "emojiCount": "Emoji-Count", + "region": "Region", + "roleCount": "Role-Count", + "rulesChannel": "Rules-Channel", + "dcSystemChannel": "Discord-System-Channel", + "verificationLevel": "Verification-Level", + "banCount": "Banns", + "createdAt": "Created at", + "members": "Members", + "channels": "Channels", + "features": "Features", + "noFeaturesEnabled": "No features enabled", + "afkChannel": "AFK-Channel", + "stickerCount": "Sticker-Count" + }, + "de": { + "id": "ID", + "owner": "Eigentümer", + "boosts": "Boosts", + "emojiCount": "Emoji-Anzahl", + "region": "Region", + "roleCount": "Rollen-Anzahl", + "rulesChannel": "Regelkanal", + "dcSystemChannel": "Discord-Systemkanal", + "verificationLevel": "Verifizierungsstufe", + "banCount": "Banns", + "createdAt": "Erstellt am", + "members": "Mitglieder", + "channels": "Kanäle", + "features": "Funktionen", + "noFeaturesEnabled": "Keine Funktionen aktiviert", + "afkChannel": "AFK-Kanal", + "stickerCount": "Sticker-Anzahl" + } + }, + "description": { + "en": "You can change the parts of the serverinfo-command here", + "de": "Hier kannst du die Teile des serverinfo-Befehls anpassen" + }, "type": "keyed", - "description": "You can change the parts of the serverinfo-command here", "content": { "key": "string", "value": "string" }, - "default": { - "id": "ID", - "owner": "Owner", - "boosts": "Boosts", - "emojiCount": "Emoji-Count", - "region": "Region", - "roleCount": "Role-Count", - "rulesChannel": "Rules-Channel", - "dcSystemChannel": "Discord-System-Channel", - "verificationLevel": "Verification-Level", - "banCount": "Banns", - "createdAt": "Created at", - "members": "Members", - "channels": "Channels", - "features": "Features", - "noFeaturesEnabled": "No features enabled", - "afkChannel": "AFK-Channel", - "stickerCount": "Sticker-Count" - }, - "disableKeyEdits": true, - "humanname-de": "Serverinfo", - "description-de": "Hier kannst du die Teile des serverinfo-Befehls anpassen", - "params-de": {}, - "default-de": { - "id": "ID", - "owner": "Eigentümer", - "boosts": "Boosts", - "emojiCount": "Emoji-Anzahl", - "region": "Region", - "roleCount": "Rollen-Anzahl", - "rulesChannel": "Regelkanal", - "dcSystemChannel": "Discord-Systemkanal", - "verificationLevel": "Verifizierungsstufe", - "banCount": "Banns", - "createdAt": "Erstellt am", - "members": "Mitglieder", - "channels": "Kanäle", - "features": "Funktionen", - "noFeaturesEnabled": "Keine Funktionen aktiviert", - "afkChannel": "AFK-Kanal", - "stickerCount": "Sticker-Anzahl" - } + "disableKeyEdits": true }, { - "field_name": "userinfo", + "name": "userinfo", + "humanName": { + "de": "Userinfo" + }, + "default": { + "en": { + "id": "ID", + "tag": "Tag", + "currentStatus": "Current status", + "createdAt": "Account created at", + "joinedAt": "Joined Server at", + "nickname": "Nickname", + "boosterSince": "Server-Booster since", + "displayColor": "Display-Color", + "currentVoiceChannel": "Current Voice-Channel", + "highestRole": "Highest role", + "hoistRole": "Hoisted role", + "birthday": "Birthday", + "permissions": "Permissions", + "xp": "XP", + "invited-by": "Invited by", + "bio": "Bio", + "invites": "Invites", + "level": "Level", + "messages": "Messages", + "noPermissions": "This user does not have any permissions ):" + }, + "de": { + "id": "ID", + "tag": "Tag", + "currentStatus": "Aktueller Status", + "createdAt": "Account erstellt am", + "joinedAt": "Server beigetreten am", + "nickname": "Nickname", + "boosterSince": "Server-Booster seit", + "displayColor": "Anzeigefarbe", + "currentVoiceChannel": "Aktueller Sprachkanal", + "highestRole": "Höchste Rolle", + "hoistRole": "Gelistete Rolle", + "birthday": "Geburtstag", + "permissions": "Berechtigungen", + "xp": "XP", + "bio": "Bio", + "level": "Level", + "messages": "Nachrichten", + "noPermissions": "Dieser Nutzer hat keine Berechtigungen ):", + "invited-by": "Invited by", + "invites": "Invites" + } + }, + "description": { + "en": "You can change the parts of the userinfo-command here", + "de": "Hier kannst du die Teile des userinfo-Befehls anpassen" + }, "type": "keyed", - "description": "You can change the parts of the userinfo-command here", "content": { "key": "string", "value": "string" }, - "default": { - "id": "ID", - "tag": "Tag", - "currentStatus": "Current status", - "createdAt": "Account created at", - "joinedAt": "Joined Server at", - "nickname": "Nickname", - "boosterSince": "Server-Booster since", - "displayColor": "Display-Color", - "currentVoiceChannel": "Current Voice-Channel", - "highestRole": "Highest role", - "hoistRole": "Hoisted role", - "birthday": "Birthday", - "permissions": "Permissions", - "xp": "XP", - "invited-by": "Invited by", - "bio": "Bio", - "invites": "Invites", - "level": "Level", - "messages": "Messages", - "noPermissions": "This user does not have any permissions ):" - }, - "disableKeyEdits": true, - "humanname-de": "Userinfo", - "description-de": "Hier kannst du die Teile des userinfo-Befehls anpassen", - "params-de": {}, - "default-de": { - "id": "ID", - "tag": "Tag", - "currentStatus": "Aktueller Status", - "createdAt": "Account erstellt am", - "joinedAt": "Server beigetreten am", - "nickname": "Nickname", - "boosterSince": "Server-Booster seit", - "displayColor": "Anzeigefarbe", - "currentVoiceChannel": "Aktueller Sprachkanal", - "highestRole": "Höchste Rolle", - "hoistRole": "Gelistete Rolle", - "birthday": "Geburtstag", - "permissions": "Berechtigungen", - "xp": "XP", - "bio": "Bio", - "level": "Level", - "messages": "Nachrichten", - "noPermissions": "Dieser Nutzer hat keine Berechtigungen ):", - "invited-by": "Invited by", - "invites": "Invites" - } + "disableKeyEdits": true }, { - "field_name": "channelInfo", + "name": "channelInfo", + "humanName": { + "de": "Channelinfo" + }, + "default": { + "en": { + "id": "ID", + "createdAt": "Created at", + "type": "Type", + "name": "Name", + "parent": "Category", + "topic": "Topic", + "position": "Current position", + "stageInstanceName": "Stage topic", + "stageInstancePrivacy": "Stage Privacy", + "threadArchivedAt": "Thread archived at", + "threadAutoArchiveDuration": "Thread auto Archive Duration", + "threadOwner": "Thread-Owner", + "threadMessages": "Messages in thread", + "threadMemberCount": "Members in this thread", + "membersInChannel": "Members currently in this channel" + }, + "de": { + "id": "ID", + "createdAt": "Erstellt am", + "type": "Typ", + "name": "Name", + "parent": "Kategorie", + "topic": "Kanalbeschreibung", + "position": "Aktuelle Position", + "stageInstanceName": "Stage Thema", + "stageInstancePrivacy": "Stage Privacy", + "threadArchivedAt": "Thread archiviert am", + "threadAutoArchiveDuration": "Automatische Threadarchivierungsdauer", + "threadOwner": "Thread-Besitzer", + "threadMessages": "Nachrichten im Thread", + "threadMemberCount": "Mitglieder in diesem Thread", + "membersInChannel": "Mitglieder, die sich aktuell in diesem Kanal befinden" + } + }, + "description": { + "en": "You can change the parts of the channelinfo-command here", + "de": "Hier kannst du die Teile des channelinfo-Befehls anpassen" + }, "type": "keyed", - "description": "You can change the parts of the channelinfo-command here", "content": { "key": "string", "value": "string" }, - "default": { - "id": "ID", - "createdAt": "Created at", - "type": "Type", - "name": "Name", - "parent": "Category", - "topic": "Topic", - "position": "Current position", - "stageInstanceName": "Stage topic", - "stageInstancePrivacy": "Stage Privacy", - "threadArchivedAt": "Thread archived at", - "threadAutoArchiveDuration": "Thread auto Archive Duration", - "threadOwner": "Thread-Owner", - "threadMessages": "Messages in thread", - "threadMemberCount": "Members in this thread", - "membersInChannel": "Members currently in this channel" - }, - "disableKeyEdits": true, - "humanname-de": "Channelinfo", - "description-de": "Hier kannst du die Teile des channelinfo-Befehls anpassen", - "params-de": {}, - "default-de": { - "id": "ID", - "createdAt": "Erstellt am", - "type": "Typ", - "name": "Name", - "parent": "Kategorie", - "topic": "Kanalbeschreibung", - "position": "Aktuelle Position", - "stageInstanceName": "Stage Thema", - "stageInstancePrivacy": "Stage Privacy", - "threadArchivedAt": "Thread archiviert am", - "threadAutoArchiveDuration": "Automatische Threadarchivierungsdauer", - "threadOwner": "Thread-Besitzer", - "threadMessages": "Nachrichten im Thread", - "threadMemberCount": "Mitglieder in diesem Thread", - "membersInChannel": "Mitglieder, die sich aktuell in diesem Kanal befinden" - } + "disableKeyEdits": true }, { - "field_name": "roleInfo", + "name": "roleInfo", + "humanName": { + "de": "Roleinfo" + }, + "default": { + "en": { + "id": "ID", + "createdAt": "Created at", + "color": "Color", + "name": "Name", + "position": "Current position", + "memberWithThisRoleCount": "Count of members with this role", + "memberWithThisRole": "Members with this role", + "permissions": "Permissions" + }, + "de": { + "id": "ID", + "createdAt": "Erstellt am", + "color": "Farbe", + "name": "Name", + "position": "Aktuelle Position", + "memberWithThisRoleCount": "Anzahl der Mitglieder mit dieser Rolle", + "memberWithThisRole": "Mitglieder mit dieser Rolle", + "permissions": "Berechtigungen" + } + }, + "description": { + "en": "You can change the parts of the roleinfo-command here", + "de": "Hier kannst du die Teile des serverinfo-Befehls anpassen" + }, "type": "keyed", - "description": "You can change the parts of the roleinfo-command here", "content": { "key": "string", "value": "string" }, - "default": { - "id": "ID", - "createdAt": "Created at", - "color": "Color", - "name": "Name", - "position": "Current position", - "memberWithThisRoleCount": "Count of members with this role", - "memberWithThisRole": "Members with this role", - "permissions": "Permissions" - }, - "disableKeyEdits": true, - "humanname-de": "Roleinfo", - "description-de": "Hier kannst du die Teile des serverinfo-Befehls anpassen", - "params-de": {}, - "default-de": { - "id": "ID", - "createdAt": "Erstellt am", - "color": "Farbe", - "name": "Name", - "position": "Aktuelle Position", - "memberWithThisRoleCount": "Anzahl der Mitglieder mit dieser Rolle", - "memberWithThisRole": "Mitglieder mit dieser Rolle", - "permissions": "Berechtigungen" - } + "disableKeyEdits": true }, { - "field_name": "user_not_found", - "default": "I could not find this user - try using an ID or a mention", + "name": "user_not_found", + "humanName": { + "de": "Nutzer nicht gefunden" + }, + "default": { + "en": "I could not find this user - try using an ID or a mention", + "de": "Dieser Nutzer konnte nicht gefunden werden - versuche eine ID oder eine Erwähnung zu verwenden" + }, + "description": { + "en": "Message that gets send if the user provided an invalid userid", + "de": "Nachricht, die gesendet wird, wenn der Nutzer eine Ungültige NutzerID angibt" + }, "type": "string", - "allowEmbed": true, - "description": "Message that gets send if the user provided an invalid userid", - "humanname-de": "Nutzer nicht gefunden", - "description-de": "Nachricht, die gesendet wird, wenn der Nutzer eine Ungültige NutzerID angibt", - "params-de": {}, - "default-de": "Dieser Nutzer konnte nicht gefunden werden - versuche eine ID oder eine Erwähnung zu verwenden" + "allowEmbed": true }, { - "field_name": "channel_not_found", - "default": "I could not find this channel - try using an ID or a mention", + "name": "channel_not_found", + "humanName": { + "de": "Kanal nicht gefunden" + }, + "default": { + "en": "I could not find this channel - try using an ID or a mention", + "de": "Dieser Kanal konnte nicht gefunden werden - versuche eine ID oder eine Erwähnung zu verwenden" + }, + "description": { + "en": "Message that gets send if the user provided an invalid userid", + "de": "Nachricht, die gesendet wird, wenn der Nutzer eine Ungültige KanalID angibt" + }, "type": "string", - "allowEmbed": true, - "description": "Message that gets send if the user provided an invalid userid", - "humanname-de": "Kanal nicht gefunden", - "description-de": "Nachricht, die gesendet wird, wenn der Nutzer eine Ungültige KanalID angibt", - "params-de": {}, - "default-de": "Dieser Kanal konnte nicht gefunden werden - versuche eine ID oder eine Erwähnung zu verwenden" + "allowEmbed": true }, { - "field_name": "role_not_found", - "default": "I could not find this role - try using an ID or a mention", + "name": "role_not_found", + "humanName": { + "de": "Rolle nicht gefunden" + }, + "default": { + "en": "I could not find this role - try using an ID or a mention", + "de": "Diese Rolle konnte nicht gefunden werden - versuche eine ID oder eine Erwähnung zu verwenden" + }, + "description": { + "en": "Message that gets send if the user provided an invalid roleid", + "de": "Nachricht, die gesendet wird, wenn der Nutzer eine Ungültige RollenID angibt" + }, "type": "string", - "allowEmbed": true, - "description": "Message that gets send if the user provided an invalid roleid", - "humanname-de": "Rolle nicht gefunden", - "description-de": "Nachricht, die gesendet wird, wenn der Nutzer eine Ungültige RollenID angibt", - "params-de": {}, - "default-de": "Diese Rolle konnte nicht gefunden werden - versuche eine ID oder eine Erwähnung zu verwenden" + "allowEmbed": true }, { - "field_name": "avatarMsg", - "default": "Here is the avatar: (Please reminder that the image may be protected under copyright-law)", + "name": "avatarMsg", + "humanName": { + "de": "Avatar-Nachricht" + }, + "default": { + "en": "Here is the avatar: (Please reminder that the image may be protected under copyright-law)", + "de": "Hier ist der Avatar: (Bitte beachte, dass das Bild eventuell urheberrechtlich geschützt ist)" + }, + "description": { + "en": "Message that gets send if the user requested an avatar", + "de": "Nachricht, die gesendet wird, wenn ein Nutzer einen Avatar anfragt" + }, "type": "string", "allowEmbed": true, - "description": "Message that gets send if the user requested an avatar", "params": [ { - "name": "%avatarUrl%", - "description": "URL to the avatar" - }, - { - "name": "%tag%", - "description": "Tag of the requested user" - } - ], - "humanname-de": "Avatar-Nachricht", - "description-de": "Nachricht, die gesendet wird, wenn ein Nutzer einen Avatar anfragt", - "params-de": [ - { - "name": "%avatarUrl%", - "description": "URL zum Avatar" + "name": "avatarUrl", + "description": { + "en": "URL to the avatar", + "de": "URL zum Avatar" + } }, { - "name": "%tag%", - "description": "Tag des gewünschten Nutzers" + "name": "tag", + "description": { + "en": "Tag of the requested user", + "de": "Tag des gewünschten Nutzers" + } } - ], - "default-de": "Hier ist der Avatar: (Bitte beachte, dass das Bild eventuell urheberrechtlich geschützt ist)" + ] } ] } diff --git a/modules/invite-tracking/config.json b/modules/invite-tracking/config.json index 62dd878c..a0a03397 100644 --- a/modules/invite-tracking/config.json +++ b/modules/invite-tracking/config.json @@ -1,4 +1,6 @@ { + "description": {}, + "humanName": {}, "filename": "config.json", "commandsWarnings": { "normal": [ @@ -7,13 +9,19 @@ }, "content": [ { - "field_name": "logchannel-id", - "humanname-en": "Invite-Log-Channel", - "humanname-de": "Invite-Log-Kanal", - "default": "", + "name": "logchannel-id", + "humanName": { + "en": "Invite-Log-Channel", + "de": "Invite-Log-Kanal" + }, + "default": { + "en": "" + }, + "description": { + "en": "Channel in which information about new members should get logged (optional)", + "de": "Kanal, in welchem Informationen über neue Nutzer geloggt werden sollen (optional)" + }, "type": "channelID", - "description-en": "Channel in which information about new members should get logged (optional)", - "description-de": "Kanal, in welchem Informationen über neue Nutzer geloggt werden sollen (optional)", "allowNull": true } ] diff --git a/modules/invite-tracking/events/guildMemberJoin.js b/modules/invite-tracking/events/guildMemberJoin.js index 43c26c08..436bf804 100644 --- a/modules/invite-tracking/events/guildMemberJoin.js +++ b/modules/invite-tracking/events/guildMemberJoin.js @@ -33,10 +33,7 @@ module.exports.run = async (client, member, type, invite) => { if (moduleConfig['logchannel-id']) { const c = client.channels.cache.get(moduleConfig['logchannel-id']); if (!c) return client.logger.error(localize('invite-tracking', 'log-channel-not-found-but-set', {c: moduleConfig['logchannel-id']})); - const components = [{ - type: 'ACTION_ROW', - components: [] - }]; + const components = []; const embed = new MessageEmbed() .setTitle('📥 ' + localize('invite-tracking', 'new-member')) .setFooter({text: client.strings.footer, iconURL: client.strings.footerImgUrl}) @@ -58,15 +55,22 @@ module.exports.run = async (client, member, type, invite) => { inviter: invite.inviter.id } }); - inviteString = inviteString + '\n' + localize('invite-tracking', 'inviter', {u: invite.inviter.toString(), i: userInvites.length, a: userInvites.filter(i => !i.left).length}); + inviteString = inviteString + '\n' + localize('invite-tracking', 'inviter', { + u: invite.inviter.toString(), + i: userInvites.length, + a: userInvites.filter(i => !i.left).length + }); } if (invite.uses) inviteString = inviteString + '\n' + localize('invite-tracking', 'uses', {u: invite.uses}); if (invite.maxUses) inviteString = inviteString + '\n' + localize('invite-tracking', 'max-uses', {u: invite.maxUses}); - components[0].components.push({ - type: 'BUTTON', - label: '🗑️ ' + localize('invite-tracking', 'revoke-invite'), - style: 'DANGER', - customId: `inv-rev-${invite.code}` + components.push({ + type: 'ACTION_ROW', + components: [{ + type: 'BUTTON', + label: '🗑️ ' + localize('invite-tracking', 'revoke-invite'), + style: 'DANGER', + customId: `inv-rev-${invite.code}` + }] }); embed.addField(localize('invite-tracking', 'invite'), inviteString); } diff --git a/modules/invite-tracking/module.json b/modules/invite-tracking/module.json index 4dfd6826..004173b3 100644 --- a/modules/invite-tracking/module.json +++ b/modules/invite-tracking/module.json @@ -1,13 +1,13 @@ { "name": "invite-tracking", - "humanReadableName": "Invite-Tracking", + "humanReadableName": { + "en": "Invite-Tracking" + }, "author": { "scnxOrgID": "1", "name": "SCDerox (SC Network Team)", "link": "https://github.com/SCDerox" }, - "description-en": "Track who invited who", - "description-de": "Track, wer wen eingeladen hat", "events-dir": "/events", "commands-dir": "/commands", "models-dir": "/models", @@ -19,5 +19,9 @@ "tags": [ "moderation" ], - "openSourceURL": "https://github.com/SCNetwork/CustomDCBot/tree/main/modules/invite-tracking" + "openSourceURL": "https://github.com/SCNetwork/CustomDCBot/tree/main/modules/invite-tracking", + "description": { + "en": "Track who invited who", + "de": "Track, wer wen eingeladen hat" + } } diff --git a/modules/levels/commands/manage-levels.js b/modules/levels/commands/manage-levels.js index 5c8663ee..43d47df5 100644 --- a/modules/levels/commands/manage-levels.js +++ b/modules/levels/commands/manage-levels.js @@ -53,8 +53,16 @@ module.exports.subcommands = { } user.xp = interaction.options.getNumber('value'); await user.save(); - interaction.client.logger.info(localize('levels', 'manipulated', {u: interaction.user.tag, ui: user.userID, v: interaction.options.getNumber('value')})); - if (interaction.client.logChannel) await interaction.client.logChannel.send(localize('levels', 'manipulated', {u: interaction.user.tag, ui: user.userID, v: interaction.options.getNumber('value')})); + interaction.client.logger.info(localize('levels', 'manipulated', { + u: interaction.user.tag, + m: dcUser.tag, + v: interaction.options.getNumber('value') + })); + if (interaction.client.logChannel) await interaction.client.logChannel.send(localize('levels', 'manipulated', { + u: interaction.user.tag, + m: dcUser.tag, + v: interaction.options.getNumber('value') + })); await interaction.reply({ ephemeral: true, content: localize('levels', 'successfully-changed') diff --git a/modules/levels/configs/config.json b/modules/levels/configs/config.json index 9ef7b03c..66bf21a0 100644 --- a/modules/levels/configs/config.json +++ b/modules/levels/configs/config.json @@ -1,9 +1,13 @@ { + "description": { + "en": "Configure the function of the module here", + "de": "Stelle hier die Funktionen des Modules ein" + }, + "humanName": { + "en": "Configuration", + "de": "Konfiguration" + }, "filename": "config.json", - "humanname-de": "Konfiguration", - "humanname-en": "Configuration", - "description-en": "Configure the function of the module here", - "description-de": "Stelle hier die Funktionen des Modules ein", "commandsWarnings": { "normal": [ "/manage-levels" @@ -11,167 +15,226 @@ }, "content": [ { - "field_name": "min-xp", - "humanname-en": "XP given at least", - "humanname-de": "Mindestens gegebenes XP", - "default": 25, - "type": "integer", - "description-en": "How much XP the user gets at least", - "description-de": "So viel XP bekommt ein Benutzer mindestens", - "params-de": {}, - "default-de": 25 + "name": "min-xp", + "humanName": { + "en": "XP given at least", + "de": "Mindestens gegebenes XP" + }, + "default": { + "en": 25, + "de": 25 + }, + "description": { + "en": "How much XP the user gets at least", + "de": "So viel XP bekommt ein Benutzer mindestens" + }, + "type": "integer" }, { - "field_name": "max-xp", - "humanname-en": "XP given at most", - "humanname-de": "Maximal gegebenes XP", - "default": 65, - "type": "integer", - "description-en": "How much XP the user gets at most", - "description-de": "So viel XP bekommt ein Benutzer maximal", - "params-de": {}, - "default-de": 65 + "name": "max-xp", + "humanName": { + "en": "XP given at most", + "de": "Maximal gegebenes XP" + }, + "default": { + "en": 65, + "de": 65 + }, + "description": { + "en": "How much XP the user gets at most", + "de": "So viel XP bekommt ein Benutzer maximal" + }, + "type": "integer" }, { - "field_name": "cooldown", - "humanname-en": "Cooldown", - "default": 1500, - "type": "integer", - "description-en": "In ms. How much cooldown there is between each XP getting", - "description-de": "In Millisekunden! So viel Zeit muss ein Nutzer zwischen jeder Nachricht mit XP warten", - "humanname-de": "", - "params-de": {}, - "default-de": 1500 + "name": "cooldown", + "humanName": { + "en": "Cooldown" + }, + "default": { + "en": 1500, + "de": 1500 + }, + "description": { + "en": "In ms. How much cooldown there is between each XP getting", + "de": "In Millisekunden! So viel Zeit muss ein Nutzer zwischen jeder Nachricht mit XP warten" + }, + "type": "integer" }, { - "field_name": "level_up_channel_id", - "humanname-en": "Level-Up-Channel", - "default": "", + "name": "level_up_channel_id", + "humanName": { + "en": "Level-Up-Channel" + }, + "default": { + "en": "" + }, + "description": { + "en": "Channel in which Level-Up-Messages should get send. (Leave empty to disable)", + "de": "Channel, in den die Level-Up-Nachrichten gesendet werden. (Leerlassen, um sie einfach in den aktuellen Channel zu schicken))" + }, "type": "channelID", - "allowNull": true, - "description-en": "Channel in which Level-Up-Messages should get send. (Leave empty to disable)", - "description-de": "Channel, in den die Level-Up-Nachrichten gesendet werden. (Leerlassen, um sie einfach in den aktuellen Channel zu schicken))", - "humanname-de": "", - "params-de": {}, - "default-de": "" + "allowNull": true }, { - "field_name": "sortLeaderboardBy", - "humanname-en": "Leaderboard-Sort-Category", - "humanname-de": "Ranglisten-Sortierung", - "default": "levels", + "name": "sortLeaderboardBy", + "humanName": { + "en": "Leaderboard-Sort-Category", + "de": "Ranglisten-Sortierung" + }, + "default": { + "en": "levels", + "de": "levels" + }, + "description": { + "en": "How the leaderboard should be sorted", + "de": "Wähle aus, wie der /leaderboard-command aussehen werden soll" + }, "type": "select", "content": [ "levels", "xp" - ], - "description-en": "How the leaderboard should be sorted", - "description-de": "Wähle aus, wie der /leaderboard-command aussehen werden soll", - "params-de": {}, - "default-de": "levels" + ] }, { - "field_name": "blacklisted_channels", - "humanname-en": "Blacklisted Channels", - "humanname-de": "Channel ohne XP", - "default": [], + "name": "blacklisted_channels", + "humanName": { + "en": "Blacklisted Channels", + "de": "Channel ohne XP" + }, + "default": { + "en": [], + "de": [] + }, + "description": { + "en": "Blacklisted-Channels in which users can not earn XP", + "de": "Channel, in denen kein XP gesammelt werden kann" + }, "type": "array", - "content": "channelID", - "description-en": "Blacklisted-Channels in which users can not earn XP", - "description-de": "Channel, in denen kein XP gesammelt werden kann", - "params-de": {}, - "default-de": [] + "content": "channelID" }, { - "field_name": "reward_roles", - "humanname-de": "Level-Belohnung-Rollen", - "humanname-en": "Level-Reward-Roles", - "default": {}, + "name": "reward_roles", + "humanName": { + "en": "Level-Reward-Roles", + "de": "Level-Belohnung-Rollen" + }, + "default": { + "en": {}, + "de": {} + }, + "description": { + "en": "Level, bei denen der Nutzer eine Rolle bekommt. Parameter 1: Level, Parameter 2: Rollen-ID", + "de": "Level at which users should get roles" + }, "type": "keyed", - "description-de": "Level at which users should get roles", - "description-en": "Level, bei denen der Nutzer eine Rolle bekommt. Parameter 1: Level, Parameter 2: Rollen-ID", "content": { "key": "integer", "value": "roleID" - }, - "params-de": {}, - "default-de": {} + } }, { - "field_name": "onlyTopLevelRole", - "hummanname-de": "Nur die höchste Level-Rolle geben", - "hummanname-en": "Users only can have their highest level role", - "default": false, - "type": "boolean", - "description-en": "If enabled, all previous level roles a user had will get removed, when they advance to a new level.", - "description-de": "Wenn aktiviert, werden alle vorherigen Level-Rollen, die ein Nutzer hatte, entfernt, wenn dieser ein neues Level erreicht." + "name": "onlyTopLevelRole", + "humanName": {}, + "default": { + "en": false + }, + "description": { + "en": "If enabled, all previous level roles a user had will get removed, when they advance to a new level.", + "de": "Wenn aktiviert, werden alle vorherigen Level-Rollen, die ein Nutzer hatte, entfernt, wenn dieser ein neues Level erreicht." + }, + "type": "boolean" }, { - "field_name": "reset-on-leave", - "hummanname-de": "XP und Level eines Nutzers bei Leave löschen", - "hummanname-en": "Delete XP and Level of a user when they leave", - "default": false, - "type": "boolean", - "description-en": "If enabled, all levels and the XP of a user will be deleted, when they leave your server.", - "description-de": "Wenn aktiviert, werden alle Level und das XP eines Nutzers gelöscht, wenn er den Server verlässt." + "name": "reset-on-leave", + "humanName": {}, + "default": { + "en": false + }, + "description": { + "en": "If enabled, all levels and the XP of a user will be deleted, when they leave your server.", + "de": "Wenn aktiviert, werden alle Level und das XP eines Nutzers gelöscht, wenn er den Server verlässt." + }, + "type": "boolean" }, { - "field_name": "randomMessages", - "humanname-de": "Zufällige Nachrichten", - "humanname-en": "Random messages", - "default": false, - "type": "boolean", - "description-de": "If enabled the module will randomly select a messages from random-levelup-messages and ignore the one set in strings", - "description-en": "Wenn aktiviert wird das Modul die Level-Up-Nachricht zufällig auswählen und nicht die in Nachrichten angegebene verwenden", - "params-de": {}, - "default-de": false + "name": "randomMessages", + "humanName": { + "en": "Random messages", + "de": "Zufällige Nachrichten" + }, + "default": { + "en": false + }, + "description": { + "en": "Wenn aktiviert wird das Modul die Level-Up-Nachricht zufällig auswählen und nicht die in Nachrichten angegebene verwenden", + "de": "If enabled the module will randomly select a messages from random-levelup-messages and ignore the one set in strings" + }, + "type": "boolean" }, { - "field_name": "leaderboard-channel", - "humanname-de": "Ranglisten-Channel", - "humanname-en": "Leaderboard-Channel", - "default": "", + "name": "leaderboard-channel", + "humanName": { + "en": "Leaderboard-Channel", + "de": "Ranglisten-Channel" + }, + "default": { + "en": "" + }, + "description": { + "en": "Wenn gesetzt wird der Bot in diesen Channel eine Nachricht senden, welche die aktuellen Level der Nutzern enthält", + "de": "If set, the bot will send a messages in this channel with the current leaderboard and edit it every five minutes" + }, "type": "channelID", "content": [ "GUILD_TEXT" ], - "allowNull": true, - "description-de": "If set, the bot will send a messages in this channel with the current leaderboard and edit it every five minutes", - "description-en": "Wenn gesetzt wird der Bot in diesen Channel eine Nachricht senden, welche die aktuellen Level der Nutzern enthält", - "params-de": {}, - "default-de": "" + "allowNull": true }, { - "field_name": "useTags", - "humanname-en": "Use User's Tags instead of their Mention in the Leaderboard-Channel-Embed", - "humanname-de": "Nutze den Tag der Nutzer, anstatt eine Erwähnung im Ranglisten-Channel-Embed", - "default": false, - "type": "boolean", - "description-de": "Wenn aktiviert, wird im Ranglisten-Channel-Embed der Tag des Nutzers angezeigt und nicht eine Erwähnung (bei großen Servern empfohlen)", - "description-en": "If enabled, the bot will use the tag of users in the Leaderboard-Channel-Embed instead of their mention." + "name": "useTags", + "humanName": { + "en": "Use User's Tags instead of their Mention in the Leaderboard-Channel-Embed", + "de": "Nutze den Tag der Nutzer, anstatt eine Erwähnung im Ranglisten-Channel-Embed" + }, + "default": { + "en": false + }, + "description": { + "en": "If enabled, the bot will use the tag of users in the Leaderboard-Channel-Embed instead of their mention.", + "de": "Wenn aktiviert, wird im Ranglisten-Channel-Embed der Tag des Nutzers angezeigt und nicht eine Erwähnung (bei großen Servern empfohlen)" + }, + "type": "boolean" }, { - "field_name": "allowCheats", - "humanname-en": "Cheats", - "default": false, - "type": "boolean", - "description-de": "Wenn aktiviert können Administratoren die XP von anderen Nutzern editieren (nicht empfohlen, wenn du einen coolen, fairen Server haben willst (wirklich nicht!!!)))", - "description-en": "If enabled admins can change the XP of other users (not recommended (please leave it of if you want to have a fair levelsystem!!!))", - "humanname-de": "", - "params-de": {}, - "default-de": false + "name": "allowCheats", + "humanName": { + "en": "Cheats" + }, + "default": { + "en": false + }, + "description": { + "en": "If enabled admins can change the XP of other users (not recommended (please leave it of if you want to have a fair levelsystem!!!))", + "de": "Wenn aktiviert können Administratoren die XP von anderen Nutzern editieren (nicht empfohlen, wenn du einen coolen, fairen Server haben willst (wirklich nicht!!!)))" + }, + "type": "boolean" }, { - "field_name": "disableSCNetworkProfile", - "humanname-en": "Disable SC Network Profiles", - "humanname-de": "Deaktiviert SC Network Profile", - "default": false, + "name": "disableSCNetworkProfile", + "humanName": { + "en": "Disable SC Network Profiles", + "de": "Deaktiviert SC Network Profile" + }, + "default": { + "en": false + }, + "description": { + "en": "If enabled admins can change the XP of other users (not recommended (please leave it of if you want to have a fair levelsystem!!!))", + "de": "Wenn aktiviert können Administratoren die XP von anderen Nutzern editieren (nicht empfohlen, wenn du einen coolen, fairen Server haben willst (wirklich nicht!!!)))" + }, "type": "boolean", - "description-de": "Wenn aktiviert können Administratoren die XP von anderen Nutzern editieren (nicht empfohlen, wenn du einen coolen, fairen Server haben willst (wirklich nicht!!!)))", - "description-en": "If enabled admins can change the XP of other users (not recommended (please leave it of if you want to have a fair levelsystem!!!))", - "params-de": {}, - "pro": true, - "default-de": false + "pro": true } ] } \ No newline at end of file diff --git a/modules/levels/configs/random-levelup-messages.json b/modules/levels/configs/random-levelup-messages.json index 7c0494af..84f8bf5e 100644 --- a/modules/levels/configs/random-levelup-messages.json +++ b/modules/levels/configs/random-levelup-messages.json @@ -1,62 +1,71 @@ { + "description": { + "en": "If enabled, the bot will randomly select a message from here", + "de": "Wenn aktiviert, wird der Bot zufällige eine Nachricht von hier auswählen" + }, + "humanName": { + "en": "Random-Level-Up-Messages", + "de": "Zufällige Level-Up-Nachrichten" + }, "filename": "random-levelup-messages.json", - "humanname-de": "Zufällige Level-Up-Nachrichten", - "humanname-en": "Random-Level-Up-Messages", - "description-en": "If enabled, the bot will randomly select a message from here", - "description-de": "Wenn aktiviert, wird der Bot zufällige eine Nachricht von hier auswählen", "configElements": true, "content": [ { - "field_name": "type", - "default": "normal", + "name": "type", + "humanName": { + "de": "Nachrichtentyp" + }, + "default": { + "en": "normal", + "de": "normal" + }, + "description": { + "en": "Type of this message", + "de": "Typ dieser Nachricht" + }, + "type": "select", "content": [ "normal", "with-reward" - ], - "type": "select", - "description": "Type of this message", - "humanname-de": "Nachrichtentyp", - "description-de": "Typ dieser Nachricht", - "params-de": {}, - "default-de": "normal" + ] }, { - "field_name": "message", - "default": "", - "allowEmbed": true, + "name": "message", + "humanName": { + "de": "Nachrichten" + }, + "default": { + "en": "" + }, + "description": { + "en": "Messages which should be send", + "de": "Nachrichten, die gesendet werden sollen" + }, "type": "string", - "description": "Messages which should be send", + "allowEmbed": true, "params": [ { - "name": "%mention%", - "description": "Mention of the user" - }, - { - "name": "%newLevel%", - "description": "New level of the user" - }, - { - "name": "%role%", - "description": "Mention of the role (No ping, only if type = with-reward)" - } - ], - "humanname-de": "Nachrichten", - "description-de": "Nachrichten, die gesendet werden sollen", - "params-de": [ - { - "name": "%mention%", - "description": "Erwähnung des Nutzers" + "name": "mention", + "description": { + "en": "Mention of the user", + "de": "Erwähnung des Nutzers" + } }, { - "name": "%newLevel%", - "description": "Neues Level des Nutzers" + "name": "newLevel", + "description": { + "en": "New level of the user", + "de": "Neues Level des Nutzers" + } }, { - "name": "%role%", - "description": "Erwähnung der Rolle (Kein \"Ping\", nur, wenn Nachrichtentyp = with-reward)" + "name": "role", + "description": { + "en": "Mention of the role (No ping, only if type = with-reward)", + "de": "Erwähnung der Rolle (Kein \"Ping\", nur, wenn Nachrichtentyp = with-reward)" + } } - ], - "default-de": "" + ] } ] -} +} \ No newline at end of file diff --git a/modules/levels/configs/special-levelup-messages.json b/modules/levels/configs/special-levelup-messages.json index c5657414..76c263e4 100644 --- a/modules/levels/configs/special-levelup-messages.json +++ b/modules/levels/configs/special-levelup-messages.json @@ -1,58 +1,66 @@ { + "description": { + "en": "If enabled, the bot will randomly select a message from here", + "de": "Wenn aktiviert, wird der Bot zufällige eine Nachricht von hier auswählen" + }, + "humanName": { + "en": "Selected messages", + "de": "Bestimmte Nachrichten" + }, "filename": "special-levelup-messages.json", - "humanname-de": "Bestimmte Nachrichten", - "humanname-en": "Selected messages", - "description-en": "If enabled, the bot will randomly select a message from here", - "description-de": "Wenn aktiviert, wird der Bot zufällige eine Nachricht von hier auswählen", "configElements": true, "content": [ { - "field_name": "level", - "default": "", - "type": "integer", - "description": "Level at which this messages should get send", - "humanname-de": "Level", - "description-de": "Level, bei welchem diese Nachricht gesendet werden soll", - "params-de": {}, - "default-de": "" + "name": "level", + "humanName": { + "de": "Level" + }, + "default": { + "en": "" + }, + "description": { + "en": "Level at which this messages should get send", + "de": "Level, bei welchem diese Nachricht gesendet werden soll" + }, + "type": "integer" }, { - "field_name": "message", - "default": "", - "allowEmbed": true, + "name": "message", + "humanName": { + "de": "Nachricht" + }, + "default": { + "en": "" + }, + "description": { + "en": "Messages which should be send", + "de": "Nachricht, die gesendet werden soll" + }, "type": "string", - "description": "Messages which should be send", + "allowEmbed": true, "params": [ { - "name": "%mention%", - "description": "Mention of the user" - }, - { - "name": "%newLevel%", - "description": "New level of the user" - }, - { - "name": "%role%", - "description": "Mention of the role (No ping, only if level has reward)" - } - ], - "humanname-de": "Nachricht", - "description-de": "Nachricht, die gesendet werden soll", - "params-de": [ - { - "name": "%mention%", - "description": "Erwähnung des Nutzers" + "name": "mention", + "description": { + "en": "Mention of the user", + "de": "Erwähnung des Nutzers" + } }, { - "name": "%newLevel%", - "description": "Neues Level des Nutzers" + "name": "newLevel", + "description": { + "en": "New level of the user", + "de": "Neues Level des Nutzers" + } }, { - "name": "%role%", - "description": "Erwähnung der Rolle (Kein \"Ping\", nur, wenn das Level eine Belohnung hat)" + "name": "role", + "description": { + "en": "Mention of the role (No ping, only if level has reward)", + "de": "Erwähnung der Rolle (Kein \"Ping\", nur, wenn das Level eine Belohnung hat)" + } } - ], - "default-de": "" + ] } ] -} +} \ No newline at end of file diff --git a/modules/levels/configs/strings.json b/modules/levels/configs/strings.json index 8db567ff..47018cc3 100644 --- a/modules/levels/configs/strings.json +++ b/modules/levels/configs/strings.json @@ -1,228 +1,255 @@ { + "description": { + "en": "Edit the messages and strings of the module here", + "de": "Stelle hier die Nachrichten des Modules ein" + }, + "humanName": { + "en": "Messages", + "de": "Nachrichten" + }, "filename": "strings.json", - "humanname-de": "Nachrichten", - "humanname-en": "Messages", - "description-en": "Edit the messages and strings of the module here", - "description-de": "Stelle hier die Nachrichten des Modules ein", "content": [ { - "field_name": "user_not_found", - "humanname-en": "User not found", - "humanname-de": "Nutzer nicht gefunden", - "default-en": ":warning: We do not have any records of this user", - "default-de": ":warning: Dieser Nutzer hat anscheinend noch keine Nachricht verschickt", + "name": "user_not_found", + "humanName": { + "en": "User not found", + "de": "Nutzer nicht gefunden" + }, + "default": { + "en": ":warning: We do not have any records of this user", + "de": ":warning: Dieser Nutzer hat anscheinend noch keine Nachricht verschickt" + }, + "description": { + "en": "This messages gets send if someone checks a profile of a user when the user never send a message", + "de": "Diese Nachricht wird verschickt, wenn ein eine Person sein Profil sehen will, aber noch kein XP hat" + }, "type": "string", - "allowEmbed": true, - "description-en": "This messages gets send if someone checks a profile of a user when the user never send a message", - "description-de": "Diese Nachricht wird verschickt, wenn ein eine Person sein Profil sehen will, aber noch kein XP hat", - "params-de": {} + "allowEmbed": true }, { - "field_name": "embed", - "type": "keyed", - "description": "Embed which gets send if !profile gets executed", + "name": "embed", + "humanName": { + "de": "Profilembed" + }, "default": { - "title": "%username%'s Profile", - "description": "You can find %username%'s profile here.", - "messages": "Message-Count", - "xp": "XP", - "level": "Level", - "joinedAt": "Joined server", - "color": "GREEN", - "bio": "Bio" + "en": { + "title": "%username%'s Profile", + "description": "You can find %username%'s profile here.", + "messages": "Message-Count", + "xp": "XP", + "level": "Level", + "joinedAt": "Joined server", + "color": "GREEN", + "bio": "Bio" + }, + "de": { + "title": "%username%'s Profil", + "description": "Das Profil von %username% findest du hier.", + "messages": "Nachrichten-Anzahl", + "xp": "XP", + "level": "Level", + "joinedAt": "Server beigetreten", + "color": "GREEN", + "bio": "Bio" + } }, + "description": { + "en": "Embed which gets send if !profile gets executed", + "de": "Embed das gesendet wird, wenn /profile ausgeführt wird" + }, + "type": "keyed", "content": { "key": "string", "value": "string" }, - "disableKeyEdits": true, - "humanname-de": "Profilembed", - "description-de": "Embed das gesendet wird, wenn /profile ausgeführt wird", - "params-de": {}, - "default-de": { - "title": "%username%'s Profil", - "description": "Das Profil von %username% findest du hier.", - "messages": "Nachrichten-Anzahl", - "xp": "XP", - "level": "Level", - "joinedAt": "Server beigetreten", - "color": "GREEN", - "bio": "Bio" - } + "disableKeyEdits": true }, { - "field_name": "leaderboardEmbed", - "type": "keyed", - "description": "This embed gets send if !leaderboard (!lb) gets executed", + "name": "leaderboardEmbed", + "humanName": { + "de": "Ranglisten-Embed" + }, "default": { - "title": "Leaderboard", - "description": "You can find the level of every user here", - "and_x_more_people": "And %count% other members", - "more_level": "More Levels", - "x_levels_are_not_shown": "And **%count% Level** are not being displayed", - "your_level": "Your Level", - "you_are_level_x_with_x_xp": "You are currently on **Level %level%** with **%xp% XP**. See more with `/profile`.", - "joinedAt": "Joined server", - "color": "GREEN" + "en": { + "title": "Leaderboard", + "description": "You can find the level of every user here", + "and_x_more_people": "And %count% other members", + "more_level": "More Levels", + "x_levels_are_not_shown": "And **%count% Level** are not being displayed", + "your_level": "Your Level", + "you_are_level_x_with_x_xp": "You are currently on **Level %level%** with **%xp% XP**. See more with `/profile`.", + "joinedAt": "Joined server", + "color": "GREEN" + }, + "de": { + "title": "Rangliste", + "description": "Hier findest du das Level von jedem Nutzer", + "and_x_more_people": "Und %count% andere Mitglieder", + "more_level": "Mehr Level", + "x_levels_are_not_shown": "Und **%count% Level** werden nicht angezeigt", + "your_level": "Dein Level", + "you_are_level_x_with_x_xp": "Du bist aktuell auf **Level %level%** mit **%xp% XP**. Siehe mehr mit `/profile`.", + "joinedAt": "Server beigetreten", + "color": "GREEN" + } + }, + "description": { + "en": "This embed gets send if !leaderboard (!lb) gets executed", + "de": "Dieses Embed wird gesendet, wenn /leaderboard (/lb) ausgeführt wird" }, + "type": "keyed", "content": { "key": "string", "value": "string" }, - "disableKeyEdits": true, - "humanname-de": "Ranglisten-Embed", - "description-de": "Dieses Embed wird gesendet, wenn /leaderboard (/lb) ausgeführt wird", - "params-de": {}, - "default-de": { - "title": "Rangliste", - "description": "Hier findest du das Level von jedem Nutzer", - "and_x_more_people": "Und %count% andere Mitglieder", - "more_level": "Mehr Level", - "x_levels_are_not_shown": "Und **%count% Level** werden nicht angezeigt", - "your_level": "Dein Level", - "you_are_level_x_with_x_xp": "Du bist aktuell auf **Level %level%** mit **%xp% XP**. Siehe mehr mit `/profile`.", - "joinedAt": "Server beigetreten", - "color": "GREEN" - } + "disableKeyEdits": true }, { - "field_name": "level_up_message", - "default": "Level Up! Your new level is **%newLevel%**!", + "name": "level_up_message", + "humanName": { + "de": "Level-Up-Nachricht" + }, + "default": { + "en": "Level Up! Your new level is **%newLevel%**!", + "de": "Level Up! Dein neues Level ist jetzt %newLevel%" + }, + "description": { + "en": "This messages gets send if a user levels up (gets overwritten if randomMessages is enabled)", + "de": "Diese Nachricht wird gesendet, wenn ein Nutzer ein Level aufsteigt (Wird überschrieben, wenn \"Zufällige Nachrichten\" aktiviert ist)" + }, "type": "string", "allowEmbed": true, - "description": "This messages gets send if a user levels up (gets overwritten if randomMessages is enabled)", "params": [ { - "name": "%mention%", - "description": "Mention of the user" + "name": "mention", + "description": { + "en": "Mention of the user", + "de": "Erwähnung des Nutzers" + } }, { - "name": "%newLevel%", - "description": "New level of the user" + "name": "newLevel", + "description": { + "en": "New level of the user", + "de": "Neues Level des Nutzers" + } } - ], - "humanname-de": "Level-Up-Nachricht", - "description-de": "Diese Nachricht wird gesendet, wenn ein Nutzer ein Level aufsteigt (Wird überschrieben, wenn \"Zufällige Nachrichten\" aktiviert ist)", - "params-de": [ - { - "name": "%mention%", - "description": "Erwähnung des Nutzers" - }, - { - "name": "%newLevel%", - "description": "Neues Level des Nutzers" - } - ], - "default-de": "Level Up! Dein neues Level ist jetzt %newLevel%" + ] }, { - "field_name": "level_up_message_with_reward", - "default": "Level Up! Your new level is **%newLevel%**! You received %role%.", + "name": "level_up_message_with_reward", + "humanName": { + "de": "Level-Up-Nachricht mit Belohnung" + }, + "default": { + "en": "Level Up! Your new level is **%newLevel%**! You received %role%.", + "de": "Level Up! Dein neues Level ist **%newLevel%**! Du erhältst %role%." + }, + "description": { + "en": "This messages gets send if a user levels up and gets a role (gets overwritten if randomMessages is enabled)", + "de": "Diese Nachricht wird gesendet, wenn ein Nutzer ein Level aufsteigt und eine Rolle erhält (Wird überschrieben, wenn \"Zufällige Nachrichten\" aktiviert ist)" + }, "type": "string", "allowEmbed": true, - "description": "This messages gets send if a user levels up and gets a role (gets overwritten if randomMessages is enabled)", "params": [ { - "name": "%mention%", - "description": "Mention of the user" - }, - { - "name": "%newLevel%", - "description": "New level of the user" - }, - { - "name": "%role%", - "description": "Mention of the role (No ping)" - } - ], - "humanname-de": "Level-Up-Nachricht mit Belohnung", - "description-de": "Diese Nachricht wird gesendet, wenn ein Nutzer ein Level aufsteigt und eine Rolle erhält (Wird überschrieben, wenn \"Zufällige Nachrichten\" aktiviert ist)", - "params-de": [ - { - "name": "%mention%", - "description": "Erwähnung des Nutzers" + "name": "mention", + "description": { + "en": "Mention of the user", + "de": "Erwähnung des Nutzers" + } }, { - "name": "%newLevel%", - "description": "Neues Level des Nutzers" + "name": "newLevel", + "description": { + "en": "New level of the user", + "de": "Neues Level des Nutzers" + } }, { - "name": "%role%", - "description": "Erwähnung der Rolle (Ohne \"Ping\")" + "name": "role", + "description": { + "en": "Mention of the role (No ping)", + "de": "Erwähnung der Rolle (Ohne \"Ping\")" + } } - ], - "default-de": "Level Up! Dein neues Level ist **%newLevel%**! Du erhältst %role%." + ] }, { - "field_name": "liveLeaderBoardEmbed", - "type": "keyed", - "description": "Embed which gets send to the leaderboard-channel and gets updated", + "name": "liveLeaderBoardEmbed", + "humanName": { + "de": "Echtzeit-Rangliste" + }, "default": { - "title": "Live Leaderboard", - "description": "Find all the users levels here. Updated every five minutes.", - "color": "GREEN", - "button": "👤 Show my level" + "en": { + "title": "Live Leaderboard", + "description": "Find all the users levels here. Updated every five minutes.", + "color": "GREEN", + "button": "👤 Show my level" + }, + "de": { + "title": "Echtzeit-Rangliste", + "description": "Hier findest du das Level von jedem Nutzer. Diese Liste wird alle fünf Minuten aktualisiert.", + "color": "GREEN", + "button": "👤 Mein Level anzeigen" + } + }, + "description": { + "en": "Embed which gets send to the leaderboard-channel and gets updated", + "de": "Embed, welches in den Ranglisten-Kanal gesendet und danach geupdated wird" }, + "type": "keyed", "content": { "key": "string", "value": "string" }, - "disableKeyEdits": true, - "humanname-de": "Echtzeit-Rangliste", - "description-de": "Embed, welches in den Ranglisten-Kanal gesendet und danach geupdated wird", - "params-de": {}, - "default-de": { - "title": "Echtzeit-Rangliste", - "description": "Hier findest du das Level von jedem Nutzer. Diese Liste wird alle fünf Minuten aktualisiert.", - "color": "GREEN", - "button": "👤 Mein Level anzeigen" - } + "disableKeyEdits": true }, { - "field_name": "leaderboard-button-answer", - "default-en": "Hi, %name%, you are currently on **level %level%** with **%userXP%**/%nextLevelXP% **XP**. Learn more with `/profile`.", - "default-de": "Hi, %name%, du bist aktuell auf **Level %level%** mit **%userXP%**/%nextLevelXP% **Erfahrungspunkten**. Erfahre mehr mit `/profile`.", + "name": "leaderboard-button-answer", + "humanName": { + "de": "Nachricht bei Klick auf den Knopf unter dem Live-Leaderboard" + }, + "default": { + "en": "Hi, %name%, you are currently on **level %level%** with **%userXP%**/%nextLevelXP% **XP**. Learn more with `/profile`.", + "de": "Hi, %name%, du bist aktuell auf **Level %level%** mit **%userXP%**/%nextLevelXP% **Erfahrungspunkten**. Erfahre mehr mit `/profile`." + }, + "description": { + "en": "This messages gets send if a user clicks on the button below the live-leaderboard", + "de": "Diese Nachricht wird gesendet, wenn ein Nutzer den Knopf unter dem Live-Embed drückt" + }, "type": "string", "allowEmbed": true, - "description": "This messages gets send if a user clicks on the button below the live-leaderboard", "params": [ { - "name": "%name%", - "description": "Username of the user" - }, - { - "name": "%level%", - "description": "Level of the user" - }, - { - "name": "%userXP%", - "description": "XP of the user" - }, - { - "name": "%nextLevelXP%", - "description": "XP of the next level" - } - ], - "humanname-de": "Nachricht bei Klick auf den Knopf unter dem Live-Leaderboard", - "description-de": "Diese Nachricht wird gesendet, wenn ein Nutzer den Knopf unter dem Live-Embed drückt", - "params-de": [ - { - "name": "%name%", - "description": "Username des Nutzers" + "name": "name", + "description": { + "en": "Username of the user", + "de": "Username des Nutzers" + } }, { - "name": "%level%", - "description": "Level des Nutzers" + "name": "level", + "description": { + "en": "Level of the user", + "de": "Level des Nutzers" + } }, { - "name": "%userXP%", - "description": "XP des Nutzers" + "name": "userXP", + "description": { + "en": "XP of the user", + "de": "XP des Nutzers" + } }, { - "name": "%nextLevelXP%", - "description": "Benötigtes XP zum nächsten Level" + "name": "nextLevelXP", + "description": { + "en": "XP of the next level", + "de": "Benötigtes XP zum nächsten Level" + } } ] } ] -} \ No newline at end of file +} diff --git a/modules/levels/module.json b/modules/levels/module.json index 0013568f..f4d31653 100644 --- a/modules/levels/module.json +++ b/modules/levels/module.json @@ -1,13 +1,14 @@ { "name": "levels", - "humanReadableName": "Level-System", + "humanReadableName": { + "en": "Level-System" + }, "author": { "scnxOrgID": "1", - "name": "SCDerox (SC Network Team)", "link": "https://github.com/SCDerox" + "name": "SCDerox (SC Network Team)", + "link": "https://github.com/SCDerox" }, "openSourceURL": "https://github.com/SCNetwork/CustomDCBot/tree/main/modules/levels", - "description-en": "Easy to use levelsystem with a lot of customization!", - "description-de": "Einfaches Level-System mit vielen Anpassungsmöglichkeiten!", "commands-dir": "/commands", "events-dir": "/events", "models-dir": "/models", @@ -18,5 +19,11 @@ "configs/special-levelup-messages.json" ], "fa-icon": "far fa-comments", - "tags": ["community"] -} \ No newline at end of file + "tags": [ + "community" + ], + "description": { + "en": "Easy to use levelsystem with a lot of customization!", + "de": "Einfaches Level-System mit vielen Anpassungsmöglichkeiten!" + } +} diff --git a/modules/massrole/configs/strings.json b/modules/massrole/configs/strings.json index 9e07b08c..ade50df3 100644 --- a/modules/massrole/configs/strings.json +++ b/modules/massrole/configs/strings.json @@ -1,37 +1,47 @@ { + "description": { + "en": "Edit the messages and strings of the module here", + "de": "Stelle hier die Nachrichten des Modules ein" + }, + "humanName": { + "en": "Messages", + "de": "Nachrichten" + }, "filename": "strings.json", - "humanname-de": "Nachrichten", - "humanname-en": "Messages", - "description-en": "Edit the messages and strings of the module here", - "description-de": "Stelle hier die Nachrichten des Modules ein", "content": [ { - "field_name": "done", - "humanname-en": "Action executed", - "humanname-de": "Aktion ausgeführt", - "default-en": "The action was executed successfully.", - "default-de": "Die Aktion wurde erfolgreich ausgeführt.", + "name": "done", + "humanName": { + "en": "Action executed", + "de": "Aktion ausgeführt" + }, + "default": { + "en": "The action was executed successfully.", + "de": "Die Aktion wurde erfolgreich ausgeführt." + }, + "description": { + "en": "This messages gets send when a action was executed successfully", + "de": "Diese Nachricht wird verschickt, wenn eine Akton erfolgreich ausgeführt wurde" + }, "type": "string", - "allowEmbed": true, - "description-en": "This messages gets send when a action was executed successfully", - "description-de": "Diese Nachricht wird verschickt, wenn eine Akton erfolgreich ausgeführt wurde", - "params-de": { - - } + "allowEmbed": true }, { - "field_name": "notDone", - "humanname-en": "Action not executed", - "humanname-de": "Aktion nicht ausgeführt", - "default-en": "The Action couldn't be executed because the bot has not enough permissions.", - "default-de": "Die Aktion konnte nicht vollständig ausgeführt werden, da der Bot nicht genug Rechte hat.", + "name": "notDone", + "humanName": { + "en": "Action not executed", + "de": "Aktion nicht ausgeführt" + }, + "default": { + "en": "The Action couldn't be executed because the bot has not enough permissions.", + "de": "Die Aktion konnte nicht vollständig ausgeführt werden, da der Bot nicht genug Rechte hat." + }, + "description": { + "en": "This messages gets send when a action was not executed successfully", + "de": "Diese Nachricht wird verschickt, wenn eine Aktion nicht erfolgreich ausgeführt wurde" + }, "type": "string", - "allowEmbed": true, - "description-en": "This messages gets send when a action was not executed successfully", - "description-de": "Diese Nachricht wird verschickt, wenn eine Aktion nicht erfolgreich ausgeführt wurde", - "params-de": { - - } + "allowEmbed": true } ] -} \ No newline at end of file +} diff --git a/modules/massrole/module.json b/modules/massrole/module.json index 5ed70808..6e252f09 100644 --- a/modules/massrole/module.json +++ b/modules/massrole/module.json @@ -1,18 +1,24 @@ { "name": "massrole", - "humanReadableName": "Massrole", + "humanReadableName": { + "en": "Massrole" + }, "author": { "name": "hfgd", "link": "https://github.com/hfgd123", "scnxOrgID": "2" }, "openSourceURL": "https://github.com/hfgd123/CustomDCBot/tree/main/modules/massrole", - "description-en": "Simple module to manage the roles of many members at once!", - "description-de": "Einfaches Modul, um die Rollen vieler Nutzer gleichzeitig zu verwalten!", "commands-dir": "/commands", "fa-icon": "fa-solid fa-users-viewfinder", "config-example-files": [ "configs/strings.json" ], - "tags": ["administration"] -} \ No newline at end of file + "tags": [ + "administration" + ], + "description": { + "en": "Simple module to manage the roles of many members at once!", + "de": "Einfaches Modul, um die Rollen vieler Nutzer gleichzeitig zu verwalten!" + } +} diff --git a/modules/moderation/configs/antiJoinRaid.json b/modules/moderation/configs/antiJoinRaid.json index 3366bcf1..985e368b 100644 --- a/modules/moderation/configs/antiJoinRaid.json +++ b/modules/moderation/configs/antiJoinRaid.json @@ -1,39 +1,77 @@ { + "description": { + "en": "This system can prevent spammers from raiding your server", + "de": "Dieses System kann es Spammern verhindern, deinen Server zu raiden" + }, + "humanName": { + "en": "Anti-Join-Raid-Configuration", + "de": "Anti-Join-Raid-Konfiguration" + }, "filename": "antiJoinRaid.json", "content": [ { - "field_name": "enabled", - "default": true, + "name": "enabled", + "humanName": { + "de": "Aktiviert", + "en": "Enabled?" + }, + "default": { + "en": true, + "de": true + }, + "description": { + "en": "Enables or disables the anti-join-raid-system", + "de": "Aktiviert oder deaktiviert das Anti-Join-Raid-System" + }, "type": "boolean", - "description": "Enables or disables the anti-join-raid-system", - "humanname-de": "Aktiviert", - "description-de": "Aktiviert oder deaktiviert das Anti-Join-Raid-System", - "params-de": {}, - "default-de": true, "elementToggle": true }, { - "field_name": "timeframe", - "default": 5, - "type": "integer", - "description": "Timeframe in which join actions should be recorded (in minutes)", - "humanname-de": "Zeitfenster", - "description-de": "Zeitfenster, in welchem Serverbeitritte gezählt werden sollen (in Minuten)", - "params-de": {}, - "default-de": 5 + "name": "timeframe", + "humanName": { + "de": "Zeitfenster", + "en": "Timeframe" + }, + "default": { + "en": 5, + "de": 5 + }, + "description": { + "en": "Timeframe in which join actions should be recorded (in minutes)", + "de": "Zeitfenster, in welchem Serverbeitritte gezählt werden sollen (in Minuten)" + }, + "type": "integer" }, { - "field_name": "maxJoinsInTimeframe", - "default": 3, - "type": "integer", - "description": "Count of joins that are allowed to happen in the selected timeframe", - "humanname-de": "Maximale Beitrittsanzahl", - "description-de": "Anzahl an Serverbeitritten, die im ausgewählten Zeitfenster zugelassen werden", - "params-de": {}, - "default-de": 3 + "name": "maxJoinsInTimeframe", + "humanName": { + "de": "Maximale Beitrittsanzahl", + "en": "Maximal count of new users" + }, + "default": { + "en": 3, + "de": 3 + }, + "description": { + "en": "Count of joins that are allowed to happen in the selected timeframe", + "de": "Anzahl an Serverbeitritten, die im ausgewählten Zeitfenster zugelassen werden" + }, + "type": "integer" }, { - "field_name": "action", + "name": "action", + "humanName": { + "de": "Aktion", + "en": "Action" + }, + "default": { + "en": "quarantine", + "de": "quarantine" + }, + "description": { + "en": "Select the action here that should get performed if the anti-join-system gets triggered", + "de": "Wähle hier die Aktion aus, die ausgeführt werden soll, wenn das Anti-Join-Raid-System ausgelöst wird" + }, "type": "select", "content": [ "mute", @@ -41,33 +79,38 @@ "quarantine", "ban", "give-role" - ], - "default": "quarantine", - "description": "Select the action here that should get performed if the anti-join-system gets triggered", - "humanname-de": "Aktion", - "description-de": "Wähle hier die Aktion aus, die ausgeführt werden soll, wenn das Anti-Join-Raid-System ausgelöst wird", - "params-de": {}, - "default-de": "quarantine" + ] }, { - "field_name": "roleID", - "type": "roleID", - "description": "Only if action = give-role. Role that gets given to users who trigger the antiJoinRaid-System", - "default": "", - "humanname-de": "Rolle", - "description-de": "Nur verfügbar, wenn Aktion = give-role. Rolle, die Nutzern gegeben wird, die das Anti-Join-Raid-System auslösen", - "params-de": {}, - "default-de": "" + "name": "roleID", + "humanName": { + "de": "Rolle", + "en": "Role" + }, + "default": { + "en": "" + }, + "description": { + "en": "Only if action = give-role. Role that gets given to users who trigger the antiJoinRaid-System", + "de": "Nur verfügbar, wenn Aktion = give-role. Rolle, die Nutzern gegeben wird, die das Anti-Join-Raid-System auslösen" + }, + "type": "roleID" }, { - "field_name": "removeOtherRoles", - "type": "boolean", - "description": "Only if action = give-role. If enabled other roles that have been give to the user get removed after a short interval (and the giving of the role from \"roleID\" will be delayed)", - "default": true, - "humanname-de": "Andere Rollen entfernen", - "description-de": "Nur verfügbar, wenn Aktion = give-role. Wenn aktiviert, werden andere Rollen die der Nutzer hat nach einem kurzen Zeitraum entfernt (und das Vergeben der Rolle von \"Rolle\" wird verzögert)", - "params-de": {}, - "default-de": true + "name": "removeOtherRoles", + "humanName": { + "de": "Andere Rollen entfernen", + "en": "Remove other roles" + }, + "default": { + "en": true, + "de": true + }, + "description": { + "en": "Only if action = give-role. If enabled other roles that have been give to the user get removed after a short interval (and the giving of the role from \"roleID\" will be delayed)", + "de": "Nur verfügbar, wenn Aktion = give-role. Wenn aktiviert, werden andere Rollen die der Nutzer hat nach einem kurzen Zeitraum entfernt (und das Vergeben der Rolle von \"Rolle\" wird verzögert)" + }, + "type": "boolean" } ] } \ No newline at end of file diff --git a/modules/moderation/configs/antiSpam.json b/modules/moderation/configs/antiSpam.json index e93d6c8e..81a3189d 100644 --- a/modules/moderation/configs/antiSpam.json +++ b/modules/moderation/configs/antiSpam.json @@ -1,69 +1,125 @@ { + "description": { + "en": "You can configure here, how your bot should react to spam", + "de": "Du kannst hier einstellen, wie dein Bot auf Spam reagieren soll" + }, + "humanName": { + "en": "Anti-Spam-Configuration", + "de": "Anti-Spam-Konfiguration" + }, "filename": "antiSpam.json", "content": [ { - "field_name": "enabled", + "name": "enabled", + "humanName": { + "de": "Aktiviert", + "en": "Enabled?" + }, + "default": { + "en": true, + "de": true + }, + "description": { + "en": "Enable or disable the anti spam system", + "de": "Aktiviert oder deaktiviert das Anti-Spam-System" + }, "type": "boolean", - "default": true, - "description": "Enable or disable the anti spam system", - "humanname-de": "Aktiviert", - "description-de": "Aktiviert oder deaktiviert das Anti-Spam-System", - "params-de": {}, - "default-de": true, "elementToggle": true }, { - "field_name": "timeframe", - "type": "integer", - "default": 5, - "description": "Timeframe after which message objects get deleted (and can not longer be used to detect spam)", - "humanname-de": "Zeitfenster", - "description-de": "Zeitfenster, in dem Nachrichten gelöscht werden (und nicht länger zur Erkennung von Spam verwendet werden können)", - "params-de": {}, - "default-de": 5 + "name": "timeframe", + "humanName": { + "de": "Zeitfenster", + "en": "Timeframe" + }, + "default": { + "en": 5, + "de": 5 + }, + "description": { + "en": "Timeframe after which message objects get deleted (and can not longer be used to detect spam)", + "de": "Zeitfenster, in dem Nachrichten gelöscht werden (und nicht länger zur Erkennung von Spam verwendet werden können)" + }, + "type": "integer" }, { - "field_name": "maxMessagesInTimeframe", - "type": "integer", - "default": 10, - "description": "Count of messages that are allowed to be sent in the selected timeframe", - "humanname-de": "Maximale Nachrichten im Zeitfenster", - "description-de": "Anzahl an Nachrichten, die im ausgewählten Zeitfenster erlaubt sind", - "params-de": {}, - "default-de": 10 + "name": "maxMessagesInTimeframe", + "humanName": { + "de": "Maximale Nachrichten im Zeitfenster", + "en": "Maximal count of messages in timeframe" + }, + "default": { + "en": 10, + "de": 10 + }, + "description": { + "en": "Count of messages that are allowed to be sent in the selected timeframe", + "de": "Anzahl an Nachrichten, die im ausgewählten Zeitfenster erlaubt sind" + }, + "type": "integer" }, { - "field_name": "maxDuplicatedMessagesInTimeframe", - "type": "integer", - "default": 5, - "description": "Count of identical messages that are allowed to be sent in the selected timeframe", - "humanname-de": "Maximale gleiche Nachrichten im Zeitfenster", - "description-de": "Anzahl an gleichen Nachrichten, die im ausgewählten Zeitfenster erlaubt sind", - "params-de": {}, - "default-de": 5 + "name": "maxDuplicatedMessagesInTimeframe", + "humanName": { + "de": "Maximale gleiche Nachrichten im Zeitfenster", + "en": "Maximal count of duplicated messages in timeframe" + }, + "default": { + "en": 5, + "de": 5 + }, + "description": { + "en": "Count of identical messages that are allowed to be sent in the selected timeframe", + "de": "Anzahl an gleichen Nachrichten, die im ausgewählten Zeitfenster erlaubt sind" + }, + "type": "integer" }, { - "field_name": "maxPingsInTimeframe", - "type": "integer", - "default": 4, - "description": "Count of pings (also counts replies) that are allowed to be sent in the selected timeframe", - "humanname-de": "Maximale Pings im Zeitfenster", - "description-de": "Anzahl an Erwähnungen (zählt auch Antworten), die im ausgewählten Zeitfenster erlaubt sind", - "params-de": {}, - "default-de": 4 + "name": "maxPingsInTimeframe", + "humanName": { + "de": "Maximale Pings im Zeitfenster", + "en": "Maximal count of pings in timeframe" + }, + "default": { + "en": 4, + "de": 4 + }, + "description": { + "en": "Count of pings (also counts replies) that are allowed to be sent in the selected timeframe", + "de": "Anzahl an Erwähnungen (zählt auch Antworten), die im ausgewählten Zeitfenster erlaubt sind" + }, + "type": "integer" }, { - "field_name": "maxMassPings", - "type": "integer", - "default": 3, - "description": "Count of mass pings (= @everyone, @here and roles) that are allowed to be sent in the selected timeframe", - "humanname-de": "Maximale Massenpings im Zeitfenster", - "description-de": "Anzahl an Massenerwähnungen (= @everyone, @here und Rollen), die im ausgewählten Zeitfenster erlaubt sind", - "params-de": {}, - "default-de": 3 + "name": "maxMassPings", + "humanName": { + "de": "Maximale Massenpings im Zeitfenster", + "en": "Maximal count of mass-pings in timeframe" + }, + "default": { + "en": 3, + "de": 3 + }, + "description": { + "en": "Count of mass pings (= @everyone, @here and roles) that are allowed to be sent in the selected timeframe", + "de": "Anzahl an Massenerwähnungen (= @everyone, @here und Rollen), die im ausgewählten Zeitfenster erlaubt sind" + }, + "type": "integer" }, { - "field_name": "action", + "name": "action", + "humanName": { + "de": "Aktion", + "en": "Action" + }, + "default": { + "en": "mute", + "de": "mute" + }, + "description": { + "en": "Select what should happen if someone spams", + "de": "Wähle hier die Aktion aus, die ausgeführt werden soll, wenn jemand spammt" + }, "type": "select", "content": [ "mute", @@ -71,74 +127,91 @@ "kick", "quarantine", "ban" - ], - "default": "mute", - "description": "Select what should happen if someone spams", - "humanname-de": "Aktion", - "description-de": "Wähle hier die Aktion aus, die ausgeführt werden soll, wenn jemand spammt", - "params-de": {}, - "default-de": "mute" + ] }, { - "field_name": "sendChatMessage", - "type": "boolean", - "default": true, - "description": "If enabled the bot will send a chat message if it has to take action agains a bot", - "humanname-de": "Chatnachricht senden", - "description-de": "Wenn aktiviert, wird der Bot eine Nachricht in den Chat senden, wenn er eine Aktion gegen einen Bot ausführen musste", - "params-de": {}, - "default-de": true + "name": "sendChatMessage", + "humanName": { + "de": "Chatnachricht senden", + "en": "Send Chat-Message" + }, + "default": { + "en": true, + "de": true + }, + "description": { + "en": "If enabled the bot will send a chat message if it has to take action agains a bot", + "de": "Wenn aktiviert, wird der Bot eine Nachricht in den Chat senden, wenn er eine Aktion gegen einen Bot ausführen musste" + }, + "type": "boolean" }, { - "field_name": "message", + "name": "message", + "dependsOn": "sendChatMessage", + "humanName": { + "de": "Nachricht", + "en": "Message" + }, + "default": { + "en": "Anti-Spam: I took action against <@%userid%> because of **%reason%**", + "de": "Anti-Spam: Ich habe wegen **%reason%** eine Aktion gegen <@%userid%> ausgeführt" + }, + "description": { + "en": "This will get send in the channel the spam is occurring in when anti-spam gets triggered", + "de": "Das wird in den Kanal gesendet, wenn das Anti-Spam-System ausgelöst wird" + }, "type": "string", "allowEmbed": true, - "default": "Anti-Spam: I took action against <@%userid%> because of **%reason%**", "params": [ { - "name": "%userid%", - "description": "ID of the user" - }, - { - "name": "%reason%", - "description": "Reason of the action" - } - ], - "humanname-de": "Nachricht", - "description-de": "", - "params-de": [ - { - "name": "%userid%", - "description": "ID des Nutzers" + "name": "userid", + "description": { + "en": "ID of the user", + "de": "ID des Nutzers" + } }, { - "name": "%reason%", - "description": "Grund der Aktion" + "name": "reason", + "description": { + "en": "Reason of the action", + "de": "Grund der Aktion" + } } - ], - "default-de": "Anti-Spam: Ich habe wegen **%reason%** eine Aktion gegen <@%userid%> ausgeführt" + ] }, { - "field_name": "ignoredChannels", + "name": "ignoredChannels", + "humanName": { + "de": "Ignorierte Kanäle", + "en": "Whitelisted Channels" + }, + "default": { + "en": [], + "de": [] + }, + "description": { + "en": "You can set channels that get ignored here", + "de": "Du kannst hier Kanäle einstellen, die ignoriert werden sollen" + }, "type": "array", - "content": "channelID", - "default": [], - "description": "You can set channels that get ignored here", - "humanname-de": "Ignorierte Kanäle", - "description-de": "Du kannst hier Kanäle einstellen, die ignoriert werden sollen", - "params-de": {}, - "default-de": [] + "content": "channelID" }, { - "field_name": "ignoredRoles", + "name": "ignoredRoles", + "humanName": { + "de": "Ignorierte Rollen", + "en": "Whitelisted roles" + }, + "default": { + "en": [], + "de": [] + }, + "description": { + "en": "You can set roles that get ignored here", + "de": "Du kannst hier Rollen einstellen, die ignoriert werden sollen" + }, "type": "array", - "content": "roleID", - "default": [], - "description": "You can set roles that get ignored here", - "humanname-de": "Ignorierte Rollen", - "description-de": "Du kannst hier Rollen einstellen, die ignoriert werden sollen", - "params-de": {}, - "default-de": [] + "content": "roleID" } ] } \ No newline at end of file diff --git a/modules/moderation/configs/config.json b/modules/moderation/configs/config.json index bf129bb7..908a0a55 100644 --- a/modules/moderation/configs/config.json +++ b/modules/moderation/configs/config.json @@ -1,4 +1,12 @@ { + "description": { + "en": "You can set up permissions and features of this module here", + "de": "Du kannst hier die Rechte dieses Modules einstellen" + }, + "humanName": { + "en": "Configuration", + "de": "Konfiguration" + }, "filename": "config.json", "commandsWarnings": { "special": [ @@ -13,110 +21,178 @@ }, "content": [ { - "field_name": "logchannel-id", - "default": "", - "type": "channelID", - "description": "Channel-ID of the log channel", - "humanname-de": "Log-Kanal", - "description-de": "Kanal-ID des Log-Kanals", - "params-de": {}, - "default-de": "" + "name": "logchannel-id", + "humanName": { + "de": "Log-Kanal", + "en": "Log-Channel" + }, + "default": { + "en": "" + }, + "description": { + "en": "Moderative actions will get logged in this channel", + "de": "Moderative Aktionen werden in diesem Kanal geloggt" + }, + "type": "channelID" }, { - "field_name": "quarantine-role-id", - "default": "", - "type": "roleID", - "description": "ID of the quarantine role", - "humanname-de": "Quarantäne-Rolle", - "description-de": "ID der Quarantäne-Rolle", - "params-de": {}, - "default-de": "" + "name": "quarantine-role-id", + "humanName": { + "de": "Quarantäne-Rolle", + "en": "Quarantine-Role" + }, + "default": { + "en": "" + }, + "description": { + "en": "When a user gets quarantined, all of their roles will get removed and this quarantine-role wil get assigned", + "de": "Wenn ein Nutzer in Quarantäne gesteckt wird, werden alle Rollen von diesem entfernt und nur diese hinzugefügt" + }, + "type": "roleID" }, { - "field_name": "report-channel-id", - "default": "", + "name": "report-channel-id", + "default": { + "en": "" + }, + "humanName": { + "en": "Report-Channel", + "de": "Report-Kanal" + }, + "description": { + "en": "Channel in which user-reports should get send. (optional, default: Log-Channel)", + "de": "Kanal, in welchem Nutzer-Reports should get send. (optional, default: Log-Kanal)" + }, "type": "channelID", - "allowNull": true, - "description": "Channel-ID of channel in which reports should get send. (optional, default: logchannel-id)" + "allowNull": true }, { - "field_name": "remove-all-roles-on-quarantine", - "default": true, - "type": "boolean", - "description": "If enabled all roles from a user get removed if they get quarantined (they get saved an can be restored with !unquarantine)", - "humanname-de": "Entferne alle Rollen bei Quarantäne", - "description-de": "Wenn diese Option aktiviert ist, werden alle Rollen eines Nutzers entfernt, wenn er in Quarantäne gesetzt wird (sie werden gespeichert und mit /unquarantine wiederhergestellt)", - "params-de": {}, - "default-de": true + "name": "remove-all-roles-on-quarantine", + "humanName": { + "de": "Bei Quarantäne alle Rollen entfernen", + "en": "Remove all roles on quarantine" + }, + "default": { + "en": true, + "de": true + }, + "description": { + "en": "If enabled all roles from a user get removed if they get quarantined (they get saved an can be restored with /unquarantine)", + "de": "Wenn diese Option aktiviert ist, werden alle Rollen eines Nutzers entfernt, wenn er in Quarantäne gesetzt wird (sie werden gespeichert und mit /unquarantine wiederhergestellt)" + }, + "type": "boolean" }, { - "field_name": "moderator-roles_level1", - "default": [], + "name": "moderator-roles_level1", + "humanName": { + "en": "Moderator-Level 1" + }, + "default": { + "en": [], + "de": [] + }, + "description": { + "en": "Moderator roles that can perform the following actions: Warn", + "de": "Rollen, die folgende Aktionen ausführen können: Warn" + }, "type": "array", - "content": "roleID", - "description": "ID of moderator roles that can perform the following actions: Warn", - "humanname-de": "Moderator-Level 1", - "description-de": "ID der Rollen, die folgende Aktionen ausführen können: Warn", - "params-de": {}, - "default-de": [] + "content": "roleID" }, { - "field_name": "moderator-roles_level2", - "default": [], + "name": "moderator-roles_level2", + "humanName": { + "en": "Moderator-Level 1" + }, + "default": { + "en": [], + "de": [] + }, + "description": { + "en": "Moderator roles that can perform the following actions: Warn, Mute, Unmute, Lock, Unlock, Channelmute, Remove-Channel-Mute", + "de": "Rollen, die folgende Aktionen ausführen können: Warn, Mute, Unmute, Channelmute, Channel-Mute entfernen" + }, "type": "array", - "content": "roleID", - "description": "ID of moderator roles that can perform the following actions: Warn, Mute, Unmute", - "humanname-de": "Moderator-Level 2", - "description-de": "ID der Rollen, die folgende Aktionen ausführen können: Warn, Mute, Unmute", - "params-de": {}, - "default-de": [] + "content": "roleID" }, { - "field_name": "moderator-roles_level3", - "default": [], + "name": "moderator-roles_level3", + "humanName": { + "en": "Moderator-Level 3" + }, + "default": { + "en": [], + "de": [] + }, + "description": { + "en": "Moderator roles that can perform the following actions: Warn, Mute, Unmute, Kick, Clear", + "de": "Rollen, die folgende Aktionen ausführen können: Warn, Mute, Unmute, Kick, Clear" + }, "type": "array", - "content": "roleID", - "description": "ID of moderator roles that can perform the following actions: Warn, Mute, Unmute, Kick, Clear", - "humanname-de": "Moderator-Level 3", - "description-de": "ID der Rollen, die folgende Aktionen ausführen können: Warn, Mute, Unmute, Kick, Clear", - "params-de": {}, - "default-de": [] + "content": "roleID" }, { - "field_name": "moderator-roles_level4", - "default": [], + "name": "moderator-roles_level4", + "humanName": { + "en": "Moderator-Level 4" + }, + "default": { + "en": [], + "de": [] + }, + "description": { + "en": "Moderator roles that can perform the following actions: Warn, Mute, Unmute, Kick, Clear, Ban, Unban", + "de": "Rollen, die folgende Aktionen ausführen können: Warn, Mute, Unmute, Kick, Clear, Ban, Unban" + }, "type": "array", - "content": "roleID", - "description": "ID of moderator roles that can perform the following actions: Warn, Mute, Unmute, Kick, Clear, Ban, Unban", - "humanname-de": "Moderator-Level 4", - "description-de": "ID der Rollen, die folgende Aktionen ausführen können: Warn, Mute, Unmute, Kick, Clear, Ban, Unban", - "params-de": {}, - "default-de": [] + "content": "roleID" }, { - "field_name": "roles-to-ping-on-report", - "default": [], + "name": "roles-to-ping-on-report", + "humanName": { + "de": "Rollenpings bei Report", + "en": "Roles to ping on reports" + }, + "default": { + "en": [], + "de": [] + }, + "description": { + "en": "Roles that should get pinged in the log-channel when a user reports someone", + "de": "Rollen, die im log-Kanal gepingt werden sollen, wenn ein Nutzer jemanden Reportet" + }, "type": "array", - "content": "roleID", - "description": "ID of roles that should get pinged in the log-channel when a user reports someone", - "humanname-de": "Rollenpings bei Report", - "description-de": "Rollen, die im log-Kanal gepingt werden sollen, wenn ein Nutzer jemanden Reportet", - "params-de": {}, - "default-de": [] + "content": "roleID" }, { - "field_name": "require_reason", - "default": true, - "type": "boolean", - "description": "Should moderators be required to set a reason?", - "humanname-de": "Begründung erzwingen", - "description-de": "Sollen Moderatoren verpflichtet werden, eine Begründung anzugeben?", - "params-de": {}, - "default-de": true + "name": "require_reason", + "humanName": { + "de": "Begründung erzwingen", + "en": "Fore moderators to set a reason" + }, + "default": { + "en": true, + "de": true + }, + "description": { + "en": "Should moderators be required to set a reason?", + "de": "Sollen Moderatoren verpflichtet werden, eine Begründung anzugeben?" + }, + "type": "boolean" }, { - "field_name": "action_on_invite", - "default": "mute", + "name": "action_on_invite", + "humanName": { + "de": "Aktion bei Invite", + "en": "Action on invite" + }, + "default": { + "en": "mute", + "de": "mute" + }, + "description": { + "en": "What should the bot do if someone posts an invite link?", + "de": "Was soll der Bot tun, wenn jemand einen Invite sendet?" + }, "type": "select", "content": [ "none", @@ -125,16 +201,22 @@ "kick", "quarantine", "ban" - ], - "description": "What should the bot do if someone posts an invite link?", - "humanname-de": "Aktion bei Invite", - "description-de": "Was soll der Bot tun, wenn jemand einen Invite sendet?", - "params-de": {}, - "default-de": "mute" + ] }, { - "field_name": "action_on_scam_link", - "default": "none", + "name": "action_on_scam_link", + "humanName": { + "de": "Aktion bei Scam-Link", + "en": "Action on Scam-Link" + }, + "default": { + "en": "none", + "de": "mute" + }, + "description": { + "en": "What should the bot do if someone posts an suspicious or confirmed scam link?", + "de": "Was soll der Bot tun, wenn jemand einen Link zu einer verdächtigen oder bestätigten Scam-Seite sendet?" + }, "type": "select", "content": [ "none", @@ -143,63 +225,93 @@ "kick", "quarantine", "ban" - ], - "description": "What should the bot do if someone posts an suspicious or confirmed scam link?", - "humanname-de": "Aktion bei Scam-Link", - "description-de": "Was soll der Bot tun, wenn jemand einen Link zu einer verdächtigen oder bestätigten Scam-Seite sendet?", - "params-de": {}, - "default-de": "mute" + ] }, { - "field_name": "scam_link_level", - "default": "confirmed", + "name": "scam_link_level", + "humanName": { + "de": "Level der Scam-Link-Erkennung", + "en": "Level of Scam-Link-Detection" + }, + "default": { + "en": "confirmed", + "de": "confirmed" + }, + "description": { + "en": "Select the Level of Scam-Link-Filter. \"confirmed\" only contains verified Scam-Domains, while \"suspicious\" may contain not-harmful domains.", + "de": "\"confirmed\" enthält nur Scam-Domains, die wirklich als solche verifiziert wurden, während \"suspicious\" auch nicht-gefährdende Domains beinhalten kann" + }, "type": "select", "content": [ "confirmed", "suspicious" - ], - "description": "Select the Level of Scam-Link-Filter. \"confirmed\" only contains verified Scam-Domains, while \"suspicious\" may contain not-harmful domains.", - "humanname-de": "Level der Scam-Link-Erkennung", - "description-de": "\"confirmed\" enthält nur Scam-Domains, die wirklich als solche verifiziert wurden, während \"suspicious\" auch nicht-gefährdende Domains beinhalten kann", - "params-de": {}, - "default-de": "confirmed" + ] }, { - "field_name": "whitelisted_channels_for_invite_blocking", - "default": [], + "name": "whitelisted_channels_for_invite_blocking", + "humanName": { + "de": "Erlaubte Kanäle für Invitesperre", + "en": "Whitelisted channels for invite-ban" + }, + "default": { + "en": [], + "de": [] + }, + "description": { + "en": "Channels or categories where invite blocking is disabled", + "de": "Kanäle oder Kategorien, in welchen die Invitesperre deaktiviert ist" + }, "type": "array", - "content": "channelID", - "description": "ID of channels or categories where invite blocking is disabled", - "humanname-de": "Erlaubte Kanäle für Invitesperre", - "description-de": "Kanäle oder Kategorien, in welchen die Invitesperre deaktiviert ist", - "params-de": {}, - "default-de": [] + "content": "channelID" }, { - "field_name": "whitelisted_roles_for_invite_blocking", - "default": [], + "name": "whitelisted_roles_for_invite_blocking", + "humanName": { + "de": "Erlaubte Rollen für Invitesperre", + "en": "Whitelisted roles for invite-ban" + }, + "default": { + "en": [], + "de": [] + }, + "description": { + "en": "ID of Roles which are allowed to bypass invite blocking", + "de": "Rollen, welche die Invitesperre umgehen dürfen" + }, "type": "array", - "content": "roleID", - "description": "ID of Roles which are allowed to bypass invite blocking", - "humanname-de": "Erlaubte Rollen für Invitesperre", - "description-de": "Rollen, welche die Invitesperre umgehen dürfen", - "params-de": {}, - "default-de": [] + "content": "roleID" }, { - "field_name": "blacklisted_words", - "default": [], + "name": "blacklisted_words", + "humanName": { + "de": "Gesperrte Wörter", + "en": "Blacklisted words" + }, + "default": { + "en": [], + "de": [] + }, + "description": { + "en": "Words that are blacklisted", + "de": "Wörter, die blockiert sind" + }, "type": "array", - "content": "string", - "description": "Words that are blacklisted", - "humanname-de": "Gesperrte Wörter", - "description-de": "Wörter, die blockiert sind", - "params-de": {}, - "default-de": [] + "content": "string" }, { - "field_name": "action_on_posting_blacklisted_word", - "default": "mute", + "name": "action_on_posting_blacklisted_word", + "humanName": { + "de": "Aktion bei gesperrtem Wort", + "en": "Action on blacklisted Wort" + }, + "default": { + "en": "mute", + "de": "mute" + }, + "description": { + "en": "What should the bot do if someone posts a blacklisted word?", + "de": "Was soll der Bot tun, wenn jemand ein gesperrtes Wort sagt?" + }, "type": "select", "content": [ "none", @@ -208,58 +320,92 @@ "kick", "ban", "quarantine" - ], - "description": "What should the bot do if someone posts a blacklisted word?", - "humanname-de": "Aktion bei gesperrtem Wort", - "description-de": "Was soll der Bot tun, wenn jemand ein gesperrtes Wort sagt?", - "params-de": {}, - "default-de": "mute" + ] }, { - "field_name": "changeNicknameOnMute", - "default": "%nickname%", - "description": "The nickname in which the user should be renamed when they get muted", + "name": "changeNicknames", + "humanName": { + "de": "Nicknamen bei Mute- / Quarantäne ändern", + "en": "Change nicknames on Mute- / Quarantine" + }, + "default": { + "en": false, + "de": false + }, + "description": { + "en": "If enabled, the user will get renamed when they get muted or quarantined", + "de": "Wenn aktiviert, wird der Nutzer umbenannt, wenn er gemutet oder in Quarantäne gesteckt wird" + }, + "type": "boolean" + }, + { + "name": "changeNicknameOnMute", + "dependsOn": "changeNicknames", + "humanName": { + "de": "Neuer Nickname bei Mute", + "en": "New nickname on mute" + }, + "default": { + "en": "%nickname%", + "de": "%nickname%" + }, + "description": { + "en": "The nickname in which the user should be renamed when they get muted", + "de": "Der Nickname, in welchen der Nutzer umbenannt werden soll, wenn er gemuted wird" + }, "type": "string", "params": [ { - "name": "%nickname%", - "description": "Original nickname of the user" + "name": "nickname", + "description": { + "en": "Original nickname of the user" + } } - ], - "humanname-de": "Umbenennung bei mute", - "description-de": "Der Nickname, in welchen der Nutzer umbenannt werden soll, wenn er gemuted wird", - "params-de": {}, - "default-de": "%nickname%" + ] }, { - "field_name": "changeNicknameOnQuarantine", - "default": "%nickname%", - "description": "The nickname in which the user should be renamed when they get quarantined", + "name": "changeNicknameOnQuarantine", + "humanName": { + "de": "Nickname während der Quarantäne", + "en": "Nickname during quarantine" + }, + "dependsOn": "changeNicknames", + "default": { + "en": "%nickname%", + "de": "%nickname%" + }, + "description": { + "en": "The nickname in which the user should be renamed when they get quarantined" + }, "type": "string", "params": [ { - "name": "%nickname%", - "description": "Original nickname of the user" + "name": "nickname", + "description": { + "en": "Original nickname of the user" + } } - ], - "humanname-de": "", - "description-de": "", - "params-de": {}, - "default-de": "%nickname%" + ] }, { - "field_name": "automod", - "default": {}, - "description": "You can define here what should happen (options: mute, kick, ban, quarantine) when someone gets x warns. Specify duration by writing : after the action.", + "name": "automod", + "humanName": { + "de": "Automod", + "en": "Automod" + }, + "default": { + "en": {}, + "de": {} + }, + "description": { + "en": "You can define here what should happen (options: mute, kick, ban, quarantine) when someone gets x warns. Specify duration by writing : after the action.", + "de": "Du kannst hier festlegen, was passieren soll (optionen: mute, kick, ban), wenn jemand x Verwarnungen bekommt. Länge festlegen, indem : hinter die Aktion geschrieben wird." + }, + "type": "keyed", "content": { "key": "integer", "value": "string" - }, - "type": "keyed", - "humanname-de": "Automod", - "description-de": "Du kannst hier festlegen, was passieren soll (optionen: mute, kick, ban), wenn jemand x Verwarnungen bekommt. Länge festlegen, indem : hinter die Aktion geschrieben wird.", - "params-de": {}, - "default-de": {} + } } ] } \ No newline at end of file diff --git a/modules/moderation/configs/joinGate.json b/modules/moderation/configs/joinGate.json index 00c0b693..dcacd24a 100644 --- a/modules/moderation/configs/joinGate.json +++ b/modules/moderation/configs/joinGate.json @@ -1,29 +1,60 @@ { + "description": { + "en": "This system can prevent suspicious accounts from getting access to your server", + "de": "Dieses System kann verhindern, dass verdächtige Accounts Zugriff erhalten" + }, + "humanName": { + "de": "Join-Gate-Konfiguration", + "en": "Join-Gate-Configuration" + }, "filename": "joinGate.json", "content": [ { - "field_name": "enabled", + "name": "enabled", + "humanName": { + "de": "Aktiviert?", + "en": "Enabled?" + }, + "default": { + "en": true, + "de": true + }, + "description": { + "en": "Enable or disable the join gate", + "de": "Aktiviere oder deaktiviere das Join-Gate" + }, "type": "boolean", - "default": true, - "description": "Enable or disable the join gate", - "humanname-de": "Aktiviert?", - "description-de": "Aktiviere oder deaktiviere das Join-Gate", - "params-de": {}, - "default-de": true, "elementToggle": true }, { - "field_name": "allUsers", - "type": "boolean", - "default": false, - "description": "If enabled all users action against all new users will be taken", - "humanname-de": "Alle Nutzer", - "description-de": "Wenn aktiviert, werden Aktionen gegen alle neuen Nutzer ausgefüht", - "params-de": {}, - "default-de": false + "name": "allUsers", + "humanName": { + "de": "Alle Nutzer filtern", + "en": "Filter all users" + }, + "default": { + "en": false + }, + "description": { + "en": "If enabled all users action against all new users will be taken", + "de": "Wenn aktiviert, werden Aktionen gegen alle neuen Nutzer ausgefüht" + }, + "type": "boolean" }, { - "field_name": "action", + "name": "action", + "humanName": { + "de": "Aktion", + "en": "Action" + }, + "default": { + "en": "quarantine", + "de": "quarantine" + }, + "description": { + "en": "Select the action here that should get performed if the join gate gets triggered", + "de": "Wähle hier die Aktion, die ausgeführt werden soll, wenn das Join-Gate ausgelöst wird" + }, "type": "select", "content": [ "mute", @@ -31,63 +62,86 @@ "quarantine", "ban", "give-role" - ], - "default": "quarantine", - "description": "Select the action here that should get performed if the join gate gets triggered", - "humanname-de": "Aktion", - "description-de": "Wähle hier die Aktion, die ausgeführt werden soll, wenn das Join-Gate ausgelöst wird", - "params-de": {}, - "default-de": "quarantine" + ] }, { - "field_name": "roleID", - "type": "roleID", - "description": "Only if action = give-role. Role that gets given to users who fail the join gate", - "default": "", - "humanname-de": "Rolle", - "description-de": "Nur verfügbar, wenn Aktion = give-role. Rolle, die Nutzern gegeben wird, die das Join-Gate nicht bestehen", - "params-de": {}, - "default-de": "" + "name": "roleID", + "humanName": { + "de": "Rolle", + "en": "Role" + }, + "default": { + "en": "" + }, + "description": { + "en": "Only if action = give-role. Role that gets given to users who fail the join gate", + "de": "Nur verfügbar, wenn Aktion = give-role. Rolle, die Nutzern gegeben wird, die das Join-Gate nicht bestehen" + }, + "type": "roleID" }, { - "field_name": "removeOtherRoles", - "type": "boolean", - "description": "Only if action = give-role. If enabled other roles that have been give to the user get removed after a short interval (and the giving of the role from \"roleID\" will be delayed)", - "default": true, - "humanname-de": "Andere Rollen entfernen", - "description-de": "Nur verfügbar, wenn Aktion = give-role. Wenn aktiviert, werden andere Rollen die der Nutzer hat nach einem kurzen Zeitraum entfernt (und das Vergeben der Rolle von \"Rolle\" wird verzögert)", - "params-de": {}, - "default-de": true + "name": "removeOtherRoles", + "humanName": { + "de": "Andere Rollen entfernen", + "en": "Remove other roles" + }, + "default": { + "en": true, + "de": true + }, + "description": { + "en": "Only if action = give-role. If enabled other roles that have been give to the user get removed after a short interval (and the giving of the role from \"roleID\" will be delayed)", + "de": "Nur verfügbar, wenn Aktion = give-role. Wenn aktiviert, werden andere Rollen die der Nutzer hat nach einem kurzen Zeitraum entfernt (und das Vergeben der Rolle von \"Rolle\" wird verzögert)" + }, + "type": "boolean" }, { - "field_name": "minAccountAge", - "type": "integer", - "default": "3", - "description": "Age of the account of a new user that is required to be set to pass the join gate (in days)", - "humanname-de": "Minimales Accountalter", - "description-de": "Alter des Accounts eines neuen Nutzers, der beitritt, welches benötigt wird um das Join-Gate zu bestehen (in Tagen)", - "params-de": {}, - "default-de": 3 + "name": "minAccountAge", + "humanName": { + "de": "Minimales Accountalter", + "en": "Minimum account age" + }, + "default": { + "en": "3", + "de": 3 + }, + "description": { + "en": "Age of the account of a new user that is required to be set to pass the join gate (in days)", + "de": "Alter des Accounts eines neuen Nutzers, der beitritt, welches benötigt wird um das Join-Gate zu bestehen (in Tagen)" + }, + "type": "integer" }, { - "field_name": "requireProfilePicture", - "type": "boolean", - "default": true, - "description": "If enabled users are required to have a profile picture set to pass the join gate", - "humanname-de": "Benötige Profilbild", - "description-de": "Wenn aktiviert, brauchen Nutzer ein Profilbild um das Join-Gate zu bestehen", - "params-de": {}, - "default-de": true + "name": "requireProfilePicture", + "humanName": { + "de": "Benötige Profilbild", + "en": "Require profile picture" + }, + "default": { + "en": true, + "de": true + }, + "description": { + "en": "If enabled users are required to have a profile picture set to pass the join gate", + "de": "Wenn aktiviert, brauchen Nutzer ein Profilbild um das Join-Gate zu bestehen" + }, + "type": "boolean" }, { - "field_name": "ignoreBots", - "type": "boolean", - "default": true, - "description": "If enabled bots are allowed to pass the join gate without any restrictions", - "humanname-de": "Ignoriere Bots", - "description-de": "Wenn aktiviert, bestehen Bots das Join-Gate ohne Beschränkungen", - "params-de": {}, - "default-de": true + "name": "ignoreBots", + "humanName": { + "de": "Ignoriere Bots", + "en": "Ignore bots" + }, + "default": { + "en": true, + "de": true + }, + "description": { + "en": "If enabled bots are allowed to pass the join gate without any restrictions", + "de": "Wenn aktiviert, bestehen Bots das Join-Gate ohne Beschränkungen" + }, + "type": "boolean" } ] } \ No newline at end of file diff --git a/modules/moderation/configs/strings.json b/modules/moderation/configs/strings.json index 2350d6b5..23e79c29 100644 --- a/modules/moderation/configs/strings.json +++ b/modules/moderation/configs/strings.json @@ -1,378 +1,500 @@ { + "description": { + "en": "Set up which messages your bot should send", + "de": "Stelle hier ein, welche Nachrichten dein Bot schicken soll" + }, + "humanName": { + "en": "Messages", + "de": "Nachrichten" + }, "filename": "strings.json", "content": [ { - "field_name": "no_permissions", - "default": "You can not do that. You need at least moderator level %required_level% to do this", + "name": "no_permissions", + "humanName": {}, + "default": { + "en": "You can not do that. You need at least moderator level %required_level% to do this", + "de": "You can not do that. You need at least moderator level %required_level% to do this" + }, + "description": { + "en": "Message that gets send if the user doesn't has the required role and/or has not the required mod-level" + }, "type": "string", "allowEmbed": true, - "description": "Message that gets send if the user doesn't has the required role and/or has not the required mod-level", "params": [ { - "name": "%required_level%", - "description": "Required mod-level to do this." + "name": "required_level", + "description": { + "en": "Required mod-level to do this." + } } - ], - "humanname-de": "", - "description-de": "", - "params-de": {}, - "default-de": "You can not do that. You need at least moderator level %required_level% to do this" + ] }, { - "field_name": "user_not_found", - "default": "I could not find this user - try using an ID or a mention", + "name": "user_not_found", + "humanName": {}, + "default": { + "en": "I could not find this user - try using an ID or a mention", + "de": "I could not find this user - try using an ID or a mention" + }, + "description": { + "en": "Message that gets send if the user provided an invalid userid" + }, "type": "string", - "allowEmbed": true, - "description": "Message that gets send if the user provided an invalid userid", - "humanname-de": "", - "description-de": "", - "params-de": {}, - "default-de": "I could not find this user - try using an ID or a mention" + "allowEmbed": true }, { - "field_name": "missing_reason", - "default": "Please specify an reason", + "name": "missing_reason", + "humanName": {}, + "default": { + "en": "Please specify an reason", + "de": "Please specify an reason" + }, + "description": { + "en": "Message that gets send if the user does not provide a reason and 'require reason' is activated" + }, "type": "string", - "allowEmbed": true, - "description": "Message that gets send if the user does not provide a reason and 'require reason' is activated", - "humanname-de": "", - "description-de": "", - "params-de": {}, - "default-de": "Please specify an reason" + "allowEmbed": true }, { - "field_name": "this_is_a_mod", - "default": "You can not perform this action on your college.", + "name": "this_is_a_mod", + "humanName": {}, + "default": { + "en": "You can not perform this action on your college.", + "de": "You can not perform this action on your college." + }, + "description": { + "en": "Message that gets send if the user tries to mute another moderator" + }, "type": "string", - "allowEmbed": true, - "description": "Message that gets send if the user tries to mute another moderator", - "humanname-de": "", - "description-de": "", - "params-de": {}, - "default-de": "You can not perform this action on your college." + "allowEmbed": true }, { - "field_name": "submitted-report-message", - "default": "Thanks for reporting %user%. I notified our server team and transmitted them an [encrypted snapshot](<%mURL%>) of the current messages in this channel, so they can see what really happened. Please make sure that our bots and staff can message you, so we can ask you follow-up-questions, if needed.", + "name": "submitted-report-message", + "humanName": {}, + "default": { + "en": "Thanks for reporting %user%. I notified our server team and transmitted them an [encrypted snapshot](<%mURL%>) of the current messages in this channel, so they can see what really happened. Please make sure that our bots and staff can message you, so we can ask you follow-up-questions, if needed.", + "de": "Thanks for reporting %user%. I notified our server team and transmitted them an [encrypted snapshot](<%mURL%>) of the current messages in this channel, so they can see what really happened. Please make sure that our bots and staff can message you, so we can ask you follow-up-questions, if needed." + }, + "description": { + "en": "Message that gets send, if someone reports somebody." + }, "type": "string", "allowEmbed": true, - "description": "Message that gets send, if someone reports somebody.", "params": [ { - "name": "%user%", - "description": "Tag of the user they reported" + "name": "user", + "description": { + "en": "Tag of the user they reported" + } }, { - "name": "%mURL%", - "description": "URL to the message log" + "name": "mURL", + "description": { + "en": "URL to the message log" + } } - ], - "humanname-de": "", - "description-de": "", - "params-de": {}, - "default-de": "Thanks for reporting %user%. I notified our server team and transmitted them an [encrypted snapshot](<%mURL%>) of the current messages in this channel, so they can see what really happened. Please make sure that our bots and staff can message you, so we can ask you follow-up-questions, if needed." + ] }, { - "field_name": "mute_message", - "default": "You got muted for **%reason%** by %user%!", + "name": "mute_message", + "humanName": {}, + "default": { + "en": "You got muted for **%reason%** by %user%!", + "de": "You got muted for **%reason%** by %user%!" + }, + "description": { + "en": "Message that gets send to a user when they got muted" + }, "type": "string", "allowEmbed": true, - "description": "Message that gets send to a user when they got muted", "params": [ { - "name": "%user%", - "description": "Tag of the moderator" + "name": "user", + "description": { + "en": "Tag of the moderator" + } }, { - "name": "%reason%", - "description": "Reason of the mute" + "name": "reason", + "description": { + "en": "Reason of the mute" + } } - ], - "humanname-de": "", - "description-de": "", - "params-de": {}, - "default-de": "You got muted for **%reason%** by %user%!" + ] }, { - "field_name": "channel_mute", - "default": "You got channel-muted from %channel% for **%reason%** by %user%!", + "name": "channel_mute", + "humanName": {}, + "default": { + "en": "You got channel-muted from %channel% for **%reason%** by %user%!" + }, + "description": { + "en": "Message that gets send to a user when they got muted" + }, "type": "string", "allowEmbed": true, - "description": "Message that gets send to a user when they got muted", "params": [ { - "name": "%user%", - "description": "Tag of the moderator" + "name": "user", + "description": { + "en": "Tag of the moderator" + } }, { - "name": "%reason%", - "description": "Reason of the mute" + "name": "reason", + "description": { + "en": "Reason of the mute" + } }, { - "name": "%channel%", - "description": "Channel from which the user got muted" + "name": "channel", + "description": { + "en": "Channel from which the user got muted" + } } ] }, { - "field_name": "remove-channel_mute", - "default": "Your channel-mute from %channel% got removed because of **%reason%** by %user%!", + "name": "remove-channel_mute", + "humanName": {}, + "default": { + "en": "Your channel-mute from %channel% got removed because of **%reason%** by %user%!" + }, + "description": { + "en": "Message that gets send to a user when they got muted" + }, "type": "string", "allowEmbed": true, - "description": "Message that gets send to a user when they got muted", "params": [ { - "name": "%user%", - "description": "Tag of the moderator" + "name": "user", + "description": { + "en": "Tag of the moderator" + } }, { - "name": "%reason%", - "description": "Reason of the mute" + "name": "reason", + "description": { + "en": "Reason of the mute" + } }, { - "name": "%channel%", - "description": "Channel from which the user got unmuted" + "name": "channel", + "description": { + "en": "Channel from which the user got unmuted" + } } ] }, { - "field_name": "tmpmute_message", - "default": "You got temporarily muted for **%reason%** by %user%! This action is going to expire on %date%.", + "name": "tmpmute_message", + "humanName": {}, + "default": { + "en": "You got temporarily muted for **%reason%** by %user%! This action is going to expire on %date%.", + "de": "You got temporarily muted for **%reason%** by %user%! This action is going to expire on %date%." + }, + "description": { + "en": "Message that gets send to a user when they got temporarily muted" + }, "type": "string", "allowEmbed": true, - "description": "Message that gets send to a user when they got temporarily muted", "params": [ { - "name": "%user%", - "description": "Tag of the moderator" + "name": "user", + "description": { + "en": "Tag of the moderator" + } }, { - "name": "%reason%", - "description": "Reason of the mute" + "name": "reason", + "description": { + "en": "Reason of the mute" + } }, { - "name": "%date%", - "description": "Timestamp when this action expires" + "name": "date", + "description": { + "en": "Timestamp when this action expires" + } } - ], - "humanname-de": "", - "description-de": "", - "params-de": {}, - "default-de": "You got temporarily muted for **%reason%** by %user%! This action is going to expire on %date%." + ] }, { - "field_name": "quarantine_message", - "default": "You got quarantined for **%reason%** by %user%!", + "name": "quarantine_message", + "humanName": {}, + "default": { + "en": "You got quarantined for **%reason%** by %user%!", + "de": "You got quarantined for **%reason%** by %user%!" + }, + "description": { + "en": "Message that gets send to a user when they get quarantined" + }, "type": "string", "allowEmbed": true, - "description": "Message that gets send to a user when they get quarantined", "params": [ { - "name": "%user%", - "description": "Tag of the moderator" + "name": "user", + "description": { + "en": "Tag of the moderator" + } }, { - "name": "%reason%", - "description": "Reason of the mute" + "name": "reason", + "description": { + "en": "Reason of the mute" + } } - ], - "humanname-de": "", - "description-de": "", - "params-de": {}, - "default-de": "You got quarantined for **%reason%** by %user%!" + ] }, { - "field_name": "tmpquarantine_message", - "default": "You got quarantined temporarily for **%reason%** by %user%! This action is going to expire on %date%", + "name": "tmpquarantine_message", + "humanName": {}, + "default": { + "en": "You got quarantined temporarily for **%reason%** by %user%! This action is going to expire on %date%", + "de": "You got quarantined temporarily for **%reason%** by %user%! This action is going to expire on %date%" + }, + "description": { + "en": "Message that gets send to a user when they get quarantined" + }, "type": "string", "allowEmbed": true, - "description": "Message that gets send to a user when they get quarantined", "params": [ { - "name": "%user%", - "description": "Tag of the moderator" + "name": "user", + "description": { + "en": "Tag of the moderator" + } }, { - "name": "%reason%", - "description": "Reason of the mute" + "name": "reason", + "description": { + "en": "Reason of the mute" + } }, { - "name": "%date%", - "description": "Date when the quarantine is going to be removed automatically" + "name": "date", + "description": { + "en": "Date when the quarantine is going to be removed automatically" + } } - ], - "humanname-de": "", - "description-de": "", - "params-de": {}, - "default-de": "You got quarantined temporarily for **%reason%** by %user%! This action is going to expire on %date%" + ] }, { - "field_name": "unquarantine_message", - "default": "You got unquarantined for **%reason%** by %user%!", + "name": "unquarantine_message", + "humanName": {}, + "default": { + "en": "You got unquarantined for **%reason%** by %user%!", + "de": "You got unquarantined for **%reason%** by %user%!" + }, + "description": { + "en": "Message that gets send to a user when they get unquarantined" + }, "type": "string", "allowEmbed": true, - "description": "Message that gets send to a user when they get unquarantined", "params": [ { - "name": "%user%", - "description": "Tag of the moderator" + "name": "user", + "description": { + "en": "Tag of the moderator" + } }, { - "name": "%reason%", - "description": "Reason of the mute" + "name": "reason", + "description": { + "en": "Reason of the mute" + } } - ], - "humanname-de": "", - "description-de": "", - "params-de": {}, - "default-de": "You got unquarantined for **%reason%** by %user%!" + ] }, { - "field_name": "unmute_message", - "default": "You got unmuted for **%reason%** by %user%!", + "name": "unmute_message", + "humanName": {}, + "default": { + "en": "You got unmuted for **%reason%** by %user%!", + "de": "You got unmuted for **%reason%** by %user%!" + }, + "description": { + "en": "Message that gets send to a user when they got unmuted" + }, "type": "string", "allowEmbed": true, - "description": "Message that gets send to a user when they got unmuted", "params": [ { - "name": "%user%", - "description": "Tag of the moderator" + "name": "user", + "description": { + "en": "Tag of the moderator" + } }, { - "name": "%reason%", - "description": "Reason of the unmute" + "name": "reason", + "description": { + "en": "Reason of the unmute" + } } - ], - "humanname-de": "", - "description-de": "", - "params-de": {}, - "default-de": "You got unmuted for **%reason%** by %user%!" + ] }, { - "field_name": "kick_message", - "default": "You got kicked for **%reason%** by %user%!", + "name": "kick_message", + "humanName": {}, + "default": { + "en": "You got kicked for **%reason%** by %user%!", + "de": "You got kicked for **%reason%** by %user%!" + }, + "description": { + "en": "Message that gets send to a user when they got kicked" + }, "type": "string", "allowEmbed": true, - "description": "Message that gets send to a user when they got kicked", "params": [ { - "name": "%user%", - "description": "Tag of the moderator" + "name": "user", + "description": { + "en": "Tag of the moderator" + } }, { - "name": "%reason%", - "description": "Reason of the kick" + "name": "reason", + "description": { + "en": "Reason of the kick" + } } - ], - "humanname-de": "", - "description-de": "", - "params-de": {}, - "default-de": "You got kicked for **%reason%** by %user%!" + ] }, { - "field_name": "ban_message", - "default": "You got banned for **%reason%** by %user%!", + "name": "ban_message", + "humanName": {}, + "default": { + "en": "You got banned for **%reason%** by %user%!", + "de": "You got banned for **%reason%** by %user%!" + }, + "description": { + "en": "Message that gets send to a user when they got banned" + }, "type": "string", "allowEmbed": true, - "description": "Message that gets send to a user when they got banned", "params": [ { - "name": "%user%", - "description": "Tag of the moderator" + "name": "user", + "description": { + "en": "Tag of the moderator" + } }, { - "name": "%reason%", - "description": "Reason of the ban" + "name": "reason", + "description": { + "en": "Reason of the ban" + } } - ], - "humanname-de": "", - "description-de": "", - "params-de": {}, - "default-de": "You got banned for **%reason%** by %user%!" + ] }, { - "field_name": "tmpban_message", - "default": "You got temporarily banned for **%reason%** by %user%! This action is going to expire on %date%", + "name": "tmpban_message", + "humanName": {}, + "default": { + "en": "You got temporarily banned for **%reason%** by %user%! This action is going to expire on %date%", + "de": "You got temporarily banned for **%reason%** by %user%! This action is going to expire on %date%" + }, + "description": { + "en": "Message that gets send to a user when they got banned temporarily" + }, "type": "string", "allowEmbed": true, - "description": "Message that gets send to a user when they got banned temporarily", "params": [ { - "name": "%user%", - "description": "Tag of the moderator" + "name": "user", + "description": { + "en": "Tag of the moderator" + } }, { - "name": "%reason%", - "description": "Reason of the ban" + "name": "reason", + "description": { + "en": "Reason of the ban" + } }, { - "name": "%date%", - "description": "Date on which the ban expires" + "name": "date", + "description": { + "en": "Date on which the ban expires" + } } - ], - "humanname-de": "", - "description-de": "", - "params-de": {}, - "default-de": "You got temporarily banned for **%reason%** by %user%! This action is going to expire on %date%" + ] }, { - "field_name": "warn_message", - "default": "You got warned for **%reason%** by %user%!", + "name": "warn_message", + "humanName": {}, + "default": { + "en": "You got warned for **%reason%** by %user%!", + "de": "You got warned for **%reason%** by %user%!" + }, + "description": { + "en": "Message that gets send to a user when they got warned" + }, "type": "string", "allowEmbed": true, - "description": "Message that gets send to a user when they got warned", "params": [ { - "name": "%user%", - "description": "Tag of the moderator" + "name": "user", + "description": { + "en": "Tag of the moderator" + } }, { - "name": "%reason%", - "description": "Reason of the warn" + "name": "reason", + "description": { + "en": "Reason of the warn" + } } - ], - "humanname-de": "", - "description-de": "", - "params-de": {}, - "default-de": "You got warned for **%reason%** by %user%!" + ] }, { - "field_name": "lock_channel_message", - "default": "This channel got locked because %reason% by %user%", + "name": "lock_channel_message", + "humanName": {}, + "default": { + "en": "This channel got locked because %reason% by %user%", + "de": "This channel got locked because %reason% by %user%" + }, + "description": { + "en": "Message that gets send in a channel if it gets locked" + }, "type": "string", "allowEmbed": true, - "description": "Message that gets send in a channel if it gets locked", "params": [ { - "name": "%user%", - "description": "Tag of the moderator" + "name": "user", + "description": { + "en": "Tag of the moderator" + } }, { - "name": "%reason%", - "description": "Reason of the lock" + "name": "reason", + "description": { + "en": "Reason of the lock" + } } - ], - "humanname-de": "", - "description-de": "", - "params-de": {}, - "default-de": "This channel got locked because %reason% by %user%" + ] }, { - "field_name": "unlock_channel_message", - "default": "This channel got unlocked by %user%", + "name": "unlock_channel_message", + "humanName": {}, + "default": { + "en": "This channel got unlocked by %user%", + "de": "This channel got unlocked by %user%" + }, + "description": { + "en": "Message that gets send in a channel if it gets unlocked" + }, "type": "string", "allowEmbed": true, - "description": "Message that gets send in a channel if it gets unlocked", "params": [ { - "name": "%user%", - "description": "Tag of the moderator" + "name": "user", + "description": { + "en": "Tag of the moderator" + } } - ], - "humanname-de": "", - "description-de": "", - "params-de": {}, - "default-de": "This channel got unlocked by %user%" + ] } ] } \ No newline at end of file diff --git a/modules/moderation/configs/verification.json b/modules/moderation/configs/verification.json index 55b7976e..61e7cdc3 100644 --- a/modules/moderation/configs/verification.json +++ b/modules/moderation/configs/verification.json @@ -1,145 +1,218 @@ { + "description": { + "en": "Require accounts to verify that they are not a robot before accessing your server", + "de": "Zwinge neue Nutzer zu verifizieren, dass sie kein Roboter sind" + }, + "humanName": { + "de": "Verifikation-Konfiguration", + "en": "Verification-Configuration" + }, "filename": "verification.json", "content": [ { - "field_name": "enabled", - "default": false, + "name": "enabled", + "humanName": { + "de": "Aktiviert?", + "en": "Enabled?" + }, + "default": { + "en": false + }, + "description": { + "en": "If checked, verification on your server will be enabled", + "de": "Wenn aktiviert, wird Verifikation auf deinem Server aktiviert" + }, "type": "boolean", - "description": "If checked, verification on your server will be enabled", - "humanname-de": "", - "description-de": "", - "params-de": {}, - "default-de": false, "elementToggle": true }, { - "field_name": "verification-needed-role", - "default": "", + "name": "verification-needed-role", + "humanName": { + "de": "Rolle für Nutzer, die sich noch verifizieren müssen", + "en": "Role for users with pending verification" + }, + "default": { + "en": "" + }, + "description": { + "en": "Role, which members should be given before they verify themselves", + "de": "Rolle, die Nutzer erhalten, bevor sie sich verifiziert haben" + }, "type": "roleID", - "allowNull": true, - "description": "ID of the role members should be given before they got verified", - "humanname-de": "", - "description-de": "", - "params-de": {}, - "default-de": "" + "allowNull": true }, { - "field_name": "verification-passed-role", - "default": "", - "allowNull": true, + "name": "verification-passed-role", + "humanName": { + "de": "Rolle für Nutzer mit bestandener Verifikation", + "en": "Role for users that passed verification" + }, + "default": { + "en": "" + }, + "description": { + "en": "Role, which members should be given after they got verified successfully", + "de": "Rolle, die Nutzern gegeben werden soll, wenn sie sich erfolgreich verifiziert haben" + }, "type": "roleID", - "description": "ID of the role members should be given after they got verified successfully", - "humanname-de": "", - "description-de": "", - "params-de": {}, - "default-de": "" + "allowNull": true }, { - "field_name": "verification-log", - "default": "", - "allowNull": true, + "name": "verification-log", + "humanName": {}, + "default": { + "en": "Verification-Log", + "de": "Verifikation-Log" + }, + "description": { + "en": "Channel where all verification-actions should get logged", + "de": "Kanal, in welchem alle Verifikation-Aktionen dokumentiert werden sollen" + }, "type": "channelID", - "description": "ID of the channel where all verification-actions should get logged", - "humanname-de": "", - "description-de": "", - "params-de": {}, - "default-de": "" + "allowNull": true }, { - "field_name": "type", - "default": "captcha", + "name": "type", + "humanName": { + "en": "Type of verification", + "de": "Art der Verifikation" + }, + "default": { + "en": "captcha", + "de": "captcha" + }, + "description": { + "en": "How should the verification process be performed on your server?", + "de": "Wie sollen sich Nutzer verifizieren müssen, wenn sie den Server beitreten?" + }, "type": "select", "content": [ "manual", "captcha" - ], - "description": "How should the verification process be performed on your server?", - "humanname-de": "", - "description-de": "", - "params-de": {}, - "default-de": "captcha" + ] }, { - "field_name": "actionOnFail", - "default": "kick", + "name": "actionOnFail", + "humanName": { + "de": "Aktion bei Fehlschlagen der Verifikation", + "en": "Action on failure of verification" + }, + "default": { + "en": "kick", + "de": "kick" + }, + "description": { + "en": "What should happen if someone fails the verification?", + "de": "Was soll passieren, wenn die Verifikation fehlschlägt?" + }, "type": "select", "content": [ "kick", "quarantine", "ban", "mute" - ], - "description": "What should happen if someone fails the verification?", - "humanname-de": "", - "description-de": "", - "params-de": {}, - "default-de": "kick" + ] }, { - "field_name": "restart-verification-channel", - "default": "", + "name": "restart-verification-channel", + "humanName": { + "de": "Verifikation-Neustarten-Kanal", + "en": "Restart Verification-Channel" + }, + "default": { + "en": "" + }, + "description": { + "en": "(optional) Add support for a channel where users can easily restart their verification process (for example if they had DMs disabled when they tried) and get notified if we couldn't reach them", + "de": "(optional) Kanal in welchem Nutzer ganz einfach den Verifikationsprozess neustarten können (zum Beispiel, wenn der Nutzer PNs deaktiviert hat) und benachrichtigt werden, wenn wir sie nicht erreichen konnten" + }, "type": "channelID", - "allowNull": true, - "description": "(optional) Add support for a channel where users can easily restart their verification process (for example if they had DMs disabled when they tried) and get notified if we couldn't reach them", - "humanname-de": "", - "description-de": "", - "params-de": {}, - "default-de": "" + "allowNull": true }, { - "field_name": "captcha-message", - "default": "Welcome! Please verify that you are a human. You have two minutes to complete this.", + "name": "captcha-message", + "humanName": { + "de": "Captcha-Nachricht", + "en": "Captcha-Message" + }, + "default": { + "en": "Welcome! Please verify that you are a human. You have two minutes to complete this.", + "de": "Willkommen! Bitte verifiziere, dass du kein Bot bist. Du hast zwei Minuten, um dies zu tun." + }, + "description": { + "en": "This message gets sent to users who need to complete a captcha", + "de": "Diese Nachricht wird an den Nutzer gesendet, der ein Captcha durchführen muss" + }, "type": "string", - "allowEmbed": true, - "description": "This message gets sent to users who need to complete a captcha", - "humanname-de": "", - "description-de": "", - "params-de": {}, - "default-de": "Welcome! Please verify that you are a human. You have two minutes to complete this." + "allowEmbed": true }, { - "field_name": "manual-verification-message", - "default": "Welcome! A human will be verifying your account shortly. I will update you if I have any news.", + "name": "manual-verification-message", + "humanName": { + "en": "Manual-Verification-Message", + "de": "Manuelle-Verifikation-Nachricht" + }, + "default": { + "en": "Welcome! A human will be verifying your account shortly. I will update you if I have any news.", + "de": "Willkommen! Ein Mensch wird deinen Account bald überprüfen und dir Zugriff auf den Server geben, bitte gedulde dich. Ich informiere dich bei Neuigkeiten." + }, + "description": { + "en": "This message gets sent to users who need to get verified manually.", + "de": "Diese Nachricht wird an Nutzer geschickt, die manuell verifiziert werden müssen" + }, "type": "string", - "allowEmbed": true, - "description": "This message gets sent to users who need to get verified manually.", - "humanname-de": "", - "description-de": "", - "params-de": {}, - "default-de": "Welcome! A human will be verifying your account shortly. I will update you if I have any news." + "allowEmbed": true }, { - "field_name": "captcha-failed-message", - "default": "It seems like you failed the verification. This is bad, I will have to take moderative actions against you - sorry fellow bot.", + "name": "captcha-failed-message", + "humanName": { + "de": "Captcha fehlgeschlagen-Nachricht", + "en": "Captcha failed-Message" + }, + "default": { + "en": "It seems like you failed the verification. This is bad, I will have to take moderative actions against you - sorry fellow bot.", + "de": "Es scheint, als hättest du die Verifikation nicht bestanden. Schade, ich werde moderative Maßnahmen gegen dich ergreifen - entschuldige, Roboter." + }, + "description": { + "en": "This message gets sent when a user fails the verification", + "de": "Diese Nachricht wird an Nutzer gesendet, bei denen die Verifikation fehlgeschlagen ist" + }, "type": "string", - "allowEmbed": true, - "description": "This message gets sent when a user fails the verification", - "humanname-de": "", - "description-de": "", - "params-de": {}, - "default-de": "It seems like you failed the verification. This is bad, I will have to take moderative actions against you - sorry fellow bot." + "allowEmbed": true }, { - "field_name": "captcha-succeeded-message", - "default": "Thanks! We have verified that you are indeed not a bot, so I granted you access to the whole server! Have fun <3", + "name": "captcha-succeeded-message", + "humanName": { + "de": "Captcha abgeschlossen-Nachricht", + "en": "Captcha completed-Message" + }, + "default": { + "en": "Thanks! We have verified that you are indeed not a bot, so I granted you access to the whole server! Have fun <3", + "de": "Danke dir! Wir konnten verifizieren, dass du tatsächlich kein Bot bist, also haben wir dir auf den gesamten Server Zugriff gegeben! Viel Spaß <3" + }, + "description": { + "en": "This message gets sent to users when they complete the verification", + "de": "Diese Nachricht wird gesendet, wenn ein Nutzer die Verifikation erfolgreich abgeschlossen hat" + }, "type": "string", - "allowEmbed": true, - "description": "This message gets sent to users when they complete the verification", - "humanname-de": "", - "description-de": "", - "params-de": {}, - "default-de": "Thanks! We have verified that you are indeed not a bot, so I granted you access to the whole server! Have fun <3" + "allowEmbed": true }, { - "field_name": "verify-channel-first-message", - "default": "Welcome! I have send you a DM about your verification-process. Please read it carefully. If you have DMs disabled, please activate them and click the button below. This step is required to join this server.", + "name": "verify-channel-first-message", + "humanName": { + "de": "Verifkations-Kanal-Info-Nachricht", + "en": "Verification-Channel-Info-Message" + }, + "default": { + "en": "Welcome! I have send you a DM about your verification-process. Please read it carefully. If you have DMs disabled, please activate them and click the button below. This step is required to join this server.", + "de": "Willkommen! Ich habe dir eine PN über den Verifikationsprozess. Bitte lese sie dir genau durch. Wenn du PNs deaktiviert hast, aktiviere sie bitte und klicke den Knopf unten. Dieser Schritt ist notwendig, um dem Server beizutreten." + }, + "description": { + "en": "This message is the introduction message in the verify-channel.", + "de": "Das ist die Informations-Nachricht im Verfikationskanal." + }, "type": "string", - "allowEmbed": true, - "description": "This message is the introduction message in the verify-channel.", - "humanname-de": "", - "description-de": "", - "params-de": {}, - "default-de": "Welcome! I have send you a DM about your verification-process. Please read it carefully. If you have DMs disabled, please activate them and click the button below. This step is required to join this server." + "allowEmbed": true } ] } \ No newline at end of file diff --git a/modules/moderation/events/guildMemberAdd.js b/modules/moderation/events/guildMemberAdd.js index 6ded5eb8..90399ae9 100644 --- a/modules/moderation/events/guildMemberAdd.js +++ b/modules/moderation/events/guildMemberAdd.js @@ -101,7 +101,8 @@ exports.run = async (client, guildMember) => { } ); setTimeout(() => { - m.delete().then(() => {}); + m.delete().then(() => { + }); }, 300000); } @@ -156,13 +157,13 @@ exports.run = async (client, guildMember) => { * @return {Promise} */ async function performJoinGateAction(reason) { + guildMember.joinGateTriggered = true; if (joinGateConfig.action === 'give-role') { if (joinGateConfig.removeOtherRoles) { - setTimeout(async () => { - await guildMember.roles.remove(guildMember.roles.cache, `[moderation] [${localize('moderation', 'join-gate')}] ${localize('moderation', 'join-gate-fail', {r: reason})}`); - await guildMember.roles.add(joinGateConfig.roleID, `[moderation] [${localize('moderation', 'join-gate')}] ${localize('moderation', 'join-gate-fail', {r: reason})}`); - }, 4000); - } else await guildMember.roles.add(joinGateConfig.roleID, `[moderation] [${localize('moderation', 'join-gate')}] ${localize('moderation', 'join-gate-fail', {r: reason})}`); + guildMember.doNotGiveWelcomeRole = true; + await guildMember.roles.remove(guildMember.roles.cache, `[moderation] [${localize('moderation', 'join-gate')}] ${localize('moderation', 'join-gate-fail', {r: reason})}`); + } + await guildMember.roles.add(joinGateConfig.roleID, `[moderation] [${localize('moderation', 'join-gate')}] ${localize('moderation', 'join-gate-fail', {r: reason})}`); return; } const roles = []; diff --git a/modules/moderation/moderationActions.js b/modules/moderation/moderationActions.js index 37ed7615..bafeb71a 100644 --- a/modules/moderation/moderationActions.js +++ b/modules/moderation/moderationActions.js @@ -39,7 +39,7 @@ async function moderationAction(client, type, user, victim, reason, additionalDa '%user%': user.user.tag, '%date%': expiringAt ? formatDate(expiringAt) : null })); - await victim.setNickname(moduleConfig['changeNicknameOnMute'] ? moduleConfig['changeNicknameOnMute'].split('%nickname%').join(victim.nickname ? victim.nickname : victim.user.username) : victim.nickname, '[moderation] ' + localize('moderation', 'mute-audit-log-reason', { + if (moduleConfig['changeNicknameOnQuarantine']) await victim.setNickname(moduleConfig['changeNicknameOnMute'].split('%nickname%').join(victim.nickname ? victim.nickname : victim.user.username), '[moderation] ' + localize('moderation', 'mute-audit-log-reason', { u: user.user.tag, r: reason })).catch(() => { @@ -54,7 +54,7 @@ async function moderationAction(client, type, user, victim, reason, additionalDa '%reason%': reason, '%user%': user.user.tag })); - await victim.setNickname(victim.user.username, '[moderation] ' + localize('moderation', 'unmute-audit-log-reason', { + if (moduleConfig['changeNicknameOnQuarantine']) await victim.setNickname(victim.user.username, '[moderation] ' + localize('moderation', 'unmute-audit-log-reason', { u: user.user.tag, r: reason })); @@ -96,7 +96,7 @@ async function moderationAction(client, type, user, victim, reason, additionalDa u: user.user.tag, r: reason })); - await victim.setNickname(moduleConfig['changeNicknameOnQuarantine'] ? moduleConfig['changeNicknameOnQuarantine'].split('%nickname%').join(victim.nickname ? victim.nickname : victim.user.username) : victim.nickname, '[moderation] ' + localize('moderation', 'quarantine-audit-log-reason', { + if (moduleConfig['changeNicknameOnQuarantine']) await victim.setNickname(moduleConfig['changeNicknameOnQuarantine'].split('%nickname%').join(victim.nickname ? victim.nickname : victim.user.username), '[moderation] ' + localize('moderation', 'quarantine-audit-log-reason', { u: user.user.tag, r: reason })).catch(() => { @@ -121,7 +121,7 @@ async function moderationAction(client, type, user, victim, reason, additionalDa '%reason%': reason, '%user%': user.user.tag })); - await victim.setNickname(victim.user.username).catch(() => { + if (moduleConfig['changeNicknameOnQuarantine']) await victim.setNickname(victim.user.username).catch(() => { }); break; case 'kick': diff --git a/modules/moderation/module.json b/modules/moderation/module.json index 7714493e..9fe6fd3d 100644 --- a/modules/moderation/module.json +++ b/modules/moderation/module.json @@ -1,14 +1,10 @@ { "name": "moderation", - "humanReadableName-de": "Moderation & Sicherheit", - "humanReadableName-en": "Moderation & Security", "author": { "scnxOrgID": "1", "name": "SCDerox (SC Network Team)", "link": "https://github.com/SCDerox" }, - "description-de": "Fortgeschrittenes Moderation- und Sicherheit-System mit vielen Funktionen", - "description-en": "Advanced security- and moderation-system with tons of features", "commands-dir": "/commands", "events-dir": "/events", "models-dir": "/models", @@ -24,5 +20,13 @@ "tags": [ "moderation" ], - "openSourceURL": "https://github.com/SCNetwork/CustomDCBot/tree/main/modules/moderation" + "openSourceURL": "https://github.com/SCNetwork/CustomDCBot/tree/main/modules/moderation", + "humanReadableName": { + "en": "Moderation & Security", + "de": "Moderation & Sicherheit" + }, + "description": { + "en": "Advanced security- and moderation-system with tons of features", + "de": "Fortgeschrittenes Moderation- und Sicherheit-System mit vielen Funktionen" + } } diff --git a/modules/partner-list/commands/partner.js b/modules/partner-list/commands/partner.js index 2ed91aa5..204e0d73 100644 --- a/modules/partner-list/commands/partner.js +++ b/modules/partner-list/commands/partner.js @@ -203,6 +203,8 @@ module.exports.config = { description: localize('partner-list', 'pedit-owner-description') }, { + + type: 'USER', name: 'staff', description: localize('partner-list', 'pedit-staff-description') diff --git a/modules/partner-list/config.json b/modules/partner-list/config.json index 71afcdd0..0c51a6e6 100644 --- a/modules/partner-list/config.json +++ b/modules/partner-list/config.json @@ -1,7 +1,10 @@ { + "description": {}, + "humanName": { + "en": "Configuration", + "de": "Konfiguration" + }, "filename": "config.json", - "humanname-de": "Konfiguration", - "humanname-en": "Configuration", "commandsWarnings": { "normal": [ "/partner" @@ -9,177 +12,199 @@ }, "content": [ { - "field_name": "channelID", - "default": "", - "type": "channelID", - "description": "Channel-ID to run all operations in it", - "humanname-de": "Kanal-ID", - "description-de": "Kanal-ID, in welchem alle Aktionen ausgeführt werden", - "params-de": {}, - "default-de": "" + "name": "channelID", + "humanName": { + "de": "Kanal-ID" + }, + "default": { + "en": "" + }, + "description": { + "en": "Channel-ID to run all operations in it", + "de": "Kanal-ID, in welchem alle Aktionen ausgeführt werden" + }, + "type": "channelID" }, { - "field_name": "embed", + "name": "embed", + "humanName": { + "de": "Partner-Embed" + }, + "default": { + "en": { + "title": "Our partners", + "description": "You can find all of our partners here - If you want to be one of our partners message a staff member!", + "partner-string": "#%id%: [%name%](%invite%) (<@%userID%>)", + "color": "GREEN" + }, + "de": { + "title": "Unsere Partner", + "description": "Hier findest du alles über unsere Partner - Wenn du selbst Partner werden möchtest kontaktiere eins unserer Teammitglieder!", + "partner-string": "#%id%: [%name%](%invite%) (<@%userID%>)", + "color": "GREEN" + } + }, + "description": { + "en": "Configuration of the partnership-embed", + "de": "Konfiguration des Partner-Embeds" + }, "type": "keyed", - "description": "Configuration of the partnership-embed", "content": { "key": "string", "value": "string" }, - "default": { - "title": "Our partners", - "description": "You can find all of our partners here - If you want to be one of our partners message a staff member!", - "partner-string": "#%id%: [%name%](%invite%) (<@%userID%>)", - "color": "GREEN" - }, "disableKeyEdits": true, - "humanname-de": "Partner-Embed", - "description-de": "Konfiguration des Partner-Embeds", - "params-de": [ - { - "name": "%invite%", - "description": "Konfigurierter Invite des Partner-Servers (nur für \"partner-string\" Feld)" - }, - { - "name": "%name%", - "description": "Konfigurierter Name des Partner-Servers (nur für \"partner-string\" Feld)" - }, - { - "name": "%userID%", - "description": "Konfigurierter Owner-ID des Partner-Servers (nur für \"partner-string\" Feld)" - }, - { - "name": "%teamMemberID%", - "description": "ID des Nutzers, der den Partner-Server eingetragen hat (nur für \"partner-string\" Feld)" - } - ], "params": [ { - "name": "%invite%", - "description": "Configured invite to the partner-server (only for \"partner-string\" field)" + "name": "invite", + "description": { + "en": "Configured invite to the partner-server (only for \"partner-string\" field)", + "de": "Konfigurierter Invite des Partner-Servers (nur für \"partner-string\" Feld)" + } }, { - "name": "%name%", - "description": "Configured name to the partner-server (only for \"partner-string\" field)" + "name": "name", + "description": { + "en": "Configured name to the partner-server (only for \"partner-string\" field)", + "de": "Konfigurierter Name des Partner-Servers (nur für \"partner-string\" Feld)" + } }, { - "name": "%userID%", - "description": "Configured owner-ID to the partner-server (only for \"partner-string\" field)" + "name": "userID", + "description": { + "en": "Configured owner-ID to the partner-server (only for \"partner-string\" field)", + "de": "Konfigurierter Owner-ID des Partner-Servers (nur für \"partner-string\" Feld)" + } }, { - "name": "%teamMemberID%", - "description": "User who added this partner-server (only for \"partner-string\" field)" + "name": "teamMemberID", + "description": { + "en": "User who added this partner-server (only for \"partner-string\" field)", + "de": "ID des Nutzers, der den Partner-Server eingetragen hat (nur für \"partner-string\" Feld)" + } } - ], - "default-de": { - "title": "Unsere Partner", - "description": "Hier findest du alles über unsere Partner - Wenn du selbst Partner werden möchtest kontaktiere eins unserer Teammitglieder!", - "partner-string": "#%id%: [%name%](%invite%) (<@%userID%>)", - "color": "GREEN" - } + ] }, { - "field_name": "categories", + "name": "categories", + "humanName": { + "de": "Kategorien" + }, + "default": { + "en": [ + "Normal Partners", + "Kooperation", + "Small Partners" + ], + "de": [ + "Normale Partner", + "Kooperation", + "Kleine Partner" + ] + }, + "description": { + "en": "Please specify each category here", + "de": "Bitte liste jede Kategorie hier auf" + }, "type": "array", - "description": "Please specify each category here", - "content": "string", - "default": [ - "Normal Partners", - "Kooperation", - "Small Partners" - ], - "humanname-de": "Kategorien", - "description-de": "Bitte liste jede Kategorie hier auf", - "params-de": {}, - "default-de": [ - "Normale Partner", - "Kooperation", - "Kleine Partner" - ] + "content": "string" }, { - "field_name": "category-roles", + "name": "category-roles", + "humanName": { + "de": "Kategorie-Rollen" + }, + "default": { + "en": {}, + "de": {} + }, + "description": { + "en": "(optional) Role which should be given for a partner in a specific category", + "de": "(optional) Rolle welche Partner in einer bestimmten Kategorie gegeben werden soll" + }, "type": "keyed", - "description": "(optional) Role which should be given for a partner in a specific category", "content": { "key": "string", "value": "roleID" - }, - "default": {}, - "humanname-de": "Kategorie-Rollen", - "description-de": "(optional) Rolle welche Partner in einer bestimmten Kategorie gegeben werden soll", - "params-de": {}, - "default-de": {} + } }, { - "field_name": "sendNotificationToPartner", - "type": "boolean", - "default": false, - "description": "If enabled, the bot is going to send a DM to the partner when they get added or removed", - "humanname-de": "Partner-Benachrichtigung", - "description-de": "Wenn aktiviert, sendet der Bot eine PN an Partner, wenn sie hinzugefügt oder entfernt werden", - "params-de": {}, - "default-de": false + "name": "sendNotificationToPartner", + "humanName": { + "de": "Partner-Benachrichtigung" + }, + "default": { + "en": false + }, + "description": { + "en": "If enabled, the bot is going to send a DM to the partner when they get added or removed", + "de": "Wenn aktiviert, sendet der Bot eine PN an Partner, wenn sie hinzugefügt oder entfernt werden" + }, + "type": "boolean" }, { - "field_name": "newPartnerDM", + "name": "newPartnerDM", + "humanName": { + "de": "Partner-Hinzufügungs-PN" + }, + "default": { + "en": "Hello, Hello! You are now a partner - congratulations", + "de": "Hi. Du bist jetzt Partner - Herzlichen Glückwunsch" + }, + "description": { + "en": "This message gets send to the partner (if enabled)", + "de": "Diese Nachricht wird an den Partner gesendet (wenn aktiviert)" + }, "type": "string", "allowEmbed": true, - "default": "Hello, Hello! You are now a partner - congratulations", - "description": "This message gets send to the partner (if enabled)", "params": [ { - "name": "%name%", - "description": "Name of the added partner" + "name": "name", + "description": { + "en": "Name of the added partner", + "de": "Name des hinzugefügten Partners" + } }, { - "name": "%category%", - "description": "Category of the partner" + "name": "category", + "description": { + "en": "Category of the partner", + "de": "Kategorie des Partners" + } } - ], - "humanname-de": "Partner-Hinzufügungs-PN", - "description-de": "Diese Nachricht wird an den Partner gesendet (wenn aktiviert)", - "params-de": [ - { - "name": "%name%", - "description": "Name des hinzugefügten Partners" - }, - { - "name": "%category%", - "description": "Kategorie des Partners" - } - ], - "default-de": "Hi. Du bist jetzt Partner - Herzlichen Glückwunsch" + ] }, { - "field_name": "byePartnerDM", + "name": "byePartnerDM", + "humanName": { + "de": "Partner-Entfernungs-PN" + }, + "default": { + "en": "Sorry, but you are no longer a partner ):", + "de": "Leider bist du nicht länger Partner ):" + }, + "description": { + "en": "This message gets send to the partner (if enabled)", + "de": "Diese Nachricht wird an den Partner gesendet (wenn aktiviert)" + }, "type": "string", "allowEmbed": true, - "default": "Sorry, but you are no longer a partner ):", - "description": "This message gets send to the partner (if enabled)", "params": [ { - "name": "%name%", - "description": "Name of the added partner" + "name": "name", + "description": { + "en": "Name of the added partner", + "de": "Name des hinzugefügten Partners" + } }, { - "name": "%category%", - "description": "Category of the partner" + "name": "category", + "description": { + "en": "Category of the partner", + "de": "Kategorie des Partners" + } } - ], - "humanname-de": "Partner-Entfernungs-PN", - "description-de": "Diese Nachricht wird an den Partner gesendet (wenn aktiviert)", - "params-de": [ - { - "name": "%name%", - "description": "Name des hinzugefügten Partners" - }, - { - "name": "%category%", - "description": "Kategorie des Partners" - } - ], - "default-de": "Leider bist du nicht länger Partner ):" + ] } ] } \ No newline at end of file diff --git a/modules/partner-list/module.json b/modules/partner-list/module.json index 1397473c..8cb47108 100644 --- a/modules/partner-list/module.json +++ b/modules/partner-list/module.json @@ -1,20 +1,27 @@ { "name": "partner-list", - "humanReadableName-de": "Partner-Liste", - "humanReadableName-en": "Partner-List", "fa-icon": "fas fa-list-ul", "author": { "scnxOrgID": "1", - "name": "SCDerox (SC Network Team)", "link": "https://github.com/SCDerox" + "name": "SCDerox (SC Network Team)", + "link": "https://github.com/SCDerox" }, "openSourceURL": "https://github.com/SCNetwork/CustomDCBot/tree/main/modules/partnerlist", - "description-en": "Manage your partnerships with other guilds easily.", - "description-de": "Erstelle eine Liste mit allen Partnern deines Servers - nach Kategorie sortiert.", "events-dir": "/events", "commands-dir": "/commands", "models-dir": "/models", "config-example-files": [ "config.json" ], - "tags": ["administration"] -} \ No newline at end of file + "tags": [ + "administration" + ], + "humanReadableName": { + "en": "Partner-List", + "de": "Partner-Liste" + }, + "description": { + "en": "Manage your partnerships with other guilds easily.", + "de": "Erstelle eine Liste mit allen Partnern deines Servers - nach Kategorie sortiert." + } +} diff --git a/modules/ping-on-vc-join/config.json b/modules/ping-on-vc-join/config.json index 37ba07c2..f0a18dfd 100644 --- a/modules/ping-on-vc-join/config.json +++ b/modules/ping-on-vc-join/config.json @@ -1,98 +1,122 @@ { + "description": {}, + "humanName": { + "en": "Configuration", + "de": "Konfiguration" + }, "filename": "config.json", - "humanname-de": "Konfiguration", - "humanname-en": "Configuration", "configElements": true, "content": [ { - "field_name": "channels", - "default": [], + "name": "channels", + "humanName": { + "en": "Channels", + "de": "Auslöserkanäle" + }, + "default": { + "en": [], + "de": [] + }, + "description": { + "en": "Channel-ID in which this messages should get triggered", + "de": "Kanäle, bei denen der Bot reagieren soll, wenn ein Nutzer joint" + }, "type": "array", - "content": "channelID", - "description": "Channel-ID in which this messages should get triggered", - "humanname-de": "Auslöserkanal", - "description-de": "Kanäle, bei denen der Bot reagieren soll, wenn ein Nutzer joint", - "params-de": {}, - "default-de": [] + "content": "channelID" }, { - "field_name": "message", - "default": "The user %tag% joined the voicechat %vc%", - "allowEmbed": true, - "description": "Here you can set the message that should be send if someone joins a selected voicechat", + "name": "message", + "humanName": { + "de": "Nachricht" + }, + "default": { + "en": "The user %tag% joined the voicechat %vc%", + "de": "Der Nutzer %tag% ist dem Voicechat %vc% beigetreten.n" + }, + "description": { + "en": "Here you can set the message that should be send if someone joins a selected voicechat", + "de": "Hier kannst du die Nachricht einstellen, die gesendet werden soll, wenn jemand dem Sprachkanal beitritt" + }, "type": "string", - "parms": [ - { - "name": "%tag%", - "description": "Tag of the user" - }, - { - "name": "%vc%", - "description": "Name of the voicechat" - }, - { - "name": "%mention%", - "description": "Mention of the user" - } - ], - "humanname-de": "Nachricht", - "description-de": "Hier kannst du die Nachricht einstellen, die gesendet werden soll, wenn jemand dem Sprachkanal beitritt", - "params-de": [ + "allowEmbed": true, + "params": [ { - "name": "%tag%", - "description": "Tag des Nutzers" + "name": "tag", + "description": { + "en": "Tag of the user", + "de": "Tag des Nutzers" + } }, { - "name": "%vc%", - "description": "Name des Sprackkanals" + "name": "vc", + "description": { + "en": "Name of the voicechat", + "de": "Name des Sprackkanals" + } }, { - "name": "%mention%", - "description": "Erwähnung des Nutzers" + "name": "mention", + "description": { + "en": "Mention of the user", + "de": "Erwähnung des Nutzers" + } } - ], - "default-de": "Der Nutzer %tag% ist dem Voicechat %vc% beigetreten.n" + ] }, { - "field_name": "notify_channel_id", - "default": "", - "type": "channelID", - "description": "Channel where the message should be send", - "humanname-de": "Benachrichtigungskanal", - "description-de": "Kanal, in welchen die Nachricht gesendet werden soll", - "params-de": {}, - "default-de": "" + "name": "notify_channel_id", + "humanName": { + "de": "Benachrichtigungskanal" + }, + "default": { + "en": "" + }, + "description": { + "en": "Channel where the message should be send", + "de": "Kanal, in welchen die Nachricht gesendet werden soll" + }, + "type": "channelID" }, { - "field_name": "send_pn_to_member", - "default": false, - "type": "boolean", - "description": "Should the bot send a PN to the member?", - "humanname-de": "Join-PN", - "description-de": "Soll der Bot eine PN an den Nutzer schicken?", - "params-de": {}, - "default-de": false + "name": "send_pn_to_member", + "humanName": { + "en": "Join-DM", + "de": "Join-PN" + }, + "default": { + "en": false + }, + "description": { + "en": "Should the bot send a PN to the member?", + "de": "Soll der Bot eine PN an den Nutzer schicken?" + }, + "type": "boolean" }, { - "field_name": "pn_message", - "default": "Hi, I saw you joined the voice chat %vc%. Nice (;", - "allowEmbed": true, + "name": "pn_message", + "humanName": { + "en": "Join-DM-Message", + "de": "Join-PN-Nachricht" + }, + "default": { + "en": "Hi, I saw you joined the voice chat %vc%. Nice (;", + "de": "Hi, ich habe gesehen, dass du %vc% beigetreten bist. Nice (;" + }, + "description": { + "de": "Diese Nachricht wird an den Nutzer versandt, wenn er einem Voicechat beitritt (wenn \"Join-PN\" aktiviert ist)." + }, "type": "string", - "parms": [ - { - "name": "%vc%", - "description": "Name of the voicechat" - } - ], - "humanname-de": "Join-PN-Nachricht", - "description-de": "Diese Nachricht wird an den Nutzer versandt, wenn er einem Voicechat beitritt (wenn \"Join-PN\" aktiviert ist).", - "params-de": [ + "dependsOn": "send_pn_to_member", + "allowEmbed": true, + "params": [ { - "name": "%vc%", - "description": "Name des Sprachkanals" + "name": "vc", + "description": { + "en": "Name of the voicechat", + "de": "Name des Sprachkanals" + } } - ], - "default-de": "Hi, ich habe gesehen, dass du %vc% beigetreten bist. Nice (;" + ] } ] -} +} \ No newline at end of file diff --git a/modules/ping-on-vc-join/module.json b/modules/ping-on-vc-join/module.json index 9e9cc2d3..c1d1cb6e 100644 --- a/modules/ping-on-vc-join/module.json +++ b/modules/ping-on-vc-join/module.json @@ -1,17 +1,24 @@ { "name": "ping-on-vc-join", - "humanReadableName-en": "Ping-On-VC-Join", "author": { "scnxOrgID": "1", - "name": "SCDerox (SC Network Team)", "link": "https://github.com/SCDerox" + "name": "SCDerox (SC Network Team)", + "link": "https://github.com/SCDerox" }, "openSourceURL": "https://github.com/SCNetwork/CustomDCBot/tree/main/modules/ping-on-vc-join", - "description-en": "Sends a message when someone joins a voicechat", - "description-de": "Sendet eine PN an den Nutzer und/oder informiert das Team, wenn ein Nutzer einem bestimmten Voicechat beitritt", "fa-icon": "fas fa-sign-in-alt", "events-dir": "/events", "config-example-files": [ "config.json" ], - "tags": ["support"] -} \ No newline at end of file + "tags": [ + "support" + ], + "humanReadableName": { + "en": "Ping-On-VC-Join" + }, + "description": { + "en": "Sends a message when someone joins a voicechat", + "de": "Sendet eine PN an den Nutzer und/oder informiert das Team, wenn ein Nutzer einem bestimmten Voicechat beitritt" + } +} diff --git a/modules/polls/configs/config.json b/modules/polls/configs/config.json index 9f427fab..34d68e51 100644 --- a/modules/polls/configs/config.json +++ b/modules/polls/configs/config.json @@ -1,9 +1,13 @@ { + "description": { + "en": "Configure the function of the module here", + "de": "Stelle hier die Funktionen des Modules ein" + }, + "humanName": { + "en": "Configuration", + "de": "Konfiguration" + }, "filename": "config.json", - "humanname-de": "Konfiguration", - "humanname-en": "Configuration", - "description-en": "Configure the function of the module here", - "description-de": "Stelle hier die Funktionen des Modules ein", "commandsWarnings": { "normal": [ "/poll" @@ -11,39 +15,44 @@ }, "content": [ { - "field_name": "reactions", - "type": "keyed", - "disableKeyEdits": true, + "name": "reactions", + "humanName": { + "de": "Reaktionen" + }, "default": { - "1": "1️⃣", - "2": "2️⃣", - "3": "3️⃣", - "4": "4️⃣", - "5": "5️⃣", - "6": "6️⃣", - "7": "7️⃣", - "8": "8️⃣", - "9": "9️⃣" + "en": { + "1": "1️⃣", + "2": "2️⃣", + "3": "3️⃣", + "4": "4️⃣", + "5": "5️⃣", + "6": "6️⃣", + "7": "7️⃣", + "8": "8️⃣", + "9": "9️⃣" + }, + "de": { + "1": "1️⃣", + "2": "2️⃣", + "3": "3️⃣", + "4": "4️⃣", + "5": "5️⃣", + "6": "6️⃣", + "7": "7️⃣", + "8": "8️⃣", + "9": "9️⃣" + } + }, + "description": { + "en": "You can set the different reactions to use", + "de": "Du kannst die verschiedenen Reaktionen, die benutzt werden sollen, einstellen" }, + "type": "keyed", "content": { "key": "string", "value": "string" }, - "description": "You can set the different reactions to use", - "humanname-de": "Reaktionen", - "description-de": "Du kannst die verschiedenen Reaktionen, die benutzt werden sollen, einstellen", - "params-de": {}, - "default-de": { - "1": "1️⃣", - "2": "2️⃣", - "3": "3️⃣", - "4": "4️⃣", - "5": "5️⃣", - "6": "6️⃣", - "7": "7️⃣", - "8": "8️⃣", - "9": "9️⃣" - } + "disableKeyEdits": true } ] -} \ No newline at end of file +} diff --git a/modules/polls/configs/strings.json b/modules/polls/configs/strings.json index e0fbdb58..111d043a 100644 --- a/modules/polls/configs/strings.json +++ b/modules/polls/configs/strings.json @@ -1,42 +1,51 @@ { + "description": { + "en": "Edit the messages and strings of the module here", + "de": "Stelle hier die Nachrichten des Modules ein" + }, + "humanName": { + "en": "Nachrichten", + "de": "Nachrichten" + }, "filename": "strings.json", - "humanname-de": "Nachrichten", - "humanname-en": "Nachrichten", - "description-en": "Edit the messages and strings of the module here", - "description-de": "Stelle hier die Nachrichten des Modules ein", "content": [ { - "field_name": "embed", - "description": "You can edit the settings of your embed here", + "name": "embed", + "humanName": { + "de": "Embed" + }, + "default": { + "en": { + "title": "New Poll", + "color": "BLUE", + "options": "Today's options", + "liveView": "Live-Views of the results", + "expiresOn": "End of this poll", + "thisPollExpiresOn": "This poll expires on %date%.", + "endedPollTitle": "Poll ended", + "endedPollColor": "RED" + }, + "de": { + "title": "Neue Umfrage", + "color": "BLUE", + "options": "Heutige Auswahlmöglichkeiten", + "liveView": "Live-Anzeige der Ergebnisse", + "expiresOn": "Ende dieser Umfrage", + "thisPollExpiresOn": "Diese Umfrage endet am %date%.", + "endedPollTitle": "Umfrage beendet", + "endedPollColor": "RED" + } + }, + "description": { + "en": "You can edit the settings of your embed here", + "de": "Du kannst die Einstellungen des Embeds hier bearbeiten" + }, "type": "keyed", "content": { "key": "string", "value": "string" }, - "disableKeyEdits": true, - "default": { - "title": "New Poll", - "color": "BLUE", - "options": "Today's options", - "liveView": "Live-Views of the results", - "expiresOn": "End of this poll", - "thisPollExpiresOn": "This poll expires on %date%.", - "endedPollTitle": "Poll ended", - "endedPollColor": "RED" - }, - "humanname-de": "Embed", - "description-de": "Du kannst die Einstellungen des Embeds hier bearbeiten", - "params-de": {}, - "default-de": { - "title": "Neue Umfrage", - "color": "BLUE", - "options": "Heutige Auswahlmöglichkeiten", - "liveView": "Live-Anzeige der Ergebnisse", - "expiresOn": "Ende dieser Umfrage", - "thisPollExpiresOn": "Diese Umfrage endet am %date%.", - "endedPollTitle": "Umfrage beendet", - "endedPollColor": "RED" - } + "disableKeyEdits": true } ] -} \ No newline at end of file +} diff --git a/modules/polls/module.json b/modules/polls/module.json index 0e72f4c0..9954b0ea 100644 --- a/modules/polls/module.json +++ b/modules/polls/module.json @@ -1,14 +1,13 @@ { "name": "polls", - "humanReadableName-de": "Umfragen", - "humanReadableName-en": "Polls", "author": { "scnxOrgID": "1", "name": "SCDerox (SC Network Team)", "link": "https://github.com/SCDerox" }, - "description-en": "Simple module to create fresh polls on your server!", - "description": "Einfaches Modul, um coole Umfragen auf deinem Server zu erstellen", + "description": { + "en": "Simple module to create fresh polls on your server!" + }, "events-dir": "/events", "commands-dir": "/commands", "models-dir": "/models", @@ -20,5 +19,9 @@ "tags": [ "community" ], - "openSourceURL": "https://github.com/SCNetwork/CustomDCBot/tree/main/modules/polls" + "openSourceURL": "https://github.com/SCNetwork/CustomDCBot/tree/main/modules/polls", + "humanReadableName": { + "en": "Polls", + "de": "Umfragen" + } } diff --git a/modules/serverinfo/configs/config.json b/modules/serverinfo/configs/config.json index 42eadbec..7d4b793b 100644 --- a/modules/serverinfo/configs/config.json +++ b/modules/serverinfo/configs/config.json @@ -1,39 +1,55 @@ { + "description": { + "en": "Configure the function of the module here", + "de": "Stelle hier die Funktionen des Modules ein" + }, + "humanName": { + "en": "Configuration", + "de": "Konfiguration" + }, "filename": "config.json", - "humanname-de": "Konfiguration", - "humanname-en": "Configuration", - "description-en": "Configure the function of the module here", - "description-de": "Stelle hier die Funktionen des Modules ein", "content": [ { - "field_name": "channelID", - "humanname-en": "Channel", - "default": "", - "type": "channelID", - "description-en": "ID of the channel this module should operate in", - "description-de": "ID des Channels, in welchem die Nachricht gesendet und bearbeitet werden soll" + "name": "channelID", + "humanName": { + "en": "Channel" + }, + "default": { + "en": "" + }, + "description": { + "en": "ID of the channel this module should operate in", + "de": "ID des Channels, in welchem die Nachricht gesendet und bearbeitet werden soll" + }, + "type": "channelID" }, { - "field_name": "embed", - "humanname-en": "Embed", - "default-en": { - "title": "Information about this guild", - "description": "You can find some basic information about our guild here", - "color": "GREEN" + "name": "embed", + "humanName": { + "en": "Embed" }, - "default-de": { - "title": "Informationen über diesen Server", - "description": "Hier kannst du alle Informationen über unseren Server finden", - "color": "GREEN" + "default": { + "en": { + "title": "Information about this guild", + "description": "You can find some basic information about our guild here", + "color": "GREEN" + }, + "de": { + "title": "Informationen über diesen Server", + "description": "Hier kannst du alle Informationen über unseren Server finden", + "color": "GREEN" + } + }, + "description": { + "en": "You can configure some of the parameters of the embed here", + "de": "Du kannst hier einige Teile des Embeds anpassen" }, "type": "keyed", - "description-de": "Du kannst hier einige Teile des Embeds anpassen", - "description-en": "You can configure some of the parameters of the embed here", - "disableKeyEdits": true, "content": { "key": "string", "value": "string" - } + }, + "disableKeyEdits": true } ] } \ No newline at end of file diff --git a/modules/serverinfo/configs/fields.json b/modules/serverinfo/configs/fields.json index 4065415c..6a97ddea 100644 --- a/modules/serverinfo/configs/fields.json +++ b/modules/serverinfo/configs/fields.json @@ -1,153 +1,159 @@ { + "description": { + "en": "Change the Embed-Fields of the serverinfo-embed here", + "de": "Stelle hier die Felder des Serverinfo-Embeds ein" + }, + "humanName": { + "en": "Embed-Fields", + "de": "Embed-Felder" + }, "filename": "fields.json", "configElements": true, - "humanname-de": "Embed-Felder", - "humanname-en": "Embed-Fields", - "description-de": "Stelle hier die Felder des Serverinfo-Embeds ein", - "description-en": "Change the Embed-Fields of the serverinfo-embed here", "content": [ { - "field_name": "name", - "default": "", - "humanname-de": "Feldname", - "humanname-en": "Feld-Name", - "description-de": "Name des Feldes", - "description-en": "Name of the field", + "name": "name", + "humanName": { + "en": "Feld-Name", + "de": "Feldname" + }, + "default": { + "en": "" + }, + "description": { + "en": "Name of the field", + "de": "Name des Feldes" + }, "type": "string" }, { - "field_name": "content", - "humanname-de": "Feldinhalt", - "humanname-en": "Field-Content", - "description-en": "Content of this field", - "description-de": "Inhalt dieses Feldes", - "default": "", + "name": "content", + "humanName": { + "en": "Field-Content", + "de": "Feldinhalt" + }, + "default": { + "en": "" + }, + "description": { + "en": "Content of this field", + "de": "Inhalt dieses Feldes" + }, "type": "string", - "params-de": [ + "params": [ { - "name": "%memberCount%", - "description": "Anzahl von Mitgliedern auf deinem Server" + "name": "memberCount", + "description": { + "en": "Member-Count of this guild", + "de": "Anzahl von Mitgliedern auf deinem Server" + } }, { - "name": "%botCount%", - "description": "Anzahl von Bots auf deinem Server" + "name": "botCount", + "description": { + "en": "Bot-Count of this guild", + "de": "Anzahl von Bots auf deinem Server" + } }, { - "name": "%userCount%", - "description": "Anzahl von Nutzern auf deinem Server" + "name": "userCount", + "description": { + "en": "User-Count of this guild", + "de": "Anzahl von Nutzern auf deinem Server" + } }, { - "name": "%onlineMemberCount%", - "description": "Anzahl von online Mitgliern auf deinem Server" + "name": "onlineMemberCount", + "description": { + "en": "Count of online members on this guild", + "de": "Anzahl von online Mitgliern auf deinem Server" + } }, { - "name": "%daysSinceCreation%", - "description": "Anzahl von vergangenen Tagen seit Erstellung deines Servers" + "name": "daysSinceCreation", + "description": { + "en": "Count of days passed since the creation of this guild", + "de": "Anzahl von vergangenen Tagen seit Erstellung deines Servers" + } }, { - "name": "%guildCreationTimestamp%", - "description": "Datum und Uhrzeit, wenn der Server erstellt wurde" + "name": "guildCreationTimestamp", + "description": { + "en": "Show when the guild was created", + "de": "Datum und Uhrzeit, wenn der Server erstellt wurde" + } }, { - "name": "%guildBoosts%", - "description": "Zeigt die Anzahl von Boots auf dem Server an" + "name": "guildBoosts", + "description": { + "en": "Show how often this guild was boosted", + "de": "Zeigt die Anzahl von Boots auf dem Server an" + } }, { - "name": "%boostLevel%", - "description": "Zeigt das aktuelle Boost-Level des Servers an" + "name": "boostLevel", + "description": { + "en": "Shows the current boost-level of this guild", + "de": "Zeigt das aktuelle Boost-Level des Servers an" + } }, { - "name": "%boosterCount%", - "description": "Anzahl von Boostern auf deinem Server" + "name": "boosterCount", + "description": { + "en": "Count of boosters on this guild", + "de": "Anzahl von Boostern auf deinem Server" + } }, { - "name": "%guildRegion%", - "description": "Discord-Region deines Servers" + "name": "guildRegion", + "description": { + "en": "Region of this guild", + "de": "Discord-Region deines Servers" + } }, { - "name": "%channelCount%", - "description": "Anzahl von Channeln auf deinem Server" + "name": "channelCount", + "description": { + "en": "Count of channels on this guild", + "de": "Anzahl von Channeln auf deinem Server" + } }, { - "name": "%roleCount%", - "description": "Anzahl von Rollen auf deinem Server" + "name": "roleCount", + "description": { + "en": "Count of roles on this guild", + "de": "Anzahl von Rollen auf deinem Server" + } }, { - "name": "%emojiCount%", - "description": "Anzahl von Emojis auf deinem Server" + "name": "emojiCount", + "description": { + "en": "Count of emojis on this guild", + "de": "Anzahl von Emojis auf deinem Server" + } }, { - "name": "%newline%", - "description": "Fügt eine neue Zeile ein (wie der Name schon sagt)" - } - ], - "params-en": [ - { - "name": "%memberCount%", - "description": "Member-Count of this guild" - }, - { - "name": "%botCount%", - "description": "Bot-Count of this guild" - }, - { - "name": "%userCount%", - "description": "User-Count of this guild" - }, - { - "name": "%onlineMemberCount%", - "description": "Count of online members on this guild" - }, - { - "name": "%daysSinceCreation%", - "description": "Count of days passed since the creation of this guild" - }, - { - "name": "%guildCreationTimestamp%", - "description": "Show when the guild was created" - }, - { - "name": "%guildBoosts%", - "description": "Show how often this guild was boosted" - }, - { - "name": "%boostLevel%", - "description": "Shows the current boost-level of this guild" - }, - { - "name": "%boosterCount%", - "description": "Count of boosters on this guild" - }, - { - "name": "%guildRegion%", - "description": "Region of this guild" - }, - { - "name": "%channelCount%", - "description": "Count of channels on this guild" - }, - { - "name": "%roleCount%", - "description": "Count of roles on this guild" - }, - { - "name": "%emojiCount%", - "description": "Count of emojis on this guild" - }, - { - "name": "%newline%", - "description": "Inserts a new line" + "name": "newline", + "description": { + "en": "Inserts a new line", + "de": "Fügt eine neue Zeile ein (wie der Name schon sagt)" + } } ] }, { - "field_name": "inline", - "humanname-de": "In-Zeilen-Feld?", - "humanname-en": "Inline Field?", - "description-en": "If enabled the field will be inlined", - "description-de": "Wenn aktiviert wird das Feld bei Discord in einer Zeile mit anderen Feldern angezeigt", - "type": "boolean", - "default": false + "name": "inline", + "humanName": { + "en": "Inline Field?", + "de": "In-Zeilen-Feld?" + }, + "default": { + "en": false + }, + "description": { + "en": "If enabled the field will be inlined", + "de": "Wenn aktiviert wird das Feld bei Discord in einer Zeile mit anderen Feldern angezeigt" + }, + "type": "boolean" } ] } \ No newline at end of file diff --git a/modules/serverinfo/module.json b/modules/serverinfo/module.json index 0884a674..6a3b8077 100644 --- a/modules/serverinfo/module.json +++ b/modules/serverinfo/module.json @@ -1,19 +1,26 @@ { "name": "serverinfo", - "humanReadableName-de": "Serverinformationen", - "humanReadableName-en": "Server-Information-Channel", "fa-icon": "fas fa-info-circle", "author": { "scnxOrgID": "1", - "name": "SCDerox (SC Network Team)", "link": "https://github.com/SCDerox" + "name": "SCDerox (SC Network Team)", + "link": "https://github.com/SCDerox" }, "openSourceURL": "https://github.com/SCNetwork/CustomDCBot/tree/main/modules/serverinfo", - "description-en": "Simple module to have a channel with a message that shows the users some information about your guild", - "description-de": "Fortgeschrittenes Modul, um einen Channel zu erstellen, in dem Server-Informationen als Embed angezeigt werden", "events-dir": "/events", "config-example-files": [ "configs/config.json", "configs/fields.json" ], - "tags": ["community"] -} \ No newline at end of file + "tags": [ + "community" + ], + "humanReadableName": { + "en": "Server-Information-Channel", + "de": "Serverinformationen" + }, + "description": { + "en": "Simple module to have a channel with a message that shows the users some information about your guild", + "de": "Fortgeschrittenes Modul, um einen Channel zu erstellen, in dem Server-Informationen als Embed angezeigt werden" + } +} diff --git a/modules/status-roles/configs/config.json b/modules/status-roles/configs/config.json index 690c2def..36d2fb0d 100644 --- a/modules/status-roles/configs/config.json +++ b/modules/status-roles/configs/config.json @@ -1,44 +1,62 @@ { + "description": { + "en": "Configure the function of the module here", + "de": "Stelle hier die Funktionen des Modules ein" + }, + "humanName": { + "en": "Configuration", + "de": "Konfiguration" + }, "filename": "config.json", - "humanname-de": "Konfiguration", - "humanname-en": "Configuration", - "description-en": "Configure the function of the module here", - "description-de": "Stelle hier die Funktionen des Modules ein", "content": [ { - "field_name": "words", - "humanname-en": "Words", - "humanname-de": "Statusinhalt", - "default": [], + "name": "words", + "humanName": { + "en": "Words", + "de": "Statusinhalt" + }, + "default": { + "en": [], + "de": [] + }, + "description": { + "en": "Words users should have in their status.", + "de": "Wörter, die Nutzer in ihrem Status haben sollen." + }, "type": "array", - "content": "string", - "description-en": "Words users should have in their status.", - "description-de": "Wörter, die Nutzer in ihrem Status haben sollen.", - "params-de": {}, - "default-de": [] + "content": "string" }, { - "field_name": "roles", - "humanname-en": "Roles", - "humanname-de": "Rollen", - "default": [], + "name": "roles", + "humanName": { + "en": "Roles", + "de": "Rollen" + }, + "default": { + "en": [], + "de": [] + }, + "description": { + "en": "Roles to give to users with one of the words in their status", + "de": "Rollen, die an Nutzer mit einem der Wörter im Status vergeben werden sollen" + }, "type": "array", - "content": "roleID", - "description-en": "Roles to give to users with one of the words in their status", - "description-de": "Rollen, die an Nutzer mit einem der Wörter im Status vergeben werden sollen", - "params-de": {}, - "default-de": [] + "content": "roleID" }, { - "field_name": "remove", - "humanname-en": "Remove all other roles", - "humanname-de": "Entferne alle anderen Rollen", - "default": false, - "type": "boolean", - "description-en": "Remove all other roles from users with one of the words in their status", - "description-de": "Entferne alle anderen Rollen von Nutzern mit einem der Wörter im Status", - "params-de": {}, - "default-de": [] + "name": "remove", + "humanName": { + "en": "Remove all other roles", + "de": "Entferne alle anderen Rollen" + }, + "default": { + "en": false + }, + "description": { + "en": "Remove all other roles from users with one of the words in their status", + "de": "Entferne alle anderen Rollen von Nutzern mit einem der Wörter im Status" + }, + "type": "boolean" } ] } \ No newline at end of file diff --git a/modules/status-roles/module.json b/modules/status-roles/module.json index 76b2da45..b776c619 100644 --- a/modules/status-roles/module.json +++ b/modules/status-roles/module.json @@ -1,19 +1,25 @@ { "name": "status-roles", - "humanReadableName-de": "Status-Rollen", - "humanReadableName-en": "Status-roles", "author": { "name": "hfgd", "link": "https://github.com/hfgd123", "scnxOrgID": "2" }, "openSourceURL": "https://github.com/hfgd123/CustomDCBot/tree/main/modules/status-roles", - "description-en": "Simple module to reward users who have an invite to your server in their status!", - "description-de": "Einfaches Modul, um Nutzer zu belohnen, die einen Link zu deinem Server in ihrem Status haben!", "events-dir": "/events", "config-example-files": [ "configs/config.json" ], "fa-icon": "fa-solid fa-user-tag", - "tags": ["administration"] -} \ No newline at end of file + "tags": [ + "administration" + ], + "humanReadableName": { + "en": "Status-roles", + "de": "Status-Rollen" + }, + "description": { + "en": "Simple module to reward users who have an invite to your server in their status!", + "de": "Einfaches Modul, um Nutzer zu belohnen, die einen Link zu deinem Server in ihrem Status haben!" + } +} diff --git a/modules/suggestions/config.json b/modules/suggestions/config.json index a72f8957..63fd399f 100644 --- a/modules/suggestions/config.json +++ b/modules/suggestions/config.json @@ -1,9 +1,13 @@ { + "description": { + "en": "Configure the function of the module here", + "de": "Stelle hier die Funktionen des Modules ein" + }, + "humanName": { + "en": "Configuration", + "de": "Konfiguration" + }, "filename": "config.json", - "humanname-de": "Konfiguration", - "humanname-en": "Configuration", - "description-en": "Configure the function of the module here", - "description-de": "Stelle hier die Funktionen des Modules ein", "commandsWarnings": { "normal": [ "/manage-suggestion" @@ -11,144 +15,421 @@ }, "content": [ { - "field_name": "suggestionChannel", - "type": "channelID", - "default": "", - "description": "Channel in which this module should operate", - "humanname-de": "Vorschlagskanal", - "description-de": "Kanal in dem dieses Modul arbeiten soll", - "params-de": {}, - "default-de": "" + "name": "suggestionChannel", + "humanName": { + "en": "Suggestion-Channel", + "de": "Vorschlagskanal" + }, + "default": { + "en": "" + }, + "description": { + "en": "Channel in which this module should operate", + "de": "Kanal in dem dieses Modul arbeiten soll" + }, + "type": "channelID" }, { - "field_name": "reactions", + "name": "reactions", + "humanName": { + "en": "Reactions", + "de": "Reaktionen" + }, + "default": { + "en": [], + "de": [] + }, + "description": { + "en": "Emojis with which the bot should react to a new suggestion", + "de": "Emojis mit denen der Bot auf neue Vorschläge reagieren soll" + }, "type": "array", - "description": "Emojis with which the bot should react to a new suggestion", - "default": [], - "content": "string", - "humanname-de": "Reaktionen", - "description-de": "Emojis mit denen der Bot auf neue Vorschläge reagieren soll", - "params-de": {}, - "default-de": [] + "content": "string" }, { - "field_name": "allowUserComment", - "type": "boolean", - "description": "If enabled, the bot will create thread under each suggestion", - "default": true, - "humanname-de": "Nutzerkommentare in Threads", - "humanname-en": "User-Comments in Threads", - "description-de": "Wenn aktiviert erstellt der Bot immer einen neuen Thread unter Vorschlägen", - "params-de": {}, - "default-de": true + "name": "allowUserComment", + "humanName": { + "en": "User-Comments in Threads", + "de": "Nutzerkommentare in Threads" + }, + "default": { + "en": true, + "de": true + }, + "description": { + "en": "If enabled, the bot will create thread under each suggestion", + "de": "Wenn aktiviert erstellt der Bot immer einen neuen Thread unter Vorschlägen" + }, + "type": "boolean" + }, + { + "name": "threadName", + "humanName": { + "en": "Thread-Name" + }, + "default": { + "en": "Comments", + "de": "Kommentare" + }, + "description": { + "en": "Only if \"User-Comments in Threads\" enabled; Name of the thread", + "de": "Nur wenn \"Nutzerkommentare in Threads\" aktiviert; Name des Threads" + }, + "type": "string" }, { - "field_name": "threadName", + "name": "successfullySubmitted", + "humanName": { + "en": "\"Successfully submitted\"-Message", + "de": "\"Erfolgreich eingereicht\"-Nachricht" + }, + "default": { + "en": "Suggestion %id% submitted successfully.", + "de": "Vorschlag %id% erfolgreich eingereicht." + }, + "description": { + "en": "This message gets send if a suggestion is submitted successfully.", + "de": "Diese Nachricht wird gesendet, wenn ein Vorschlag erfolgreich eingereicht wurde" + }, "type": "string", - "humanname": "Thread-Name", - "description": "Only if \"User-Comments in Threads\" enabled; Name of the thread", - "description-de": "Nur wenn \"Nutzerkommentare in Threads\" aktiviert; Name des Threads", - "default": "Comments", - "default-de": "Kommentare" + "allowEmbed": true, + "params": [ + { + "name": "id", + "description": { + "en": "ID of the suggestion", + "de": "ID des Vorschlags" + } + } + ] }, { - "field_name": "suggestionEmbed", - "type": "keyed", + "name": "notifyRole", + "humanName": { + "en": "Notification-Role", + "de": "Benachrichtigungsrolle" + }, "default": { - "title": "Suggestion #%id%", - "commentsTitle": "💬 Comments", - "awaitingAdminAnswerTitle": "Suggestion-Status", - "awaitingAnswer": "No admin answered to this suggestion yet", - "adminAnswerTitle": "Suggestion-Status: %status%" - }, - "content": { - "key": "string", - "value": "string" - }, - "disableKeyEdits": true, - "humanname-de": "Vorschlagsembed", - "description-de": "Lege hier den Aufbau der Embeds für neue Vorschläge fest", - "params-de": {}, - "default-de": { - "title": "Vorschlag #%id%", - "commentsTitle": "💬 Kommentare", - "awaitingAdminAnswerTitle": "Vorschlagsstatus", - "awaitingAnswer": "Es hat noch kein Admin auf diesen Vorschlag geantwortet", - "adminAnswerTitle": "Vorschlagssatus: %status%" - } + "en": "" + }, + "description": { + "en": "If set, this role gets pinged when a new suggestion gets created", + "de": "Wenn eine Rolle gesetzt ist, wird diese gepingt wenn ein neuer Vorschlag erstellt wird" + }, + "type": "roleID", + "allowNull": true }, { - "field_name": "successfullySubmitted", - "default": "Suggestion %id% submitted successfully.", - "description": "This message gets send if a suggestion is submitted successfully.", - "allowEmbed": true, + "name": "sendPNNotifications", + "humanName": { + "en": "Send DM-Notifications", + "de": "PN-Benachrichtigungen senden" + }, + "default": { + "en": true, + "de": true + }, + "description": { + "en": "If enabled the creator and all commentators get a notification when something changes on a suggestion", + "de": "Wenn diese Option aktiviert ist, wird der Ersteller benachrichtigt, wenn sich etwas an einem Vorschlag ändert" + }, + "type": "boolean" + }, + { + "name": "teamChange", + "humanName": { + "en": "DM-Status-Notification", + "de": "PN-Statusbenachrichtigung" + }, + "default": { + "en": "Hi, a suggestion you are subscribed to got updated by a team member - read it here %url%", + "de": "Hi, ein von dir abonnierter Vorschlag wurde von einem Teammitglied beantwortet - lese ihn hier %url%" + }, + "description": { + "en": "This message gets send to the creator and all commentators when a suggestion gets updated and sendPNNotifications is enabled", + "de": "Diese Nachricht wird an den Ersteller und alle Nutzer, die einen Kommentar geschrieben haben, gesendet, wenn ein Vorschlag aktualisiert wird und \"PN-Benachrichtigungen senden\" aktiviert ist" + }, "type": "string", + "dependsOn": "sendPNNotifications", + "allowEmbed": true, "params": [ { - "name": "%id%", - "description": "ID of the suggestion" - } - ], - "humanname-de": "Erfolgreich eingereicht", - "description-de": "Diese Nachricht wird gesendet, wenn ein Vorschlag erfolgreich eingereicht wurde", - "params-de": [ + "name": "url", + "description": { + "en": "URL to the suggestion", + "de": "URL zum Vorschlag" + } + }, { - "name": "%id%", - "description": "ID des Vorschlags" + "name": "title", + "description": { + "en": "Title of the suggestion", + "de": "Titel des Vorschlags" + } } - ], - "default-de": "Vorschlag %id% erfolgreich eingereicht." - }, - { - "field_name": "notifyRole", - "default": "", - "allowNull": true, - "type": "roleID", - "description": "If set, this role gets pinged when a new suggestion gets created", - "humanname-de": "Benachrichtigungsrolle", - "description-de": "Wenn eine Rolle gesetzt ist, wird diese gepingt wenn ein neuer Vorschlag erstellt wird", - "params-de": {}, - "default-de": "" + ] }, { - "field_name": "sendPNNotifications", - "default": true, - "type": "boolean", - "description": "If enabled the creator and all commentators get a notification when something changes on a suggestion", - "humanname-de": "PN-Benachrichtigungen senden", - "description-de": "Wenn diese Option aktiviert ist, wird der Ersteller benachrichtigt, wenn sich etwas an einem Vorschlag ändert", - "params-de": {}, - "default-de": true + "name": "unansweredSuggestion", + "humanName": { + "en": "Unanswered Suggestion-Message", + "de": "Unbeantwortete Vorschlags-Nachricht" + }, + "default": { + "en": { + "title": "Suggestion #%id%", + "description": "%suggestion%", + "color": "#F1C40F", + "thumbnail": "%avatarURL%", + "author": { + "name": "%tag%", + "img": "%avatarURL%" + }, + "fields": [ + { + "name": "Suggestion-Status", + "value": "No admin answered to this suggestion yet" + } + ] + }, + "de": { + "title": "Vorschlag #%id%", + "description": "%suggestion%", + "color": "#F1C40F", + "thumbnail": "%avatarURL%", + "author": { + "name": "%tag%", + "img": "%avatarURL%" + }, + "fields": [ + { + "name": "Vorschlagsstatus", + "value": "Es hat noch kein Admin auf diesen Vorschlag geantwortet" + } + ] + } + }, + "description": { + "en": "This will be the messages that will get send when the user creates their suggestion and no admin has responded yet", + "de": "Das wird die Nachricht sein, die gesendet wird, wenn ein Nutzer seinen Vorschlag erstellt hat und noch kein Admin darauf geantwortet hat" + }, + "type": "string", + "allowEmbed": true, + "params": [ + { + "name": "id", + "description": { + "en": "ID of the suggestion", + "de": "ID des Vorschlags" + } + }, + { + "name": "suggestion", + "description": { + "en": "Content of the suggestion", + "de": "Inhalt des Vorschlags" + } + }, + { + "name": "tag", + "description": { + "en": "Tag of the user who created this suggestion", + "de": "Tag des Users, der den Vorschlag erstellt hat" + } + }, + { + "name": "avatarURL", + "description": { + "en": "Avatar-URL of the user who created this suggestion", + "de": "Avatar-URL des Users, der den Vorschlag erstellt hat" + }, + "isImage": true + } + ] }, { - "field_name": "teamChange", - "default": "Hi, a suggestion you are subscribed to got updated by a team member - read it here %url%", - "description": "This message gets send to the creator and all commentators when a suggestion gets updated and sendPNNotifications is enabled", + "name": "deniedSuggestion", + "humanName": { + "en": "Denied Suggestion-Message", + "de": "Abgelehnte Vorschlags-Nachricht" + }, + "default": { + "en": { + "title": "Suggestion #%id%", + "description": "%suggestion%", + "color": "#E74C3C", + "thumbnail": "%avatarURL%", + "author": { + "name": "%tag%", + "img": "%avatarURL%" + }, + "fields": [ + { + "name": "Suggestion-Status: DENIED", + "value": "Denied by %adminUser% with the following reason: \"%adminMessage%\"" + } + ] + }, + "de": { + "title": "Vorschlag #%id%", + "description": "%suggestion%", + "color": "#E74C3C", + "thumbnail": "%avatarURL%", + "author": { + "name": "%tag%", + "img": "%avatarURL%" + }, + "fields": [ + { + "name": "Vorschlags-Status: ABGELEHNT", + "value": "Abgelehnt von %adminUser% mit folgendem Grund: \"%adminMessage%\"" + } + ] + } + }, + "description": { + "en": "The suggestion will be edited to this message, when an admin denies a suggestion", + "de": "Zu dieser Nachricht wird der Vorschlag editiert, wenn ein Admin den Vorschlag ablehnt" + }, + "type": "string", "allowEmbed": true, "params": [ { - "name": "%url%", - "description": "URL to the suggestion" + "name": "id", + "description": { + "en": "ID of the suggestion", + "de": "ID des Vorschlags" + } + }, + { + "name": "suggestion", + "description": { + "en": "Content of the suggestion", + "de": "Inhalt des Vorschlags" + } }, { - "name": "%title%", - "description": "Title of the suggestion" + "name": "tag", + "description": { + "en": "Tag of the user who created this suggestion", + "de": "Tag des Users, der den Vorschlag erstellt hat" + } + }, + { + "name": "avatarURL", + "description": { + "en": "Avatar-URL of the user who created this suggestion", + "de": "Avatar-URL des Users, der den Vorschlag erstellt hat" + }, + "isImage": true + }, + { + "name": "adminUser", + "description": { + "en": "Mention of the administrator who denied this suggestion", + "de": "Erwähnung des Administrators, der den Vorschlag abgelehnt hat" + } + }, + { + "name": "adminMessage", + "description": { + "en": "Message by administrator who denied this suggestion", + "de": "Nachricht des Administrators, der den Vorschlag abgelehnt hat" + } + } + ] + }, + { + "name": "approvedSuggestion", + "humanName": { + "en": "Approved Suggestion-Message", + "de": "Angenommene Vorschlags-Nachricht" + }, + "default": { + "en": { + "title": "Suggestion #%id%", + "description": "%suggestion%", + "color": "#2ECC71", + "thumbnail": "%avatarURL%", + "author": { + "name": "%tag%", + "img": "%avatarURL%" + }, + "fields": [ + { + "name": "Suggestion-Status: APPROVED", + "value": "Approved by %adminUser% with the following reason: \"%adminMessage%\"" + } + ] + }, + "de": { + "title": "Vorschlag #%id%", + "description": "%suggestion%", + "color": "#2ECC71", + "thumbnail": "%avatarURL%", + "author": { + "name": "%tag%", + "img": "%avatarURL%" + }, + "fields": [ + { + "name": "Vorschlagsstatus: ANGENOMMEN", + "value": "Wurde von %adminUser% mit folgendem Grund angenommen: \"%adminMessage%\"" + } + ] } - ], + }, + "description": { + "en": "The suggestion will be edited to this message, when an admin approves a suggestion", + "de": "Zu dieser Nachricht wird der Vorschlag editiert, wenn ein Admin den Vorschlag annimt" + }, "type": "string", - "humanname-de": "Statusbenachrichtigung", - "description-de": "Diese Nachricht wird an den Ersteller und alle Nutzer, die einen Kommentar geschrieben haben, gesendet, wenn ein Vorschlag aktualisiert wird und \"PN-Benachrichtigungen senden\" aktiviert ist", - "params-de": [ + "allowEmbed": true, + "params": [ + { + "name": "id", + "description": { + "en": "ID of the suggestion", + "de": "ID des Vorschlags" + } + }, + { + "name": "suggestion", + "description": { + "en": "Content of the suggestion", + "de": "Inhalt des Vorschlags" + } + }, + { + "name": "tag", + "description": { + "en": "Tag of the user who created this suggestion", + "de": "Tag des Users, der den Vorschlag erstellt hat" + } + }, + { + "name": "avatarURL", + "description": { + "en": "Avatar-URL of the user who created this suggestion", + "de": "Avatar-URL des Users, der den Vorschlag erstellt hat" + }, + "isImage": true + }, { - "name": "%url%", - "description": "URL zum Vorschlag" + "name": "adminUser", + "description": { + "en": "Mention of the administrator who approved this suggestion", + "de": "Erwähnung des Administrators, der den Vorschlag angenommen hat" + } }, { - "name": "%title%", - "description": "Titel des Vorschlags" + "name": "adminMessage", + "description": { + "en": "Message by administrator who approved this suggestion", + "de": "Nachricht des Administrators, der den Vorschlag angenommen hat" + } } - ], - "default-de": "Hi, ein von dir abonnierter Vorschlag wurde von einem Teammitglied beantwortet - lese ihn hier %url%" + ] } ] } \ No newline at end of file diff --git a/modules/suggestions/module.json b/modules/suggestions/module.json index 6b27c41b..b5c2d761 100644 --- a/modules/suggestions/module.json +++ b/modules/suggestions/module.json @@ -1,19 +1,26 @@ { "name": "suggestions", - "humanReadableName-de": "Vorschläge", - "humanReadableName-en": "Suggestions", "author": { "scnxOrgID": "1", - "name": "SCDerox (SC Network Team)", "link": "https://github.com/SCDerox" + "name": "SCDerox (SC Network Team)", + "link": "https://github.com/SCDerox" }, "openSourceURL": "https://github.com/SCNetwork/CustomDCBot/tree/main/modules/suggestions", - "description-en": "Advanced module to manage suggestions on your guild", - "description-de": "Modul mit vielen Funktionen, um Vorschläge auf deinem Discord zu managen", "commands-dir": "/commands", "models-dir": "/models", "fa-icon": "far fa-lightbulb", "config-example-files": [ "config.json" ], - "tags": ["administration"] -} \ No newline at end of file + "tags": [ + "administration" + ], + "humanReadableName": { + "en": "Suggestions", + "de": "Vorschläge" + }, + "description": { + "en": "Advanced module to manage suggestions on your guild", + "de": "Modul mit vielen Funktionen, um Vorschläge auf deinem Discord zu managen" + } +} diff --git a/modules/suggestions/suggestion.js b/modules/suggestions/suggestion.js index ecee6aac..b3456cad 100644 --- a/modules/suggestions/suggestion.js +++ b/modules/suggestions/suggestion.js @@ -3,57 +3,29 @@ * @module Suggestions * @author Simon Csaba */ -const {MessageEmbed} = require('discord.js'); const {embedType} = require('../../src/functions/helpers'); -const {localize} = require('../../src/functions/localize'); module.exports.generateSuggestionEmbed = async function (client, suggestion) { const moduleConfig = client.configurations['suggestions']['config']; const channel = await client.channels.fetch(moduleConfig.suggestionChannel); const message = await channel.messages.fetch(suggestion.messageID); - let member = await client.guild.members.fetch(suggestion.suggesterID).catch(() => { + const user = await client.users.fetch(suggestion.suggesterID).catch(() => { }); - if (!member) { // I could fetch the data another way so we don't have to show fake data - member = { - user: { - tag: 'Clyde#1234', - avatarURL: function () { - return 'https://www.kindpng.com/picc/m/105-1055656_account-user-profile-avatar-avatar-user-profile-icon.png'; - } - } - }; - } - - const embed = new MessageEmbed() - .setTitle(replacer(moduleConfig.suggestionEmbed.title)) - .setAuthor({name: member.user.tag, iconURL: member.user.avatarURL()}) - .setThumbnail(member.user.avatarURL()) - .setFooter({text: client.strings.footer, iconURL: client.strings.footerImgUrl}) - .setDescription(suggestion.suggestion) - .addField('\u200b', '\u200b'); - embed.setColor('YELLOW'); + const params = { + '%id%': suggestion.id, + '%suggestion%': suggestion.suggestion, + '%tag%': user.tag, + '%avatarURL%': user.avatarURL(), + '%adminUser%': suggestion.adminAnswer ? `<@${suggestion.adminAnswer.userID}>` : '', + '%adminMessage%': suggestion.adminAnswer ? suggestion.adminAnswer.reason : '' + }; + let field = 'unansweredSuggestion'; if (suggestion.adminAnswer) { - embed.setColor(suggestion.adminAnswer.action === 'approve' ? 'GREEN' : 'RED'); - embed.addField(moduleConfig.suggestionEmbed.adminAnswerTitle.replaceAll('%status%', suggestion.adminAnswer.action === 'approve' ? localize('suggestions', 'approved') : localize('suggestions', 'denied')), - localize('suggestions', 'admin-answer', { - status: suggestion.adminAnswer.action === 'approve' ? localize('suggestions', 'approved') : localize('suggestions', 'denied'), - u: `<@${suggestion.adminAnswer.userID}>`, - r: suggestion.adminAnswer.reason - })); - } else embed.addField(moduleConfig.suggestionEmbed.awaitingAdminAnswerTitle, moduleConfig.suggestionEmbed.awaitingAnswer); - - await message.edit({content: '\u200b', embeds: [embed]}); - - /** - * Replaces variables in a string - * @private - * @param {String} string string to replace variables in - * @returns {String} String with replaced variables - */ - function replacer(string) { - return string.split('%id%').join(suggestion.id); + if (suggestion.adminAnswer.action === 'approve') field = 'approvedSuggestion'; + else field = 'deniedSuggestion'; } + await message.edit(embedType(moduleConfig[field], params)); }; /** diff --git a/modules/team-list/config.json b/modules/team-list/config.json index 9e89faf3..e96a0cab 100644 --- a/modules/team-list/config.json +++ b/modules/team-list/config.json @@ -1,89 +1,115 @@ { + "description": {}, + "humanName": { + "en": "Configuration", + "de": "Konfiguration" + }, "filename": "config.json", - "humanname-de": "Konfiguration", - "humanname-en": "Configuration", + "configElements": true, "content": [ { - "field_name": "channelID", - "default": "", - "type": "channelID", - "description": "Channel-ID to run all operations in it", - "humanname-de": "Kanal", - "humanname-en": "Channel", - "description-de": "Kanal-ID, in welchem alle Aktionen ausgeführt werden", - "params-de": {}, - "default-de": "" + "name": "channelID", + "humanName": { + "en": "Channel", + "de": "Kanal" + }, + "default": { + "en": "" + }, + "description": { + "en": "Channel-ID to run all operations in it", + "de": "Kanal-ID, in welchem alle Aktionen ausgeführt werden" + }, + "type": "channelID" }, { - "field_name": "roles", + "name": "roles", + "humanName": { + "en": "Listed Roles", + "de": "Gelistete Rollen" + }, + "default": { + "en": [], + "de": [] + }, + "description": { + "en": "Roles that should be listed in the embed", + "de": "Jede Rolle, die im Embed gelistet werden soll" + }, "type": "array", - "description": "Roles to list", - "default": [], - "content": "roleID", - "humanname-de": "Gelistete Rollen", - "humanname-en": "Listed Roles", - "description-de": "Jede Rolle, die im Embed gelistet werden soll", - "description-en": "Roles that should be listed in the embed", - "params-de": {}, - "default-de": [] + "content": "roleID" }, { - "field_name": "descriptions", + "name": "descriptions", + "humanName": { + "en": "Descriptions of roles", + "de": "Beschreibung von Rollen" + }, + "default": { + "en": [], + "de": {} + }, + "description": { + "en": "Optional description of a listed role (Field 1: Role-ID, Field 2: Description)", + "de": "Optionale Beschreibung einer gelisteten Rolle (Feld 1: Rollen-ID, Feld 2: Beschreibung)" + }, "type": "keyed", - "description": "Roles to list", - "default": [], "content": { "key": "roleID", "value": "string" - }, - "humanname-de": "Beschreibung von Rollen", - "humanname-en": "Descriptions of roles", - "description-de": "Optionale Beschreibung einer gelisteten Rolle (Feld 1: Rollen-ID, Feld 2: Beschreibung)", - "description-en": "Optional description of a listed role (Field 1: Role-ID, Field 2: Description)", - "params-de": {}, - "default-de": {} + } }, { - "field_name": "embed", + "name": "embed", + "humanName": { + "en": "Embed" + }, + "default": { + "en": { + "title": "Our staff", + "description": "Meet our staff here", + "color": "GREEN", + "thumbnail-url": "", + "img-url": "" + }, + "de": { + "title": "Unser Team", + "description": "Hier findest du alle unsere Teammitglieder", + "color": "GREEN", + "thumbnail-url": "", + "img-url": "" + } + }, + "description": { + "en": "Configuration of the member-embed", + "de": "Konfiguration des Partner-Embeds" + }, "type": "keyed", - "description": "Configuration of the member-embed", "content": { "key": "string", "value": "string" }, - "default": { - "title": "Our staff", - "description": "Meet our staff here", - "color": "GREEN", - "thumbnail-url": "", - "icon-url": "" - }, - "disableKeyEdits": true, - "humanname": "Embed", - "description-de": "Konfiguration des Partner-Embeds", - "params-de": {}, - "default-de": { - "title": "Unser Team", - "description": "Hier findest du alle unsere Teammitglieder", - "color": "GREEN", - "thumbnail-url": "", - "icon-url": "" - } + "disableKeyEdits": true }, { - "field_name": "nameOverwrites", + "name": "nameOverwrites", + "humanName": { + "en": "Name-Overwrites", + "de": "Name-Overwrites" + }, + "default": { + "en": [], + "de": {} + }, + "description": { + "en": "optional; Allows to overwrite the displayed name of roles (Field 1: Role-ID, Field 2: Displayed Name)", + "de": "optional; Allows to overwrite the displayed name of a role (Feld 1: Rollen-ID, Feld 2: Angezeigter Name)" + }, "type": "keyed", - "default": [], "content": { "key": "roleID", "value": "string" - }, - "description-de": "optional; Allows to overwrite the displayed name of a role (Feld 1: Rollen-ID, Feld 2: Angezeigter Name)", - "description-en": "optional; Allows to overwrite the displayed name of roles (Field 1: Role-ID, Field 2: Displayed Name)", - "humanname-de": "Name-Overwrites", - "humanname-en": "Name-Overwrites", - "params-de": {}, - "default-de": {} + } } ] } \ No newline at end of file diff --git a/modules/team-list/events/botReady.js b/modules/team-list/events/botReady.js index c75ce477..6462eb75 100644 --- a/modules/team-list/events/botReady.js +++ b/modules/team-list/events/botReady.js @@ -6,9 +6,9 @@ const schedule = require('node-schedule'); module.exports.run = async function (client) { - await updateEmbedIfNeeded(client); + await updateEmbedsIfNeeded(client); const job = schedule.scheduleJob('1,16,31,46 * * * *', async () => { - await updateEmbedIfNeeded(client); + await updateEmbedsIfNeeded(client); }); client.jobs.push(job); }; @@ -20,43 +20,45 @@ let lastSavedEmbed = null; * @param client * @returns {Promise} */ -async function updateEmbedIfNeeded(client) { - const moduleConf = client.configurations['team-list']['config']; - const embed = new MessageEmbed() - .setColor(moduleConf.embed.color) - .setTitle(moduleConf.embed.title) - .setDescription(moduleConf.embed.description) - .setTimestamp() - .setFooter({text: client.strings.footer, iconURL: client.strings.footerImgUrl}); - - if (moduleConf.embed['thumbnail-url']) embed.setThumbnail(moduleConf.embed['thumbnail-url']); - if (moduleConf.embed['icon-url']) embed.setThumbnail(moduleConf.embed['icon-url']); - - const channel = await client.channels.fetch(moduleConf['channelID']).catch(() => { - }); - if (!channel) return disableModule('team-list', localize('team-list', 'channel-not-found', {c: moduleConf['channelID']})); - const messages = (await channel.messages.fetch()).filter(msg => msg.author.id === client.user.id); - const guildMembers = await channel.guild.members.fetch(); +async function updateEmbedsIfNeeded(client) { + const channels = client.configurations['team-list']['config']; + for (const channelConfig of channels) { + const embed = new MessageEmbed() + .setColor(channelConfig.embed.color) + .setTitle(channelConfig.embed.title) + .setDescription(channelConfig.embed.description) + .setTimestamp() + .setFooter({text: client.strings.footer, iconURL: client.strings.footerImgUrl}); - for (const rID of moduleConf.roles) { - const role = await channel.guild.roles.fetch(rID); - if (!role) return disableModule('team-list', localize('team-list', 'role-not-found', {r: rID})); + if (channelConfig.embed['thumbnail-url']) embed.setThumbnail(channelConfig.embed['thumbnail-url']); + if (channelConfig.embed['img-url']) embed.setImage(channelConfig.embed['img-url']); - let userString = ''; - for (const member of guildMembers.filter(m => m.roles.cache.has(rID)).values()) { - userString = userString + `${member.user.toString()}, `; - } - if (userString === '') userString = localize('team-list', 'no-users-with-role', {r: role.toString()}); - else userString = userString.substring(0, userString.length - 2); + const channel = await client.channels.fetch(channelConfig['channelID']).catch(() => { + }); + if (!channel) return disableModule('team-list', localize('team-list', 'channel-not-found', {c: channelConfig['channelID']})); + const messages = (await channel.messages.fetch()).filter(msg => msg.author.id === client.user.id); + const guildMembers = await channel.guild.members.fetch(); - embed.addField(moduleConf['nameOverwrites'][rID] || role.name, (moduleConf['descriptions'][rID] ? `${moduleConf['descriptions'][rID]}\n` : '') + userString); - } + for (const rID of channelConfig.roles) { + const role = await channel.guild.roles.fetch(rID); + if (!role) return disableModule('team-list', localize('team-list', 'role-not-found', {r: rID})); - if (embed.fields.length === 0) embed.addField('⚠', localize('team-list', 'no-roles-selected')); + let userString = ''; + for (const member of guildMembers.filter(m => m.roles.cache.has(rID)).values()) { + userString = userString + `${member.user.toString()}, `; + } + if (userString === '') userString = localize('team-list', 'no-users-with-role', {r: role.toString()}); + else userString = userString.substring(0, userString.length - 2); - if (isEqual(lastSavedEmbed, embed.toJSON())) return; - lastSavedEmbed = embed.toJSON(); + embed.addField(channelConfig['nameOverwrites'][rID] || role.name, (channelConfig['descriptions'][rID] ? `${channelConfig['descriptions'][rID]}\n` : '') + userString); + } - if (messages.last()) await messages.last().edit({embeds: [embed]}); - else channel.send({embeds: [embed]}); + if (embed.fields.length === 0) embed.addField('⚠', localize('team-list', 'no-roles-selected')); + + if (isEqual(lastSavedEmbed, embed.toJSON())) return; + lastSavedEmbed = embed.toJSON(); + + if (messages.last()) await messages.last().edit({embeds: [embed]}); + else channel.send({embeds: [embed]}); + } } \ No newline at end of file diff --git a/modules/team-list/module.json b/modules/team-list/module.json index 47707c0c..2722e15c 100644 --- a/modules/team-list/module.json +++ b/modules/team-list/module.json @@ -1,15 +1,11 @@ { "name": "team-list", - "humanReadableName-en": "Staff-List", - "humanReadableName-de": "Teammitglieder-Liste", "fa-icon": "fa-user-tie", "author": { "scnxOrgID": "1", "name": "SCDerox (SC Network Team)", "link": "https://github.com/SCDerox" }, - "description-en": "List all your staff and explain team-roles in a always up-to-date embed", - "description-de": "Liste alle deine Teammitglieder und erkläre sie in einem immer up-to-date Embed ", "events-dir": "/events", "config-example-files": [ "config.json" @@ -17,5 +13,13 @@ "tags": [ "administration" ], - "openSourceURL": "https://github.com/SCNetwork/CustomDCBot/tree/main/modules/team-list" + "openSourceURL": "https://github.com/SCNetwork/CustomDCBot/tree/main/modules/team-list", + "humanReadableName": { + "en": "Staff-List", + "de": "Teammitglieder-Liste" + }, + "description": { + "en": "List all your staff and explain team-roles in a always up-to-date embed", + "de": "Liste alle deine Teammitglieder und erkläre sie in einem immer up-to-date Embed " + } } diff --git a/modules/temp-channels/config.json b/modules/temp-channels/config.json index 8aabe7da..57ac033b 100644 --- a/modules/temp-channels/config.json +++ b/modules/temp-channels/config.json @@ -1,226 +1,313 @@ { + "description": {}, + "humanName": { + "en": "Configuration", + "de": "Konfiguration" + }, "filename": "config.json", - "humanname-de": "Konfiguration", - "humanname-en": "Configuration", "content": [ { - "field_name": "channelID", + "name": "channelID", + "humanName": { + "de": "Kanal" + }, + "default": { + "en": "" + }, + "description": { + "en": "Set the channel here where users have to join to create their temp-channel", + "de": "Gebe hier die ID des Channels ein, in welchem Nutzer joinen müssen, um einen neuen Channel zu erstellen" + }, "type": "channelID", - "default": "", - "description": "Set the channel here where users have to join to create their temp-channel", "content": [ "GUILD_VOICE" - ], - "humanname-de": "Kanal", - "description-de": "Gebe hier die ID des Channels ein, in welchem Nutzer joinen müssen, um einen neuen Channel zu erstellen", - "params-de": {}, - "default-de": "" + ] }, { - "field_name": "allowUserToChangeName", - "type": "boolean", - "default": true, - "description": "If enabled the user has the permission to change the name and settings of the voicechanel via both, the Discord-integrated menus and the corresponding /-commands", - "humanname-de": "Kanaländerungen erlauben", - "description-de": "Wenn aktiviert erhält der Ersteller des Channel die Permission \"MANAGE_CHANNEL\" auf diesem Channel, sowie Zugriff auf die entsprechenden Befehle", - "params-de": {}, - "default-de": true + "name": "allowUserToChangeName", + "humanName": { + "de": "Kanaländerungen erlauben" + }, + "default": { + "en": true, + "de": true + }, + "description": { + "en": "If enabled the user has the permission to change the name and settings of the voicechanel via both, the Discord-integrated menus and the corresponding /-commands", + "de": "Wenn aktiviert erhält der Ersteller des Channel die Permission \"MANAGE_CHANNEL\" auf diesem Channel, sowie Zugriff auf die entsprechenden Befehle" + }, + "type": "boolean" }, { - "field_name": "timeout", + "name": "timeout", + "humanName": { + "de": "Löschverzögerung" + }, + "default": { + "en": 3, + "de": 10 + }, + "description": { + "en": "Set a timeout here in which the bot should wait before deleting the voicechannel (in secounds)", + "de": "Die Anzahl von Sekunden nach einem Channel-Leave, die der Bot warten soll, bevor er einen Channel löscht" + }, "type": "integer", - "default": 3, - "allowNull": true, - "description": "Set a timeout here in which the bot should wait before deleting the voicechannel (in secounds)", - "humanname-de": "Löschverzögerung", - "description-de": "Die Anzahl von Sekunden nach einem Channel-Leave, die der Bot warten soll, bevor er einen Channel löscht", - "params-de": {}, - "default-de": 10 + "allowNull": true }, { - "field_name": "category", + "name": "category", + "humanName": { + "de": "Kategorie" + }, + "default": { + "en": "" + }, + "description": { + "en": "You can set a category here in which the new channel should be created", + "de": "Gebe hier die ID der Kategorie an, in welcher neue Temp-Channel erstellt werden sollen" + }, "type": "channelID", - "default": "", - "content": "GUILD_CATEGORY", - "description": "You can set a category here in which the new channel should be created", - "humanname-de": "Kategorie", - "description-de": "Gebe hier die ID der Kategorie an, in welcher neue Temp-Channel erstellt werden sollen", - "params-de": {}, - "default-de": "" + "content": "GUILD_CATEGORY" }, { - "field_name": "channelname_format", + "name": "channelname_format", + "humanName": { + "de": "Kanalname" + }, + "default": { + "en": "⏳ %username%", + "de": "⏳ %username%" + }, + "description": { + "en": "Change the format of the channel name here", + "de": "Du kannst das Format des Kanalnamens hier bearbeiten" + }, "type": "string", - "default": "⏳ %username%", - "description": "Change the format of the channel name here", "params": [ { - "name": "%username%", - "description": "Username of the user" + "name": "username", + "description": { + "en": "Username of the user", + "de": "Nutzername des Nutzers" + } }, { - "name": "%nickname%", - "description": "Nickname of the member" + "name": "nickname", + "description": { + "en": "Nickname of the member", + "de": "Nickname des Mitglieds" + } }, { - "name": "%tag%", - "description": "Tag of the user" + "name": "tag", + "description": { + "en": "Tag of the user", + "de": "Tag des Nutzers" + } } - ], - "humanname-de": "Kanalname", - "description-de": "Du kannst das Format des Kanalnamens hier bearbeiten", - "params-de": [ - { - "name": "%username%", - "description": "Nutzername des Nutzers" - }, - { - "name": "%nickname%", - "description": "Nickname des Mitglieds" - }, - { - "name": "%tag%", - "description": "Tag des Nutzers" - } - ], - "default-de": "⏳ %username%" + ] }, { - "field_name": "create_no_mic_channel", - "type": "boolean", - "description": "If enabled the bot will create a new channel for each voicechannel which can be only seen by users in the voicechannel", - "default": true, - "humanname-de": "No-Mic-Kanal erstellen", - "description-de": "Wenn aktiviert wird ein No-Mic-Textchannel für jeden Temp-Channel erstellt, auf welchen nur Nutzer Zugriff haben, die im VC sind", - "params-de": {}, - "default-de": true + "name": "create_no_mic_channel", + "humanName": { + "de": "No-Mic-Kanal erstellen" + }, + "default": { + "en": true, + "de": true + }, + "description": { + "en": "If enabled the bot will create a new channel for each voicechannel which can be only seen by users in the voicechannel", + "de": "Wenn aktiviert wird ein No-Mic-Textchannel für jeden Temp-Channel erstellt, auf welchen nur Nutzer Zugriff haben, die im VC sind" + }, + "type": "boolean" }, { - "field_name": "noMicChannelMessage", + "name": "noMicChannelMessage", + "humanName": { + "de": "No-Mic-Kanal-Nachricht" + }, + "default": { + "en": "Welcome to your no-mic-channel - you can only see this channel if you are in the connected voicechat", + "de": "Willkommen im deinem No-Mic-Kanal! Dieser wurde zu deinem Temp-Kanal erstellt, damit du mit Leuten chatten kannst, die kein Mikrofon haben. Beachte, dass dieser Channel nur von Nutzern gesehen werden kann, die im Sprachkanal mit dir sind. Beachte außerdem, dass dieser Channel gelöscht wird, wenn dein VC nicht mehr in Benutzung ist." + }, + "description": { + "en": "You can set a message here that should be send in the no-mic-channel when created", + "de": "Hier kannst du eine Nachricht festlegen, welche in einem No-Mic-Channel gesendet werden soll." + }, "type": "string", - "default": "Welcome to your no-mic-channel - you can only see this channel if you are in the connected voicechat", - "description": "You can set a message here that should be send in the no-mic-channel when created", - "allowEmbed": true, - "humanname-de": "No-Mic-Kanal-Nachricht", - "description-de": "Hier kannst du eine Nachricht festlegen, welche in einem No-Mic-Channel gesendet werden soll.", - "params-de": {}, - "default-de": "Willkommen im deinem No-Mic-Kanal! Dieser wurde zu deinem Temp-Kanal erstellt, damit du mit Leuten chatten kannst, die kein Mikrofon haben. Beachte, dass dieser Channel nur von Nutzern gesehen werden kann, die im Sprachkanal mit dir sind. Beachte außerdem, dass dieser Channel gelöscht wird, wenn dein VC nicht mehr in Benutzung ist." + "allowEmbed": true }, { - "field_name": "send_dm", - "type": "boolean", - "default": true, - "description": "Should the bot send a direct message to a user when a new channel is created for them?", - "humanname-de": "PN senden", - "description-de": "Sollte beim Erstellen eines Temp-Channels eine PN an den Nutzer geschrieben werden?", - "params-de": {}, - "default-de": true + "name": "send_dm", + "humanName": { + "de": "PN senden" + }, + "default": { + "en": true, + "de": true + }, + "description": { + "en": "Should the bot send a direct message to a user when a new channel is created for them?", + "de": "Sollte beim Erstellen eines Temp-Channels eine PN an den Nutzer geschrieben werden?" + }, + "type": "boolean" }, { - "field_name": "dm", + "name": "dm", + "humanName": { + "de": "Privatnachricht" + }, + "default": { + "en": "I have created and moved you to your new voice-channel - have fun ^^", + "de": "Tach - ich habe dir nen eigenen Channel erstellt und dich gemovt - Dieser wird nach Inaktivität gelöscht - Have fun^^" + }, + "description": { + "en": "Set the message that should get send to the user if they join the voicechannel", + "de": "Hier kannst du die Nachricht festlegen, die an den Nutzer geschrieben soll (wenn aktiviert)" + }, "type": "string", "allowEmbed": true, - "description": "Set the message that should get send to the user if they join the voicechannel", - "default": "I have created and moved you to your new voice-channel - have fun ^^", - "args": [ - { - "name": "%channelname%", - "description": "Name of the channel" - } - ], - "humanname-de": "Privatnachricht", - "description-de": "Hier kannst du die Nachricht festlegen, die an den Nutzer geschrieben soll (wenn aktiviert)", - "params-de": [ + "params": [ { - "name": "%channelname%", - "description": "Name des Kanals" + "name": "channelname", + "description": { + "en": "Name of the channel", + "de": "Name des Kanals" + } } - ], - "default-de": "Tach - ich habe dir nen eigenen Channel erstellt und dich gemovt - Dieser wird nach Inaktivität gelöscht - Have fun^^" + ] }, { - "field_name": "publicChannels", - "type": "boolean", - "default": true, - "description": "Should the permissions for channels created by the bot be synced with their category?", - "humanname-en": "Public channels", - "humanname-de": "Öffentliche Channel", - "description-de": "Sollen die Berechtigungen für vom Bot erstellte Kanäle mit deren Kategorie synchronisiert werden?", - "params-de": {} + "name": "publicChannels", + "humanName": { + "en": "Public channels", + "de": "Öffentliche Channel" + }, + "default": { + "en": true + }, + "description": { + "en": "Should the permissions for channels created by the bot be synced with their category?", + "de": "Sollen die Berechtigungen für vom Bot erstellte Kanäle mit deren Kategorie synchronisiert werden?" + }, + "type": "boolean" }, { - "field_name": "allowUserToChangeMode", - "type": "boolean", - "default": true, - "description": "If enabled the user has the permission to change the access-mode of the voicechanel", - "humanname-de": "Kanaländerungen erlauben", - "description-de": "Wenn aktiviert erhält der Ersteller des Channel die Möglichkeit die Zugriffsberechtigungen für den Kanal festzulegen", - "params-de": {}, - "default-de": true + "name": "allowUserToChangeMode", + "humanName": { + "de": "Kanaländerungen erlauben" + }, + "default": { + "en": true, + "de": true + }, + "description": { + "en": "If enabled the user has the permission to change the access-mode of the voicechanel", + "de": "Wenn aktiviert erhält der Ersteller des Channel die Möglichkeit die Zugriffsberechtigungen für den Kanal festzulegen" + }, + "type": "boolean" }, { - "field_name": "notInChannel", - "type": "string", - "default": "You have to be in your temp-channel to do this", - "description": "This message gets sent to a user, who tries to edit their channel, while not being in it", - "params": {} + "name": "notInChannel", + "humanName": {}, + "default": { + "en": "You have to be in your temp-channel to do this" + }, + "description": { + "en": "This message gets sent to a user, who tries to edit their channel, while not being in it" + }, + "type": "string" }, { - "field_name": "modeSwitched", + "name": "modeSwitched", + "humanName": {}, + "default": { + "en": "The access-mode of your channel has been switched to %mode%" + }, + "description": { + "en": "This message gets sent to a user, after they changed the mode of their channel" + }, "type": "string", - "default": "The access-mode of your channel has been switched to %mode%", - "description": "This message gets sent to a user, after they changed the mode of their channel", "params": [ { - "name": "%mode%", - "description": "Mode of the channel" + "name": "mode", + "description": { + "en": "Mode of the channel" + } } ] }, { - "field_name": "userAdded", + "name": "userAdded", + "humanName": {}, + "default": { + "en": "The user %user% has beed added to your channel. They can now access it whenever they like to" + }, + "description": { + "en": "This message gets sent to a user, after they added an user to their channel" + }, "type": "string", - "default": "The user %user% has beed added to your channel. They can now access it whenever they like to", - "description": "This message gets sent to a user, after they added an user to their channel", "params": [ { - "name": "%user%", - "description": "The user, that was added" + "name": "user", + "description": { + "en": "The user, that was added" + } } ] }, { - "field_name": "userRemoved", + "name": "userRemoved", + "humanName": {}, + "default": { + "en": "The user %user% has beed removed from your channel. They can no longer access it, while your channel is private" + }, + "description": { + "en": "This message gets sent to a user, after they removed an user from their channel" + }, "type": "string", - "default": "The user %user% has beed removed from your channel. They can no longer access it, while your channel is private", - "description": "This message gets sent to a user, after they removed an user from their channel", "params": [ { - "name": "%user%", - "description": "The user, that was removed" + "name": "user", + "description": { + "en": "The user, that was removed" + } } ] }, { - "field_name": "listUsers", - "type": "string", - "default": "Here is a list of all the users that have access to your channel:", - "description": "The message to be sent, if a user requests a list of the users with access to their channel. This is automatically followed by a list of the users' tags.", - "params": [] + "name": "listUsers", + "humanName": {}, + "default": { + "en": "Here is a list of all the users that have access to your channel:" + }, + "description": { + "en": "The message to be sent, if a user requests a list of the users with access to their channel. This is automatically followed by a list of the users' tags." + }, + "type": "string" }, { - "field_name": "channelEdited", - "type": "string", - "default": "Your channel was edited", - "description": "The message to be sent, if a user edited their channel", - "params": [] + "name": "channelEdited", + "humanName": {}, + "default": { + "en": "Your channel was edited" + }, + "description": { + "en": "The message to be sent, if a user edited their channel" + }, + "type": "string" }, { - "field_name": "edit-error", - "type": "string", - "default": "An error occured while editing your channel. One or more of your settings could not be applied. This could be due to missing permissions or an invalid value", - "description": "The message to be sent, if a user edited their channel, but it failed", - "params": [] + "name": "edit-error", + "humanName": {}, + "default": { + "en": "An error occured while editing your channel. One or more of your settings could not be applied. This could be due to missing permissions or an invalid value" + }, + "description": { + "en": "The message to be sent, if a user edited their channel, but it failed" + }, + "type": "string" } ] } \ No newline at end of file diff --git a/modules/temp-channels/module.json b/modules/temp-channels/module.json index 7c85476e..57a977bf 100644 --- a/modules/temp-channels/module.json +++ b/modules/temp-channels/module.json @@ -1,14 +1,10 @@ { "name": "temp-channels", - "humanReadableName-en": "Temporary channels", - "humanReadableName-de": "Temporäre Channel", "author": { "scnxOrgID": "1", "name": "SCDerox (SC Network Team)", "link": "https://github.com/SCDerox" }, - "description-en": "Allow users to quickly create voice channels by joining a voicechannel", - "description-de": "Erlaube es Nutzern, ihren eigenen Voice-Channel zu erstellen, indem sie einem VC joinen", "models-dir": "/models", "events-dir": "/events", "commands-dir": "/commands", @@ -19,5 +15,13 @@ "tags": [ "community" ], - "openSourceURL": "https://github.com/SCNetwork/CustomDCBot/tree/main/modules/temp-channels" + "openSourceURL": "https://github.com/SCNetwork/CustomDCBot/tree/main/modules/temp-channels", + "humanReadableName": { + "en": "Temporary channels", + "de": "Temporäre Channel" + }, + "description": { + "en": "Allow users to quickly create voice channels by joining a voicechannel", + "de": "Erlaube es Nutzern, ihren eigenen Voice-Channel zu erstellen, indem sie einem VC joinen" + } } diff --git a/modules/tic-tak-toe/commands/tic-tac-toe.js b/modules/tic-tak-toe/commands/tic-tac-toe.js index 5bca195f..e88a12ad 100644 --- a/modules/tic-tak-toe/commands/tic-tac-toe.js +++ b/modules/tic-tak-toe/commands/tic-tac-toe.js @@ -45,12 +45,6 @@ module.exports.run = async function (interaction) { a.stop(); }, 120000); - /* - * GET READY FOR THE WORST IMPLEMENTATION OF SUCH A BASIC PATH-FINDING-ALGORITHM YOUR EYES WILL EVER SEE - * While I prepared for the public release of custombot, I took a look at this module, and now I feel a - * sharp pain in my chest. - */ - const grid = { 1: { 1: null, diff --git a/modules/tic-tak-toe/module.json b/modules/tic-tak-toe/module.json index 22f298e4..f065ce2d 100644 --- a/modules/tic-tak-toe/module.json +++ b/modules/tic-tak-toe/module.json @@ -1,14 +1,18 @@ { "name": "tic-tak-toe", - "humanReadableName-en": "Tick-Tack-Toe", + "humanReadableName": { + "en": "Tick-Tack-Toe" + }, "author": { "scnxOrgID": "1", "name": "SCDerox (SC Network Team)", "link": "https://github.com/SCDerox" }, "fa-icon": "fa-solid fa-border-all", - "description-en": "Let your users play Tick-Tac-Toe against each other!", - "description-de": "Lasse Nutzer auf deinem Server Tick-Tac-Toe gegeneinander spielen", + "description": { + "en": "Let your users play Tick-Tac-Toe against each other!", + "de": "Lasse Nutzer auf deinem Server Tick-Tac-Toe gegeneinander spielen" + }, "commands-dir": "/commands", "noConfig": true, "releaseDate": "1641230658000", @@ -22,4 +26,4 @@ "fun" ], "openSourceURL": "https://github.com/SCNetwork/CustomDCBot/tree/main/modules/tic-tak-toe" -} +} \ No newline at end of file diff --git a/modules/tickets/config.json b/modules/tickets/config.json index ecd52978..738cc188 100644 --- a/modules/tickets/config.json +++ b/modules/tickets/config.json @@ -1,141 +1,206 @@ { - "humanname-de": "Konfiguration", - "humanname-en": "Configuration", - "description-de": "Passe die grundlegenden Optionen des Modules hier an", - "description-en": "Manage the basic settings of this module here", + "description": { + "en": "Manage the basic settings of this module here", + "de": "Passe die grundlegenden Optionen des Modules hier an" + }, + "humanName": { + "en": "Configuration", + "de": "Konfiguration" + }, "configElements": true, "filename": "config.json", "content": [ { - "field_name": "name", - "humanname-de": "Name", - "humanname-en": "Name", - "default": "Support", - "type": "string", - "description-de": "Name des Tickettypen. Dieser wird Nutzern angezeigt", - "description-en": "Name of the Ticket type. This will be shown to users" + "name": "name", + "humanName": { + "en": "Name", + "de": "Name" + }, + "default": { + "en": "Support" + }, + "description": { + "en": "Name of the Ticket type. This will be shown to users", + "de": "Name des Tickettypen. Dieser wird Nutzern angezeigt" + }, + "type": "string" }, { - "field_name": "ticket-create-category", - "humanname-de": "Ticketerstellungs-Kategorie", - "humanname-en": "Ticket create category", - "default": "", + "name": "ticket-create-category", + "humanName": { + "en": "Ticket create category", + "de": "Ticketerstellungs-Kategorie" + }, + "default": { + "en": "" + }, + "description": { + "en": "Category in which tickets should get created.", + "de": "Kategorie, in der Tickets erstellt werden sollen." + }, "type": "channelID", - "channelType": "category", - "description-de": "Kategorie, in der Tickets erstellt werden sollen.", - "description-en": "Category in which tickets should get created." + "content": [ + "GUILD_CATEGORY" + ] }, { - "field_name": "ticket-create-channel", - "humanname-de": "Ticketerstellungs-Kanal", - "humanname-en": "Ticket create category", - "default": "", + "name": "ticket-create-channel", + "humanName": { + "en": "Ticket create category", + "de": "Ticketerstellungs-Kanal" + }, + "default": { + "en": "" + }, + "description": { + "en": "Channel in which a message with a \"Create Ticket\" button should get send", + "de": "Kanal in den eine Nachticht mit \"Ticket erstellen\" button gesendet werden soll" + }, "type": "channelID", - "description-de": "Kanal in den eine Nachticht mit \"Ticket erstellen\" button gesendet werden soll", - "description-en": "Channel in which a message with a \"Create Ticket\" button should get send" + "content": [ + "GUILD_TEXT" + ] }, { - "field_name": "ticketRoles", - "humanname-de": "Ticketrollen", - "humanname-en": "Ticket Roles", - "default": [], + "name": "ticketRoles", + "humanName": { + "en": "Ticket Roles", + "de": "Ticketrollen" + }, + "default": { + "en": [] + }, + "description": { + "en": "Nutzer, die in Tickets gepingt werden und diese sehen können", + "de": "Users who get pinged in the tickets and who can see tickets" + }, "type": "array", - "content": "roleID", - "description-de": "Users who get pinged in the tickets and who can see tickets", - "description-en": "Nutzer, die in Tickets gepingt werden und diese sehen können" + "content": "roleID" }, { - "field_name": "logChannel", - "humanname-de": "Log-Kanal", - "humanname-en": "Log chanenl", - "default": "", - "type": "channelID", - "description-de": "Kanal in den Ticket-Logs gesendet werden sollen", - "description-en": "Channel in which ticket logs should get send" + "name": "logChannel", + "humanName": { + "en": "Log chanenl", + "de": "Log-Kanal" + }, + "default": { + "en": "" + }, + "description": { + "en": "Channel in which ticket logs should get send", + "de": "Kanal in den Ticket-Logs gesendet werden sollen" + }, + "type": "channelID" }, { - "field_name": "ticket-create-message", - "humanname-de": "Ticketerstellungs-Nachricht", - "humanname-en": "Ticket create message", - "default-de": "Klick auf den großen Button unter dieser Nachricht um unser Team zu kontaktieren und ein Ticket zu erstellen", - "default-en": "Click the big button below to contact our staff and create a ticket", + "name": "ticket-create-message", + "humanName": { + "en": "Ticket create message", + "de": "Ticketerstellungs-Nachricht" + }, + "default": { + "en": "Click the big button below to contact our staff and create a ticket", + "de": "Klick auf den großen Button unter dieser Nachricht um unser Team zu kontaktieren und ein Ticket zu erstellen" + }, + "description": { + "en": "Message that gets send/edited in the ticket-create-channel", + "de": "Nachricht, die im Ticketerstellungs-Kanal gesendet/bearbeitet wird" + }, "type": "string", - "allowEmbed": true, - "description-de": "Nachricht, die im Ticketerstellungs-Kanal gesendet/bearbeitet wird", - "description-en": "Message that gets send/edited in the ticket-create-channel" + "allowEmbed": true }, { - "field_name": "ticket-description", - "humanname-de": "Ticketbeschreibung", - "humanname-en": "Ticket description", - "default-de": "Willkommen in unserem Support! Wir haben unser Team benachrichtigt. Bitte habe etwas Geduld.", - "default-en": "Welcome to our support! We notified our staff and they will be with you shortly.", - "type": "string", - "description-de": "Embed-Beschreibung eines neuen Tickets", - "description-en": "Embed-Description of a new ticket" + "name": "ticket-description", + "humanName": { + "en": "Ticket description", + "de": "Ticketbeschreibung" + }, + "default": { + "en": "Welcome to our support! We notified our staff and they will be with you shortly.", + "de": "Willkommen in unserem Support! Wir haben unser Team benachrichtigt. Bitte habe etwas Geduld." + }, + "description": { + "en": "Embed-Description of a new ticket", + "de": "Embed-Beschreibung eines neuen Tickets" + }, + "type": "string" }, { - "field_name": "sendUserDMAfterTicketClose", - "humanname-de": "Nach schließen PN an Nutzer senden", - "humanname-en": "Send user DM after ticket is closed", - "default": false, - "type": "boolean", - "description-de": "Wenn diese Option aktiviert ist, bekommen Nutzer eine PN, wenn ihr Ticket geschlossen wird", - "description-en": "If enabled users get a DM from the bot after someone closes the ticket" + "name": "sendUserDMAfterTicketClose", + "humanName": { + "en": "Send user DM after ticket is closed", + "de": "Nach schließen PN an Nutzer senden" + }, + "default": { + "en": false + }, + "description": { + "en": "If enabled users get a DM from the bot after someone closes the ticket", + "de": "Wenn diese Option aktiviert ist, bekommen Nutzer eine PN, wenn ihr Ticket geschlossen wird" + }, + "type": "boolean" }, { - "field_name": "userDM", - "humanname-de": "Nutzer PN", - "humanname-en": "User DM", - "default-de": "Danke, dass du unseren Support für die Kategorie \"%type%\" kontaktiert hast. Hier ist dein Transcript: %transcriptURL%", - "default-en": "Thanks for contacting our support for the ticket-category \"%type%\", here is your transcript: %transcriptURL%", + "name": "userDM", + "humanName": { + "en": "User DM", + "de": "Nutzer PN" + }, + "default": { + "en": "Thanks for contacting our support for the ticket-category \"%type%\", here is your transcript: %transcriptURL%", + "de": "Danke, dass du unseren Support für die Kategorie \"%type%\" kontaktiert hast. Hier ist dein Transcript: %transcriptURL%" + }, + "description": { + "en": "This message gets send to the user if sendUserDMAfterTicketClose is enabled", + "de": "Diese Nachricht wird an den Nutzer gesendet, wenn die entsprechende Option aktiviert ist" + }, "type": "string", - "allowEmbed": true, - "description-de": "Diese Nachricht wird an den Nutzer gesendet, wenn die entsprechende Option aktiviert ist", - "description-en": "This message gets send to the user if sendUserDMAfterTicketClose is enabled", "dependsOn": "sendUserDMAfterTicketClose", - "params-de": [ - { - "name": "%transcriptURL%", - "content": "URL zum transcript des Tickets" - }, - { - "name": "%type%", - "content": "Typ des Tickets" - } - ], - "params-en": [ + "allowEmbed": true, + "params": [ { - "name": "%transcriptURL%", - "content": "URL to the transcript of the ticket" + "name": "transcriptURL", + "description": {} }, { - "name": "%type%", - "content": "Type of the ticket" + "name": "type", + "description": {} } ] }, { - "field_name": "ticket-create-button", - "humanname-de": "Ticketerstellungs-Button", - "humanname-en": "Ticket create button", - "default-de": "Ticket erstellen \uD83C\uDFAB", - "default-en": "Create ticket \uD83C\uDFAB", + "name": "ticket-create-button", + "humanName": { + "en": "Ticket create button", + "de": "Ticketerstellungs-Button" + }, + "default": { + "en": "Create ticket 🎫", + "de": "Ticket erstellen 🎫" + }, + "description": { + "en": "Button for creating a ticket", + "de": "Button zum erstellen eines Tickets" + }, "type": "string", - "pro": true, - "description-de": "Button zum erstellen eines Tickets", - "description-en": "Button for creating a ticket" + "pro": true }, { - "field_name": "ticket-close-button", - "humanname-de": "Ticketschließungs-Button", - "humanname-en": "Ticket close button", - "default-de": "❎ Ticket schließen", - "default-en": "❎ Close ticket", + "name": "ticket-close-button", + "humanName": { + "en": "Ticket close button", + "de": "Ticketschließungs-Button" + }, + "default": { + "en": "❎ Close ticket", + "de": "❎ Ticket schließen" + }, + "description": { + "en": "Button for closing a ticket", + "de": "Button um ein Ticket zu schließen" + }, "type": "string", - "pro": true, - "description-de": "Button um ein Ticket zu schließen", - "description-en": "Button for closing a ticket" + "pro": true } ] } \ No newline at end of file diff --git a/modules/tickets/module.json b/modules/tickets/module.json index 4e398c31..f9e1111a 100644 --- a/modules/tickets/module.json +++ b/modules/tickets/module.json @@ -1,14 +1,11 @@ { "name": "tickets", - "humanReadableName-en": "Ticket-System", "author": { "scnxOrgID": "1", "name": "SCDerox (SC Network Team)", "link": "https://github.com/SCDerox" }, "fa-icon": "fas fa-ticket-simple", - "description-en": "Let users create tickets to message your staff", - "description-de": "Lasse deine Nutzer durch Tickets mit deinem Team kommunizieren", "events-dir": "/events", "openSourceURL": "https://github.com/SCNetwork/CustomDCBot/tree/main/modules/tickets", "models-dir": "/models", @@ -17,5 +14,12 @@ ], "tags": [ "support" - ] -} \ No newline at end of file + ], + "humanReadableName": { + "en": "Ticket-System" + }, + "description": { + "en": "Let users create tickets to message your staff", + "de": "Lasse deine Nutzer durch Tickets mit deinem Team kommunizieren" + } +} diff --git a/modules/twitch-notifications/configs/config.json b/modules/twitch-notifications/configs/config.json index 51522a5d..492198a6 100644 --- a/modules/twitch-notifications/configs/config.json +++ b/modules/twitch-notifications/configs/config.json @@ -1,29 +1,47 @@ { + "description": {}, + "humanName": { + "en": "Configuration", + "de": "Konfiguration" + }, "filename": "config.json", - "humanname-de": "Konfiguration", - "humanname-en": "Configuration", "hidden": true, "content": [ { - "field_name": "twitchClientID", - "default": "", + "name": "twitchClientID", + "humanName": {}, + "default": { + "en": "me3ub5wbx2jxlhkvxrc6fbgp8wgixq" + }, + "description": { + "en": "ID of the Client, which is used to check if the Streamer is live" + }, "hidden": true, - "type": "string", - "description": "ID of the Client, which is used to check if the Streamer is live" + "type": "string" }, { - "field_name": "clientSecret", - "default": "", + "name": "clientSecret", + "humanName": {}, + "default": { + "en": "58v6r0v2oips1tldmfunrxp5m8xv6r" + }, + "description": { + "en": "Secret of the Twitch-Client, which is used to check if the Streamer is live" + }, "hidden": true, - "type": "string", - "description": "Secret of the Twitch-Client, which is used to check if the Streamer is live" + "type": "string" }, { - "field_name": "interval", - "default": 180, + "name": "interval", + "humanName": {}, + "default": { + "en": 180 + }, + "description": { + "en": "Interval (in seconds) in which it is tested whether the streamer is live. This value must be higher than 60" + }, "hidden": true, - "type": "integer", - "description": "Interval (in seconds) in which it is tested whether the streamer is live. This value must be higher than 60" + "type": "integer" } ] -} \ No newline at end of file +} diff --git a/modules/twitch-notifications/configs/streamers.json b/modules/twitch-notifications/configs/streamers.json index 330b86b1..5c7c1081 100644 --- a/modules/twitch-notifications/configs/streamers.json +++ b/modules/twitch-notifications/configs/streamers.json @@ -1,112 +1,144 @@ { + "description": { + "en": "Configure here, where for what streamer which message should get send", + "de": "Stelle hier ein, bei welchem Streamer in welchen Channel eine Nachricht gesendet werden soll" + }, + "humanName": { + "en": "Streamers", + "de": "Streamers" + }, "filename": "streamers.json", - "humanname-de": "Streamers", - "humanname-en": "Streamers", - "description-de": "Stelle hier ein, bei welchem Streamer in welchen Channel eine Nachricht gesendet werden soll", - "description-en": "Configure here, where for what streamer which message should get send", "configElements": true, "content": [ { - "field_name": "liveMessage", - "humanname-de": "Live-Nachricht", - "humanname-en": "Live-Messages", - "default-en": "Hey, %streamer% is live on Twitch streaming %game%! Check it out: %url%", - "default-de": "Hi, %streamer% ist Live auf Twitch und streamt %game%! Jetzt anschauen: %url%", + "name": "liveMessage", + "humanName": { + "en": "Live-Messages", + "de": "Live-Nachricht" + }, + "default": { + "en": "Hey, %streamer% is live on Twitch streaming %game%! Check it out: %url%", + "de": "Hi, %streamer% ist Live auf Twitch und streamt %game%! Jetzt anschauen: %url%" + }, + "description": { + "en": "Message that gets send if the streamer goes live", + "de": "Nachricht, die gesendet wird, wenn ein Streamer anfängt zu streamen" + }, "type": "string", "allowEmbed": true, - "description-en": "Message that gets send if the streamer goes live", - "description-de": "Nachricht, die gesendet wird, wenn ein Streamer anfängt zu streamen", - "params-en": [ + "params": [ { - "name": "%streamer%", - "description": "Name of the Streamer" + "name": "streamer", + "description": { + "en": "Name of the Streamer", + "de": "Name des Streamers" + } }, { - "name": "%game%", - "description": "Game which is streamed" + "name": "game", + "description": { + "en": "Game which is streamed", + "de": "Spiel, welches gestreamt wird" + } }, { - "name": "%url%", - "description": "Link to the stream" + "name": "url", + "description": { + "en": "Link to the stream", + "de": "Link zum Twitch-Stream" + } }, { - "name": "%title%", - "description": "Title of the Stream" + "name": "title", + "description": { + "en": "Title of the Stream", + "de": "Titel des Streams" + } }, { - "name": "%thumbnailUrl%", - "description": "The Link to the thumbnail of the Stream", - "isImage": true - } - ], - "params-de": [ - { - "name": "%streamer%", - "description": "Name des Streamers" - }, - { - "name": "%game%", - "description": "Spiel, welches gestreamt wird" - }, - { - "name": "%url%", - "description": "Link zum Twitch-Stream" - }, - { - "name": "%title%", - "description": "Titel des Streams" - }, - { - "name": "%thumbnailUrl%", - "description": "Link zum Thumbnail des Streams", + "name": "thumbnailUrl", + "description": { + "en": "The Link to the thumbnail of the Stream", + "de": "Link zum Thumbnail des Streams" + }, "isImage": true } ] }, { - "field_name": "liveMessageChannel", - "humanname-en": "Channel", - "default": "", - "type": "channelID", - "description-en": "Channel in which live-message should get sent", - "description-de": "Kanal, in welchen Benachrichtigung gesendet werden soll" + "name": "liveMessageChannel", + "humanName": { + "en": "Channel" + }, + "default": { + "en": "" + }, + "description": { + "en": "Channel in which live-message should get sent", + "de": "Kanal, in welchen Benachrichtigung gesendet werden soll" + }, + "type": "channelID" }, { - "field_name": "streamer", - "humanname-en": "Streamer", - "humanname-de": "Streamer", - "default": "", - "type": "string", - "description-en": "Streamer where a notification should send when they start streaming", - "description-de": "Steamer, bei denen eine Benachrichtigung gesendet werden soll, wenn sie anfangen, zu streamen" + "name": "streamer", + "humanName": { + "en": "Streamer", + "de": "Streamer" + }, + "default": { + "en": "" + }, + "description": { + "en": "Streamer where a notification should send when they start streaming", + "de": "Steamer, bei denen eine Benachrichtigung gesendet werden soll, wenn sie anfangen, zu streamen" + }, + "type": "string" }, { - "field_name": "liveRole", - "humanname-en": "Use Live-Role", - "humanname-de": "Live-Rolle Aktivieren", - "default": false, - "type": "boolean", - "description-en": "Should the Live-Role be activated?", - "description-de": "Soll die Live-Rolle aktiviert sein?" + "name": "liveRole", + "humanName": { + "en": "Use Live-Role", + "de": "Live-Rolle Aktivieren" + }, + "default": { + "en": false + }, + "description": { + "en": "Should the Live-Role be activated?", + "de": "Soll die Live-Rolle aktiviert sein?" + }, + "type": "boolean" }, { - "field_name": "id", - "humanname-en": "Discord-User ID", - "humanname-de": "Discord-Benutzer ID", - "default": "", + "name": "id", + "humanName": { + "en": "Discord-User ID", + "de": "Discord-Benutzer ID" + }, + "default": { + "en": "" + }, + "description": { + "en": "ID of the Discord-Account of the Streamer", + "de": "ID des Discord-Accounts des Streamers" + }, "type": "userID", - "description-en": "ID of the Discord-Account of the Streamer", - "description-de": "ID des Discord-Accounts des Streamers", "dependsOn": "liveRole" }, { - "field_name": "role", - "humanname-en": "Live Role", - "humanname-de": "Live Rolle", - "default": "", + "name": "role", + "humanName": { + "en": "Live Role", + "de": "Live Rolle" + }, + "default": { + "en": "" + }, + "description": { + "en": "ID of the Role that the Streamer should get, when live", + "de": "ID der Rolle, die der streamer bekommen soll, wenn er live ist" + }, "type": "roleID", - "description-en": "ID of the Role that the Streamer should get, when live", - "description-de": "ID der Rolle, die der streamer bekommen soll, wenn er live ist", "allowNull": true, "dependsOn": "liveRole" } diff --git a/modules/twitch-notifications/module.json b/modules/twitch-notifications/module.json index 254806d3..0329bb94 100644 --- a/modules/twitch-notifications/module.json +++ b/modules/twitch-notifications/module.json @@ -1,7 +1,5 @@ { "name": "twitch-notifications", - "humanReadableName-en": "Twitch-Notifications", - "humanReadableName-de": "Twitch-Benachrichtigungen", "fa-icon": "fa-brands fa-twitch", "author": { "name": "jateute", @@ -11,13 +9,19 @@ "events-dir": "/events", "models-dir": "/models", "openSourceURL": "https://github.com/jateute/CustomDCBot/tree/main/modules/twitch-notifications", - "description-en": "Module that sends a message to a channel, when a streamer goes live on Twitch", - "description-de": "Sendet eine Nachricht in einen ausgewählten Channel, wenn ein Streamer Live auf Twitch streamt", "config-example-files": [ "configs/config.json", "configs/streamers.json" ], "tags": [ "community" - ] -} \ No newline at end of file + ], + "humanReadableName": { + "en": "Twitch-Notifications", + "de": "Twitch-Benachrichtigungen" + }, + "description": { + "en": "Module that sends a message to a channel, when a streamer goes live on Twitch", + "de": "Sendet eine Nachricht in einen ausgewählten Channel, wenn ein Streamer Live auf Twitch streamt" + } +} diff --git a/modules/welcomer/configs/channels.json b/modules/welcomer/configs/channels.json index d6bd57e2..243df824 100644 --- a/modules/welcomer/configs/channels.json +++ b/modules/welcomer/configs/channels.json @@ -1,227 +1,310 @@ { + "description": { + "en": "Configure here in which channel which message should get send", + "de": "Passe hier an, in welchen Kanälen welche Nachricht gesendet werden soll" + }, + "humanName": { + "en": "Channel", + "de": "Kanäle" + }, "filename": "channels.json", - "humanname-en": "Channel", - "humanname-de": "Kanäle", - "description-de": "Passe hier an, in welchen Kanälen welche Nachricht gesendet werden soll", - "description-en": "Configure here in which channel which message should get send", "configElements": true, "content": [ { - "humanname-de": "Channel", - "humanname-en": "Channel", - "type": "channelID", - "default": "", - "description-en": "Channel in which the message should get send", - "description-de": "Kanal in welchen die Nachricht gesendet werden soll", - "field_name": "channelID", - "params-de": {}, - "default-de": "" + "name": "channelID", + "humanName": { + "en": "Channel", + "de": "Channel" + }, + "default": { + "en": "" + }, + "description": { + "en": "Channel in which the message should get send", + "de": "Kanal in welchen die Nachricht gesendet werden soll" + }, + "type": "channelID" }, { - "humanname-en": "Channel-Type", - "humanname-de": "Kanal-Typ", - "field_name": "type", + "name": "type", + "humanName": { + "en": "Channel-Type", + "de": "Kanal-Typ" + }, + "default": { + "en": "" + }, + "description": { + "en": "This sets in which content the channel should get used", + "de": "Dies gibt an, in welchem Kontext dieser Kanal verwendet werden soll" + }, "type": "select", - "default": "", - "description-de": "Dies gibt an, in welchem Kontext dieser Kanal verwendet werden soll", - "description-en": "This sets in which content the channel should get used", "content": [ "join", "leave", "boost", "unboost" - ], - "params-de": {}, - "default-de": "" + ] }, { - "humanname-en": "Random messages?", - "humanname-de": "Zufällige Nachrichten?", - "description-de": "Wenn aktiviert wird der Bot eine zufällige Nachricht aus deiner Konfiguration wählen, anstatt die unten", - "description-en": "If enabled the bot will randomly pick a messages instead of using the message option below", - "field_name": "randomMessages", - "type": "boolean", - "default": false, - "params-de": {}, - "default-de": false + "name": "randomMessages", + "humanName": { + "en": "Random messages?", + "de": "Zufällige Nachrichten?" + }, + "default": { + "en": false + }, + "description": { + "en": "If enabled the bot will randomly pick a messages instead of using the message option below", + "de": "Wenn aktiviert wird der Bot eine zufällige Nachricht aus deiner Konfiguration wählen, anstatt die unten" + }, + "type": "boolean" }, { - "field_name": "message", + "name": "message", + "humanName": { + "de": "Nachricht", + "en": "Message" + }, + "default": { + "en": "" + }, + "description": { + "en": "Message that should get send", + "de": "Nachricht, die gesendet wird" + }, "type": "string", - "default": "", "allowEmbed": true, - "description": "Message that should get send", - "params-en": [ + "params": [ { - "name": "%mention%", - "description": "Mentions the user", - "fieldValue": "type.join" + "name": "mention", + "description": { + "en": "Mentions the user", + "de": "Erwähnung des Nutzers" + } }, { - "name": "%memberProfilePictureUrl%", - "description": "URL of the user's avatar", - "fieldValue": "type.join", + "name": "memberProfilePictureUrl", + "description": { + "en": "URL of the user's avatar", + "de": "URL zum Avatar des Nutzers" + }, "isImage": true }, { - "name": "%servername%", - "description": "Name of the guild", - "fieldValue": "type.join" + "name": "servername", + "description": { + "en": "Name of the guild", + "de": "Servername" + } }, { - "name": "%tag%", - "description": "Tag of the user", - "fieldValue": "type.join" + "name": "tag", + "description": { + "en": "Tag of the user", + "de": "Tag des Nutzers" + } }, { - "name": "%createdAt%", - "description": "Date when account was created", - "fieldValue": "type.join" + "name": "createdAt", + "description": { + "en": "Date when account was created", + "de": "Datum an dem der Account erstellt wurde" + } }, { - "name": "%tag%", - "description": "Tag of the user", - "fieldValue": "type.leave" + "name": "tag", + "description": { + "en": "Tag of the user", + "de": "Tag des Nutzers" + } }, { - "name": "%memberProfilePictureUrl%", - "description": "URL of the user's avatar", - "fieldValue": "type.leave", + "name": "memberProfilePictureUrl", + "description": { + "en": "URL of the user's avatar", + "de": "URL zum Avatar des Nutzers" + }, "isImage": true }, { - "name": "%joinedAt%", - "description": "Date when user joined guild", - "fieldValue": "type.leave" + "name": "joinedAt", + "description": { + "en": "Date when user joined guild", + "de": "Datum, an dem der Nutzer den Server betreten hat" + } }, { - "name": "%guildUserCount%", - "description": "Count of users on the guild", - "fieldValue": "type.leave" + "name": "guildUserCount", + "description": { + "en": "Count of users on the guild", + "de": "Anzahl von Nutzern auf dem Server" + } }, { - "name": "%guildMemberCount%", - "description": "Count of members (without bots) on the guild", - "fieldValue": "type.leave" + "name": "guildMemberCount", + "description": { + "en": "Count of members (without bots) on the guild", + "de": "Anzahl von Nutzern auf dem Server" + } }, { - "name": "%mention%", - "description": "Mention of the user who boosted", - "fieldValue": "type.boost" + "name": "mention", + "description": { + "en": "Mention of the user who boosted", + "de": "Erwähnung des Nutzers" + } }, { - "name": "%boostCount%", - "description": "Total count of boosts", - "fieldValue": "type.boost" + "name": "boostCount", + "description": { + "en": "Total count of boosts", + "de": "Gesamte Anzahl an Boosts" + } }, { - "name": "%guildLevel%", - "description": "Boost-Level of the guild after the boost", - "fieldValue": "type.boost" + "name": "guildLevel", + "description": { + "en": "Boost-Level of the guild after the boost", + "de": "Boost-Level nach dem Boost" + } }, { - "name": "%mention%", - "description": "Mention of the user who unboosted", - "fieldValue": "type.unboost" + "name": "mention", + "description": { + "en": "Mention of the user who unboosted", + "de": "Erwähnung des Nutzers" + } }, { - "name": "%boostCount%", - "description": "Total count of boosts", - "fieldValue": "type.unboost" + "name": "boostCount", + "description": { + "en": "Total count of boosts", + "de": "Gesamte Anzahl an Boosts" + } }, { - "name": "%guildLevel%", - "description": "Boost-Level of the guild after the unboost", - "fieldValue": "type.unboost" + "name": "guildLevel", + "description": { + "en": "Boost-Level of the guild after the unboost", + "de": "Boost-Level nach dem Boost" + } } - ], - "params-de": [ - { - "name": "%mention%", - "description": "Erwähnung des Nutzers", - "fieldValue": "type.join" - }, - { - "name": "%memberProfilePictureUrl%", - "description": "URL zum Avatar des Nutzers", - "fieldValue": "type.join", - "isImage": true - }, - { - "name": "%servername%", - "description": "Servername", - "fieldValue": "type.join" - }, - { - "name": "%tag%", - "description": "Tag des Nutzers", - "fieldValue": "type.join" - }, - { - "name": "%createdAt%", - "description": "Datum an dem der Account erstellt wurde", - "fieldValue": "type.join" - }, - { - "name": "%tag%", - "description": "Tag des Nutzers", - "fieldValue": "leave" - }, - { - "name": "%memberProfilePictureUrl%", - "description": "URL zum Avatar des Nutzers", - "fieldValue": "type.leave", - "isImage": true - }, - { - "name": "%joinedAt%", - "description": "Datum, an dem der Nutzer den Server betreten hat", - "fieldValue": "type.leave" - }, - { - "name": "%guildUserCount%", - "description": "Anzahl von Nutzern auf dem Server", - "fieldValue": "type.leave" - }, - { - "name": "%guildMemberCount%", - "description": "Anzahl von Nutzern auf dem Server", - "fieldValue": "type.leave" - }, + ] + }, + { + "name": "welcome-button", + "humanName": { + "en": "Welcome-Button (only if \"Channel-Type\" = \"join\")", + "de": "Willkommens-Knopf (nur wenn \"Channel-Type\" = \"join\")" + }, + "default": { + "en": false + }, + "description": { + "en": "If enabled, a welcome-button will be attached to the welcome message. When a user clicks on it, the bot will send a welcome-ping in a configured channel. The button can be pressed once.", + "de": "If enabled, a welcome-button will be attached to the welcome message. When a user clicks on it, the bot will send a welcome-ping in a configured channel. The button can be pressed once." + }, + "type": "boolean" + }, + { + "name": "welcome-button-content", + "dependsOn": "welcome-button", + "humanName": { + "en": "Welcome-Button-Content", + "de": "Willkommens-Knopf-Inhalt" + }, + "default": { + "en": "Say hi \uD83D\uDC4B", + "de": "Hallo sagen \uD83D\uDC4B" + }, + "description": { + "en": "Content of the welcome button", + "de": "Inhalt des Willkommens-Knopfes" + }, + "type": "string" + }, + { + "name": "welcome-button-channel", + "dependsOn": "welcome-button", + "humanName": { + "en": "Channel in which the welcome-button should send a message", + "de": "Kanal, in welchen der Willkommens-Knopf die Nachricht senden soll" + }, + "default": { + "en": "", + "de": "" + }, + "description": { + "en": "The bot will send the configured message in this channel when a user presses the button", + "de": "Der Bot wird die konfigurierte Nachricht in diesen Kanal senden, wenn jemand den Knopf drückt" + }, + "type": "channelID" + }, + { + "name": "welcome-button-message", + "dependsOn": "welcome-button", + "humanName": { + "en": "Welcome-Button-Message", + "de": "Willkommens-Knopf-Nachricht" + }, + "default": { + "en": "%clickUserMention% welcomes %userMention% :wave:", + "de": "%clickUserMention% begrüßt %userMention% :wave:" + }, + "allowEmbed": true, + "description": { + "en": "This is the message the bot will send in the configured channel when a user presses the button", + "de": "Der Bot wird in diesen Kanal die Nachricht senden, wenn ein Nutzer den Knopf drückt" + }, + "type": "string", + "params": [ { - "name": "%mention%", - "description": "Erwähnung des Nutzers", - "fieldValue": "type.boost" + "name": "userMention", + "description": { + "en": "Mention of the user who joined the server", + "de": "Erwähnung des Nutzer, der den Server beigetreten hat" + } }, { - "name": "%boostCount%", - "description": "Gesamte Anzahl an Boosts", - "fieldValue": "type.boost" + "name": "userTag", + "description": { + "en": "Tag of the user who joined the server", + "de": "Tag des Nutzer, der den Server beigetreten hat" + } }, { - "name": "%guildLevel%", - "description": "Boost-Level nach dem Boost", - "fieldValue": "type.boost" + "name": "userAvatarURL", + "isImage": true, + "description": { + "en": "Avatar of the user who joined the server", + "de": "Avatar des Nutzer, der den Server beigetreten hat" + } }, { - "name": "%mention%", - "description": "Erwähnung des Nutzers, der aufgehört hat zu boosten", - "fieldValue": "type.unboost" + "name": "clickUserMention", + "description": { + "en": "Mention of the user who clicked the button", + "de": "Erwähnung des Nutzer, der den Knopf gedrückt hat" + } }, { - "name": "%boostCount%", - "description": "Gesamte Anzahl aller Boosts", - "fieldValue": "type.unboost" + "name": "clickUserTag", + "description": { + "en": "Tag of the user who clicked the button", + "de": "Tag des Nutzer, der den Knopf gedrückt hat" + } }, { - "name": "%guildLevel%", - "description": "Boost-Level nach der Entfernung des Boosts", - "fieldValue": "type.unboost" + "name": "clickUserAvatarURL", + "isImage": true, + "description": { + "en": "Avatar of the user who clicked the button", + "de": "Avatar des Nutzer, der den Knopf gedrückt hat" + } } - ], - "humanname-de": "Nachricht", - "description-de": "Nachricht, die gesendet wird", - "default-de": "" + ] } ] } \ No newline at end of file diff --git a/modules/welcomer/configs/config.json b/modules/welcomer/configs/config.json index 49a30290..bca3c006 100644 --- a/modules/welcomer/configs/config.json +++ b/modules/welcomer/configs/config.json @@ -1,54 +1,78 @@ { - "humanname-de": "Konfiguration", - "humanname-en": "Configuration", - "description-de": "Passe die grundlegenden Optionen des Modules hier an", - "description-en": "Manage the basic settings of this module here", + "description": { + "en": "Manage the basic settings of this module here", + "de": "Passe die grundlegenden Optionen des Modules hier an" + }, + "humanName": { + "en": "Configuration", + "de": "Konfiguration" + }, "filename": "config.json", "content": [ { - "humanname-en": "Give roles on join", - "humanname-de": "Nutzer Rollen beim Beitreten geben", - "field_name": "give-roles-on-join", - "default": [], + "name": "give-roles-on-join", + "humanName": { + "en": "Give roles on join", + "de": "Nutzer Rollen beim Beitreten geben" + }, + "default": { + "en": [], + "de": [] + }, + "description": { + "en": "Roles to give to a new member", + "de": "Rollen, die neuen Mitgliedern gegeben werden sollen" + }, "type": "array", - "content": "roleID", - "description-en": "Roles to give to a new member", - "description-de": "Rollen, die neuen Mitgliedern gegeben werden sollen", - "params-de": {}, - "default-de": [] + "content": "roleID" }, { - "field_name": "not-send-messages-if-member-is-bot", - "default": true, - "type": "boolean", - "humanname-en": "Ignore bots?", - "humanname-de": "Bots ignorieren?", - "description-en": "Should bots get ignored when they join (or leave) the server", - "description-de": "Sollen Bots ignoriert werden, wenn sie den Server beitreten (oder diesen verlassen)", - "params-de": {}, - "default-de": true + "name": "not-send-messages-if-member-is-bot", + "humanName": { + "en": "Ignore bots?", + "de": "Bots ignorieren?" + }, + "default": { + "en": true, + "de": true + }, + "description": { + "en": "Should bots get ignored when they join (or leave) the server", + "de": "Sollen Bots ignoriert werden, wenn sie den Server beitreten (oder diesen verlassen)" + }, + "type": "boolean" }, { - "field_name": "give-roles-on-boost", - "humanname-en": "Zusätzliche Rollen beim Boost geben", - "humanname-de": "Give additional roles to boosters", - "default": [], + "name": "give-roles-on-boost", + "humanName": { + "en": "Zusätzliche Rollen beim Boost geben", + "de": "Give additional roles to boosters" + }, + "default": { + "en": [], + "de": [] + }, + "description": { + "en": "Roles to give to members who boosts the server", + "de": "Rollen, die Booster haben sollen" + }, "type": "array", - "content": "roleID", - "description-en": "Roles to give to members who boosts the server", - "description-de": "Rollen, die Booster haben sollen", - "params-de": {}, - "default-de": [] + "content": "roleID" }, { - "field_name": "delete-welcome-message", - "humanname-en": "Delete welcome message", - "humanname-de": "Willkommensnachricht löschen", - "default": true, - "type": "boolean", - "description-en": "Should their welcome message be deleted, if a user leaves the server within 7 days", - "description-de": "Soll die Willkommensnachricht eines Nutzers, der den Server innerhalb von 7 Tagen wieder verlässt gelöscht werden", - "params-de": {} + "name": "delete-welcome-message", + "humanName": { + "en": "Delete welcome message", + "de": "Willkommensnachricht löschen" + }, + "default": { + "en": true + }, + "description": { + "en": "Should their welcome message be deleted, if a user leaves the server within 7 days", + "de": "Soll die Willkommensnachricht eines Nutzers, der den Server innerhalb von 7 Tagen wieder verlässt gelöscht werden" + }, + "type": "boolean" } ] } diff --git a/modules/welcomer/configs/random-messages.json b/modules/welcomer/configs/random-messages.json index b8414292..06f03873 100644 --- a/modules/welcomer/configs/random-messages.json +++ b/modules/welcomer/configs/random-messages.json @@ -1,206 +1,167 @@ { - "humanname-de": "Zufällige Nachrichten", - "humanname-en": "Random messages", - "description-de": "Passe hier die Nachrichten an, die zufällig gesendet werden sollen", - "description-en": "Manage the randomly send messages here", + "description": { + "en": "Manage the randomly send messages here", + "de": "Passe hier die Nachrichten an, die zufällig gesendet werden sollen" + }, + "humanName": { + "en": "Random messages", + "de": "Zufällige Nachrichten" + }, "filename": "random-messages.json", "configElements": true, "content": [ { - "humanname-de": "Nachricht-Type", - "humanname-en": "Message-Type", - "field_name": "type", + "name": "type", + "humanName": { + "en": "Message-Type", + "de": "Nachricht-Type" + }, + "default": { + "en": "" + }, + "description": { + "en": "This sets in which content the message should get send", + "de": "Dies gibt an, in welchem Kontext diese Nachricht versendet werden soll" + }, "type": "select", - "default": "", - "description-de": "Dies gibt an, in welchem Kontext diese Nachricht versendet werden soll", - "description-en": "This sets in which content the message should get send", "content": [ "join", "leave", "boost", "unboost" - ], - "params-de": {}, - "default-de": "" + ] }, { - "humanname-de": "Nachricht", - "humanname-en": "Message", - "field_name": "message", + "name": "message", + "humanName": { + "en": "Message", + "de": "Nachricht" + }, + "default": { + "en": "" + }, + "description": { + "en": "Message that should get send", + "de": "Nachricht, die gesendet werden soll" + }, "type": "string", "allowEmbed": true, - "default": "", - "description-en": "Message that should get send", - "description-de": "Nachricht, die gesendet werden soll", - "params-en": [ - { - "name": "%mention%", - "description": "Mentions the user", - "fieldValue": "type.join" - }, - { - "name": "%memberProfilePictureUrl%", - "description": "URL of the user's avatar", - "fieldValue": "type.join", - "isImage": true - }, - { - "name": "%servername%", - "description": "Name of the guild", - "fieldValue": "type.join" - }, - { - "name": "%tag%", - "description": "Tag of the user", - "fieldValue": "type.join" - }, - { - "name": "%createdAt%", - "description": "Date when account was created", - "fieldValue": "type.join" - }, - { - "name": "%tag%", - "description": "Tag of the user", - "fieldValue": "type.leave" - }, - { - "name": "%memberProfilePictureUrl%", - "description": "URL of the user's avatar", - "fieldValue": "type.leave", - "isImage": true - }, - { - "name": "%joinedAt%", - "description": "Date when user joined guild", - "fieldValue": "type.leave" - }, - { - "name": "%guildUserCount%", - "description": "Count of users on the guild", - "fieldValue": "type.leave" - }, - { - "name": "%guildMemberCount%", - "description": "Count of members (without bots) on the guild", - "fieldValue": "type.leave" - }, - { - "name": "%mention%", - "description": "Mention of the user who boosted", - "fieldValue": "type.boost" - }, - { - "name": "%boostCount%", - "description": "Total count of boosts", - "fieldValue": "type.boost" - }, - { - "name": "%guildLevel%", - "description": "Boost-Level of the guild after the boost", - "fieldValue": "type.boost" - }, - { - "name": "%mention%", - "description": "Mention of the user who unboosted", - "fieldValue": "type.unboost" - }, - { - "name": "%boostCount%", - "description": "Total count of boosts", - "fieldValue": "type.unboost" - }, - { - "name": "%guildLevel%", - "description": "Boost-Level of the guild after the unboost", - "fieldValue": "type.unboost" - } - ], - "params-de": [ + "params": [ { - "name": "%mention%", - "description": "Erwähnung des Nutzers", - "fieldValue": "type.join" + "name": "mention", + "description": { + "en": "Mentions the user", + "de": "Erwähnung des Nutzers" + } }, { - "name": "%memberProfilePictureUrl%", - "description": "URL zum Avatar des Nutzers", - "fieldValue": "type.join", + "name": "memberProfilePictureUrl", + "description": { + "en": "URL of the user's avatar", + "de": "URL zum Avatar des Nutzers" + }, "isImage": true }, { - "name": "%servername%", - "description": "Servername", - "fieldValue": "type.join" + "name": "servername", + "description": { + "en": "Name of the guild", + "de": "Servername" + } }, { - "name": "%tag%", - "description": "Tag des Nutzers", - "fieldValue": "type.join" + "name": "tag", + "description": { + "en": "Tag of the user", + "de": "Tag des Nutzers" + } }, { - "name": "%createdAt%", - "description": "Datum an dem der Account erstellt wurde", - "fieldValue": "type.join" + "name": "createdAt", + "description": { + "en": "Date when account was created", + "de": "Datum an dem der Account erstellt wurde" + } }, { - "name": "%tag%", - "description": "Tag des Nutzers", - "fieldValue": "leave" + "name": "tag", + "description": { + "en": "Tag of the user", + "de": "Tag des Nutzers" + } }, { - "name": "%memberProfilePictureUrl%", - "description": "URL zum Avatar des Nutzers", - "fieldValue": "type.leave", + "name": "memberProfilePictureUrl", + "description": { + "en": "URL of the user's avatar", + "de": "URL zum Avatar des Nutzers" + }, "isImage": true }, { - "name": "%joinedAt%", - "description": "Datum, an dem der Nutzer den Server betreten hat", - "fieldValue": "type.leave" + "name": "joinedAt", + "description": { + "en": "Date when user joined guild", + "de": "Datum, an dem der Nutzer den Server betreten hat" + } }, { - "name": "%guildUserCount%", - "description": "Anzahl von Nutzern auf dem Server", - "fieldValue": "type.leave" + "name": "guildUserCount", + "description": { + "en": "Count of users on the guild", + "de": "Anzahl von Nutzern auf dem Server" + } }, { - "name": "%guildMemberCount%", - "description": "Anzahl von Nutzern auf dem Server", - "fieldValue": "type.leave" + "name": "guildMemberCount", + "description": { + "en": "Count of members (without bots) on the guild", + "de": "Anzahl von Nutzern auf dem Server" + } }, { - "name": "%mention%", - "description": "Erwähnung des Nutzers", - "fieldValue": "type.boost" + "name": "mention", + "description": { + "en": "Mention of the user who boosted", + "de": "Erwähnung des Nutzers" + } }, { - "name": "%boostCount%", - "description": "Gesamte Anzahl an Boosts", - "fieldValue": "type.boost" + "name": "boostCount", + "description": { + "en": "Total count of boosts", + "de": "Gesamte Anzahl an Boosts" + } }, { - "name": "%guildLevel%", - "description": "Boost-Level nach dem Boost", - "fieldValue": "type.boost" + "name": "guildLevel", + "description": { + "en": "Boost-Level of the guild after the boost", + "de": "Boost-Level nach dem Boost" + } }, { - "name": "%mention%", - "description": "Erwähnung des Nutzers, der aufgehört hat zu boosten", - "fieldValue": "type.unboost" + "name": "mention", + "description": { + "en": "Mention of the user who unboosted", + "de": "Erwähnung des Nutzers" + } }, { - "name": "%boostCount%", - "description": "Gesamte Anzahl aller Boosts", - "fieldValue": "type.unboost" + "name": "boostCount", + "description": { + "en": "Total count of boosts", + "de": "Gesamte Anzahl an Boosts" + } }, { - "name": "%guildLevel%", - "description": "Boost-Level nach der Entfernung des Boosts", - "fieldValue": "type.unboost" + "name": "guildLevel", + "description": { + "en": "Boost-Level of the guild after the unboost", + "de": "Boost-Level nach dem Boost" + } } - ], - "default-de": "" + ] } ] } \ No newline at end of file diff --git a/modules/welcomer/events/guildMemberAdd.js b/modules/welcomer/events/guildMemberAdd.js index c0614604..bd314c93 100644 --- a/modules/welcomer/events/guildMemberAdd.js +++ b/modules/welcomer/events/guildMemberAdd.js @@ -11,7 +11,10 @@ module.exports.run = async function (client, guildMember) { const moduleChannels = client.configurations['welcomer']['channels']; if (!guildMember.pending && moduleConfig['give-roles-on-join'].length !== 0) { - await guildMember.roles.add(moduleConfig['give-roles-on-join']); + setTimeout(() => { + if (!guildMember.doNotGiveWelcomeRole) guildMember.roles.add(moduleConfig['give-roles-on-join']).then(() => { + }); + }, 1000); } for (const channelConfig of moduleChannels.filter(c => c.type === 'join')) { @@ -27,6 +30,20 @@ module.exports.run = async function (client, guildMember) { } if (!message) message = channelConfig.message; + const components = []; + if (channelConfig['welcome-button']) { + components.push({ + type: 'ACTION_ROW', + components: [ + { + label: channelConfig['welcome-button-content'], + customId: 'welcome-' + guildMember.id, + style: 'PRIMARY', + type: 'BUTTON' + } + ] + }); + } const sentMessage = await channel.send(embedType(message || 'Message not found', { '%mention%': guildMember.toString(), @@ -39,17 +56,18 @@ module.exports.run = async function (client, guildMember) { '%guildLevel%': client.guild.premiumTier, '%boostCount%%': client.guild.premiumSubscriptionCount, '%joinedAt%': formatDate(guildMember.joinedAt) - } + }, + {}, + components )); - const memberModel = await moduleModel.findOne({ where: { - userId: guildMember.id + userId: guildMember.id, + channelID: sentMessage.channelId } }); if (memberModel) { await memberModel.update({ - channelID: sentMessage.channelId, messageID: sentMessage.id, timestamp: new Date() }); diff --git a/modules/welcomer/events/guildMemberRemove.js b/modules/welcomer/events/guildMemberRemove.js index f40af6b5..8707834e 100644 --- a/modules/welcomer/events/guildMemberRemove.js +++ b/modules/welcomer/events/guildMemberRemove.js @@ -39,12 +39,13 @@ module.exports.run = async function (client, guildMember) { } )); } - const memberModel = await moduleModel.findOne({ + if (!moduleConfig['delete-welcome-message']) return; + const memberModels = await moduleModel.findAll({ where: { userId: guildMember.id } }); - if (memberModel && moduleConfig['delete-welcome-message']) { + for (const memberModel of memberModels) { const channel = await guildMember.guild.channels.fetch(memberModel.channelID).catch(() => { }); if (await timer(client, guildMember.id)) { @@ -53,13 +54,7 @@ module.exports.run = async function (client, guildMember) { } catch (e) { } } - await moduleModel.destroy({ - where: { - userId: guildMember.id - } - }); - - + await memberModel.destroy(); } }; diff --git a/modules/welcomer/events/guildMemberUpdate.js b/modules/welcomer/events/guildMemberUpdate.js index 3258263c..d1ea7a9b 100644 --- a/modules/welcomer/events/guildMemberUpdate.js +++ b/modules/welcomer/events/guildMemberUpdate.js @@ -50,7 +50,7 @@ module.exports.run = async function (client, oldGuildMember, newGuildMember) { '%memberProfilePictureUrl%': newGuildMember.user.avatarURL() || newGuildMember.user.defaultAvatarURL, '%createdAt%': formatDate(newGuildMember.user.createdAt), '%guildLevel%': client.guild.premiumTier, - '%boostCount%%': client.guild.premiumSubscriptionCount, + '%boostCount%': client.guild.premiumSubscriptionCount, '%joinedAt%': formatDate(newGuildMember.joinedAt) } )); diff --git a/modules/welcomer/module.json b/modules/welcomer/module.json index f87d41c9..0b816229 100644 --- a/modules/welcomer/module.json +++ b/modules/welcomer/module.json @@ -1,7 +1,5 @@ { "name": "welcomer", - "humanReadableName-de": "Willkommen und Boosts", - "humanReadableName-en": "Welcome and Boosts", "author": { "scnxOrgID": "1", "name": "SCDerox (SC Network Team)", @@ -9,8 +7,6 @@ }, "fa-icon": "fas fa-door-open", "openSourceURL": "https://github.com/SCNetwork/CustomDCBot/tree/main/modules/welcomer", - "description-en": "Simple module to say \"Hi\" to new members, give them roles automatically and say \"thanks\" to users who boosted", - "description-de": "Einfaches Modul zum Begrüßen von neuen Usern, zum automatischen Vergeben von Rollen beim Joinen und zum Bedanken bei Boosts.", "events-dir": "/events", "models-dir": "/models", "config-example-files": [ @@ -20,5 +16,13 @@ ], "tags": [ "administration" - ] -} \ No newline at end of file + ], + "humanReadableName": { + "en": "Welcome and Boosts", + "de": "Willkommen und Boosts" + }, + "description": { + "en": "Simple module to say \"Hi\" to new members, give them roles automatically and say \"thanks\" to users who boosted", + "de": "Einfaches Modul zum Begrüßen von neuen Usern, zum automatischen Vergeben von Rollen beim Joinen und zum Bedanken bei Boosts." + } +} diff --git a/package-lock.json b/package-lock.json index 0cdb62e3..d8fefeb1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "customdcbot", - "version": "3.5.0", + "version": "3.1.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "customdcbot", - "version": "3.5.0", + "version": "3.1.1", "license": "GPL-3.0-or-later", "dependencies": { "@androz2091/discord-invites-tracker": "1.1.1", @@ -18,25 +18,27 @@ "@twurple/auth": "5.2.4", "age-calculator": "1.0.0", "bs58": "5.0.0", - "bufferutil": "4.0.6", + "bufferutil": "4.0.7", "centra": "2.5.0", - "discord.js": "13.11.0", + "discord-logs": "2.0.1", + "discord.js": "13.10.3", + "dotenv": "16.0.3", "erlpack": "github:discord/erlpack", "fs-extra": "10.1.0", "is-equal": "1.6.4", "isomorphic-webcrypto": "2.3.8", "jsonfile": "6.1.0", - "log4js": "6.6.1", + "log4js": "6.7.0", "node-schedule": "2.1.0", "parse-duration": "1.0.2", - "sequelize": "6.23.2", - "sqlite3": "5.1.1", + "sequelize": "6.25.5", + "sqlite3": "5.1.2", "stop-discord-phishing": "0.3.1", - "utf-8-validate": "5.0.9", + "utf-8-validate": "5.0.10", "zlib-sync": "0.1.7" }, "devDependencies": { - "eslint": "8.24.0" + "eslint": "8.23.0" }, "funding": { "url": "https://github.com/SCNetwork/CustomDCBot?sponsor=1" @@ -5089,9 +5091,9 @@ } }, "node_modules/@xmldom/xmldom": { - "version": "0.7.5", - "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.7.5.tgz", - "integrity": "sha512-V3BIhmY36fXZ1OtVcI9W+FxQqxVLsPKcNjWigIaa81dLC9IolJl5Mt4Cvhmr0flUnjSpTdrbMTSbXqYqV5dT6A==", + "version": "0.7.9", + "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.7.9.tgz", + "integrity": "sha512-yceMpm/xd4W2a85iqZyO09gTnHvXF6pyiWjD2jcOJs7hRoZtNNOO1eJlhHj1ixA+xip2hOyGn+LgcvLCMo5zXA==", "optional": true, "peer": true, "engines": { @@ -6217,9 +6219,9 @@ "peer": true }, "node_modules/bufferutil": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.6.tgz", - "integrity": "sha512-jduaYOYtnio4aIAyc6UbvPCVcgq7nYpVnucyxr6eCYg/Woad9Hf/oxxBRDnGGjPfjUm6j5O/uBWhIu4iLebFaw==", + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.7.tgz", + "integrity": "sha512-kukuqc39WOHtdxtw4UScxF/WVnMFVSQVKhtx3AjZJzhd0RGZZldcrfSEbVsWWe6KNH253574cq5F+wpv0G9pJw==", "hasInstallScript": true, "dependencies": { "node-gyp-build": "^4.3.0" @@ -7069,9 +7071,9 @@ "peer": true }, "node_modules/date-format": { - "version": "4.0.13", - "resolved": "https://registry.npmjs.org/date-format/-/date-format-4.0.13.tgz", - "integrity": "sha512-bnYCwf8Emc3pTD8pXnre+wfnjGtfi5ncMDKy7+cWZXbmRAsdWkOQHrfC1yz/KiwP5thDp2kCHWYWKBX4HP1hoQ==", + "version": "4.0.14", + "resolved": "https://registry.npmjs.org/date-format/-/date-format-4.0.14.tgz", + "integrity": "sha512-39BOQLs9ZjKh0/patS9nrT8wc3ioX3/eA/zgbKNopnF2wCqJEoxywwwElATYvRsXdnOxA/OQeQoFZ3rFjVajhg==", "engines": { "node": ">=4.0" } @@ -7335,17 +7337,39 @@ "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.33.5.tgz", "integrity": "sha512-dvO5M52v7m7Dy96+XUnzXNsQ/0npsYpU6dL205kAtEDueswoz3aU3bh1UMoK4cQmcGtB1YRyLKqp+DXi05lzFg==" }, + "node_modules/discord-logs": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/discord-logs/-/discord-logs-2.0.1.tgz", + "integrity": "sha512-Dof1JOxeeQnzAw5Em8oJwUg3Bk217VRn7q8lAfjPaNwQ88+y6PpdBItREylnxsuzoBs5aNwJ3pCwNAhU7LM6GQ==", + "dependencies": { + "@types/node": "^14.0.1", + "@types/ws": "^7.2.1" + } + }, + "node_modules/discord-logs/node_modules/@types/node": { + "version": "14.18.33", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.33.tgz", + "integrity": "sha512-qelS/Ra6sacc4loe/3MSjXNL1dNQ/GjxNHVzuChwMfmk7HuycRLVQN2qNY3XahK+fZc5E2szqQSKUyAF0E+2bg==" + }, + "node_modules/discord-logs/node_modules/@types/ws": { + "version": "7.4.7", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-7.4.7.tgz", + "integrity": "sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==", + "dependencies": { + "@types/node": "*" + } + }, "node_modules/discord.js": { - "version": "13.11.0", - "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-13.11.0.tgz", - "integrity": "sha512-/vA6oQtKilFlwVZSIFipPeWg5kU6gjUOffuaYWtDDJwIXKqiThNdymLkmQhnf8Ztlt+3vKsoqXENrgpQdaNCVQ==", + "version": "13.10.3", + "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-13.10.3.tgz", + "integrity": "sha512-cIARuxfpQDeqA9Zw3fz4IL20xAhtMsjwJIf7/K82R3n2xROG9/fAx+7qjX8ysp9BfflYqMu2ZskyWq1EAmL5BA==", "dependencies": { "@discordjs/builders": "^0.16.0", "@discordjs/collection": "^0.7.0", "@sapphire/async-queue": "^1.5.0", "@types/node-fetch": "^2.6.2", "@types/ws": "^8.5.3", - "discord-api-types": "^0.33.5", + "discord-api-types": "^0.33.3", "form-data": "^4.0.0", "node-fetch": "^2.6.7", "ws": "^8.8.1" @@ -7380,6 +7404,14 @@ "node": ">=6.0.0" } }, + "node_modules/dotenv": { + "version": "16.0.3", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.0.3.tgz", + "integrity": "sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ==", + "engines": { + "node": ">=12" + } + }, "node_modules/dottie": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/dottie/-/dottie-2.0.2.tgz", @@ -7646,13 +7678,13 @@ } }, "node_modules/eslint": { - "version": "8.24.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.24.0.tgz", - "integrity": "sha512-dWFaPhGhTAiPcCgm3f6LI2MBWbogMnTJzFBbhXVRQDJPkr9pGZvVjlVfXd+vyDcWPA2Ic9L2AXPIQM0+vk/cSQ==", + "version": "8.23.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.23.0.tgz", + "integrity": "sha512-pBG/XOn0MsJcKcTRLr27S5HpzQo4kLr+HjLQIyK4EiCsijDl/TB+h5uEuJU6bQ8Edvwz1XWOjpaP2qgnXGpTcA==", "dev": true, "dependencies": { - "@eslint/eslintrc": "^1.3.2", - "@humanwhocodes/config-array": "^0.10.5", + "@eslint/eslintrc": "^1.3.1", + "@humanwhocodes/config-array": "^0.10.4", "@humanwhocodes/gitignore-to-minimatch": "^1.0.2", "@humanwhocodes/module-importer": "^1.0.1", "ajv": "^6.10.0", @@ -7670,6 +7702,7 @@ "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", "find-up": "^5.0.0", + "functional-red-black-tree": "^1.0.1", "glob-parent": "^6.0.1", "globals": "^13.15.0", "globby": "^11.1.0", @@ -7678,7 +7711,6 @@ "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", - "js-sdsl": "^4.1.4", "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", @@ -8848,6 +8880,12 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==", + "dev": true + }, "node_modules/functions-have-names": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", @@ -10442,12 +10480,6 @@ "optional": true, "peer": true }, - "node_modules/js-sdsl": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.1.5.tgz", - "integrity": "sha512-08bOAKweV2NUC1wqTtf3qZlnpOX/R2DU9ikpjOHs0H+ibQv3zpncVQg6um4uYtRtrwIX8M4Nh3ytK4HGlYAq7Q==", - "dev": true - }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -10891,15 +10923,15 @@ } }, "node_modules/log4js": { - "version": "6.6.1", - "resolved": "https://registry.npmjs.org/log4js/-/log4js-6.6.1.tgz", - "integrity": "sha512-J8VYFH2UQq/xucdNu71io4Fo+purYYudyErgBbswWKO0MC6QVOERRomt5su/z6d3RJSmLyTGmXl3Q/XjKCf+/A==", + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/log4js/-/log4js-6.7.0.tgz", + "integrity": "sha512-KA0W9ffgNBLDj6fZCq/lRbgR6ABAodRIDHrZnS48vOtfKa4PzWImb0Md1lmGCdO3n3sbCm/n1/WmrNlZ8kCI3Q==", "dependencies": { - "date-format": "^4.0.13", + "date-format": "^4.0.14", "debug": "^4.3.4", - "flatted": "^3.2.6", + "flatted": "^3.2.7", "rfdc": "^1.3.0", - "streamroller": "^3.1.2" + "streamroller": "^3.1.3" }, "engines": { "node": ">=8.0" @@ -14064,9 +14096,9 @@ } }, "node_modules/sequelize": { - "version": "6.23.2", - "resolved": "https://registry.npmjs.org/sequelize/-/sequelize-6.23.2.tgz", - "integrity": "sha512-0jy5pkRV7LZlBArIrYKfpKa+DowC+fIcI6LrWDfvdqFmuXZfmS4qq8gzFmIu0C210ts2Mmw/dghzRhX73xPoMg==", + "version": "6.25.5", + "resolved": "https://registry.npmjs.org/sequelize/-/sequelize-6.25.5.tgz", + "integrity": "sha512-QwA2kL4lSNy4mYTv1Zm4DjvloZLaYajuYF5QMOv0O7FameMUEl8Q5zOWRD+FNKGCLzyOJ28gQCo3HX0N9mcssA==", "funding": [ { "type": "opencollective", @@ -14677,9 +14709,9 @@ "peer": true }, "node_modules/sqlite3": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/sqlite3/-/sqlite3-5.1.1.tgz", - "integrity": "sha512-mMinkrQr/LKJqFiFF+AF7imPSzRCCpTCreusZO3D/ssJHVjZOrbu2Caz+zPH5KTmGGXBxXMGSRDssL+44CLxvg==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/sqlite3/-/sqlite3-5.1.2.tgz", + "integrity": "sha512-D0Reg6pRWAFXFUnZKsszCI67tthFD8fGPewRddDCX6w4cYwz3MbvuwRICbL+YQjBAh9zbw+lJ/V9oC8nG5j6eg==", "hasInstallScript": true, "dependencies": { "@mapbox/node-pre-gyp": "^1.0.0", @@ -14886,11 +14918,11 @@ } }, "node_modules/streamroller": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/streamroller/-/streamroller-3.1.2.tgz", - "integrity": "sha512-wZswqzbgGGsXYIrBYhOE0yP+nQ6XRk7xDcYwuQAGTYXdyAUmvgVFE0YU1g5pvQT0m7GBaQfYcSnlHbapuK0H0A==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/streamroller/-/streamroller-3.1.3.tgz", + "integrity": "sha512-CphIJyFx2SALGHeINanjFRKQ4l7x2c+rXYJ4BMq0gd+ZK0gi4VT8b+eHe2wi58x4UayBAKx4xtHpXT/ea1cz8w==", "dependencies": { - "date-format": "^4.0.13", + "date-format": "^4.0.14", "debug": "^4.3.4", "fs-extra": "^8.1.0" }, @@ -15738,9 +15770,9 @@ } }, "node_modules/utf-8-validate": { - "version": "5.0.9", - "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.9.tgz", - "integrity": "sha512-Yek7dAy0v3Kl0orwMlvi7TPtiCNrdfHNd7Gcc/pLq4BLXqfAmd0J7OWMizUQnTTJsyjKn02mU7anqwfmUP4J8Q==", + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.10.tgz", + "integrity": "sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==", "hasInstallScript": true, "dependencies": { "node-gyp-build": "^4.3.0" @@ -20272,9 +20304,9 @@ } }, "@xmldom/xmldom": { - "version": "0.7.5", - "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.7.5.tgz", - "integrity": "sha512-V3BIhmY36fXZ1OtVcI9W+FxQqxVLsPKcNjWigIaa81dLC9IolJl5Mt4Cvhmr0flUnjSpTdrbMTSbXqYqV5dT6A==", + "version": "0.7.9", + "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.7.9.tgz", + "integrity": "sha512-yceMpm/xd4W2a85iqZyO09gTnHvXF6pyiWjD2jcOJs7hRoZtNNOO1eJlhHj1ixA+xip2hOyGn+LgcvLCMo5zXA==", "optional": true, "peer": true }, @@ -21183,9 +21215,9 @@ "peer": true }, "bufferutil": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.6.tgz", - "integrity": "sha512-jduaYOYtnio4aIAyc6UbvPCVcgq7nYpVnucyxr6eCYg/Woad9Hf/oxxBRDnGGjPfjUm6j5O/uBWhIu4iLebFaw==", + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.7.tgz", + "integrity": "sha512-kukuqc39WOHtdxtw4UScxF/WVnMFVSQVKhtx3AjZJzhd0RGZZldcrfSEbVsWWe6KNH253574cq5F+wpv0G9pJw==", "requires": { "node-gyp-build": "^4.3.0" } @@ -21868,9 +21900,9 @@ "peer": true }, "date-format": { - "version": "4.0.13", - "resolved": "https://registry.npmjs.org/date-format/-/date-format-4.0.13.tgz", - "integrity": "sha512-bnYCwf8Emc3pTD8pXnre+wfnjGtfi5ncMDKy7+cWZXbmRAsdWkOQHrfC1yz/KiwP5thDp2kCHWYWKBX4HP1hoQ==" + "version": "4.0.14", + "resolved": "https://registry.npmjs.org/date-format/-/date-format-4.0.14.tgz", + "integrity": "sha512-39BOQLs9ZjKh0/patS9nrT8wc3ioX3/eA/zgbKNopnF2wCqJEoxywwwElATYvRsXdnOxA/OQeQoFZ3rFjVajhg==" }, "dayjs": { "version": "1.11.1", @@ -22070,17 +22102,41 @@ "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.33.5.tgz", "integrity": "sha512-dvO5M52v7m7Dy96+XUnzXNsQ/0npsYpU6dL205kAtEDueswoz3aU3bh1UMoK4cQmcGtB1YRyLKqp+DXi05lzFg==" }, + "discord-logs": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/discord-logs/-/discord-logs-2.0.1.tgz", + "integrity": "sha512-Dof1JOxeeQnzAw5Em8oJwUg3Bk217VRn7q8lAfjPaNwQ88+y6PpdBItREylnxsuzoBs5aNwJ3pCwNAhU7LM6GQ==", + "requires": { + "@types/node": "^14.0.1", + "@types/ws": "^7.2.1" + }, + "dependencies": { + "@types/node": { + "version": "14.18.33", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.33.tgz", + "integrity": "sha512-qelS/Ra6sacc4loe/3MSjXNL1dNQ/GjxNHVzuChwMfmk7HuycRLVQN2qNY3XahK+fZc5E2szqQSKUyAF0E+2bg==" + }, + "@types/ws": { + "version": "7.4.7", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-7.4.7.tgz", + "integrity": "sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==", + "requires": { + "@types/node": "*" + } + } + } + }, "discord.js": { - "version": "13.11.0", - "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-13.11.0.tgz", - "integrity": "sha512-/vA6oQtKilFlwVZSIFipPeWg5kU6gjUOffuaYWtDDJwIXKqiThNdymLkmQhnf8Ztlt+3vKsoqXENrgpQdaNCVQ==", + "version": "13.10.3", + "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-13.10.3.tgz", + "integrity": "sha512-cIARuxfpQDeqA9Zw3fz4IL20xAhtMsjwJIf7/K82R3n2xROG9/fAx+7qjX8ysp9BfflYqMu2ZskyWq1EAmL5BA==", "requires": { "@discordjs/builders": "^0.16.0", "@discordjs/collection": "^0.7.0", "@sapphire/async-queue": "^1.5.0", "@types/node-fetch": "^2.6.2", "@types/ws": "^8.5.3", - "discord-api-types": "^0.33.5", + "discord-api-types": "^0.33.3", "form-data": "^4.0.0", "node-fetch": "^2.6.7", "ws": "^8.8.1" @@ -22107,6 +22163,11 @@ "esutils": "^2.0.2" } }, + "dotenv": { + "version": "16.0.3", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.0.3.tgz", + "integrity": "sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ==" + }, "dottie": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/dottie/-/dottie-2.0.2.tgz", @@ -22330,13 +22391,13 @@ "dev": true }, "eslint": { - "version": "8.24.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.24.0.tgz", - "integrity": "sha512-dWFaPhGhTAiPcCgm3f6LI2MBWbogMnTJzFBbhXVRQDJPkr9pGZvVjlVfXd+vyDcWPA2Ic9L2AXPIQM0+vk/cSQ==", + "version": "8.23.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.23.0.tgz", + "integrity": "sha512-pBG/XOn0MsJcKcTRLr27S5HpzQo4kLr+HjLQIyK4EiCsijDl/TB+h5uEuJU6bQ8Edvwz1XWOjpaP2qgnXGpTcA==", "dev": true, "requires": { - "@eslint/eslintrc": "^1.3.2", - "@humanwhocodes/config-array": "^0.10.5", + "@eslint/eslintrc": "^1.3.1", + "@humanwhocodes/config-array": "^0.10.4", "@humanwhocodes/gitignore-to-minimatch": "^1.0.2", "@humanwhocodes/module-importer": "^1.0.1", "ajv": "^6.10.0", @@ -22354,6 +22415,7 @@ "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", "find-up": "^5.0.0", + "functional-red-black-tree": "^1.0.1", "glob-parent": "^6.0.1", "globals": "^13.15.0", "globby": "^11.1.0", @@ -22362,7 +22424,6 @@ "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", - "js-sdsl": "^4.1.4", "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", @@ -23292,6 +23353,12 @@ "functions-have-names": "^1.2.2" } }, + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==", + "dev": true + }, "functions-have-names": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", @@ -24480,12 +24547,6 @@ "optional": true, "peer": true }, - "js-sdsl": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.1.5.tgz", - "integrity": "sha512-08bOAKweV2NUC1wqTtf3qZlnpOX/R2DU9ikpjOHs0H+ibQv3zpncVQg6um4uYtRtrwIX8M4Nh3ytK4HGlYAq7Q==", - "dev": true - }, "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -24853,15 +24914,15 @@ } }, "log4js": { - "version": "6.6.1", - "resolved": "https://registry.npmjs.org/log4js/-/log4js-6.6.1.tgz", - "integrity": "sha512-J8VYFH2UQq/xucdNu71io4Fo+purYYudyErgBbswWKO0MC6QVOERRomt5su/z6d3RJSmLyTGmXl3Q/XjKCf+/A==", + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/log4js/-/log4js-6.7.0.tgz", + "integrity": "sha512-KA0W9ffgNBLDj6fZCq/lRbgR6ABAodRIDHrZnS48vOtfKa4PzWImb0Md1lmGCdO3n3sbCm/n1/WmrNlZ8kCI3Q==", "requires": { - "date-format": "^4.0.13", + "date-format": "^4.0.14", "debug": "^4.3.4", - "flatted": "^3.2.6", + "flatted": "^3.2.7", "rfdc": "^1.3.0", - "streamroller": "^3.1.2" + "streamroller": "^3.1.3" } }, "logkitty": { @@ -27397,9 +27458,9 @@ } }, "sequelize": { - "version": "6.23.2", - "resolved": "https://registry.npmjs.org/sequelize/-/sequelize-6.23.2.tgz", - "integrity": "sha512-0jy5pkRV7LZlBArIrYKfpKa+DowC+fIcI6LrWDfvdqFmuXZfmS4qq8gzFmIu0C210ts2Mmw/dghzRhX73xPoMg==", + "version": "6.25.5", + "resolved": "https://registry.npmjs.org/sequelize/-/sequelize-6.25.5.tgz", + "integrity": "sha512-QwA2kL4lSNy4mYTv1Zm4DjvloZLaYajuYF5QMOv0O7FameMUEl8Q5zOWRD+FNKGCLzyOJ28gQCo3HX0N9mcssA==", "requires": { "@types/debug": "^4.1.7", "@types/validator": "^13.7.1", @@ -27869,9 +27930,9 @@ "peer": true }, "sqlite3": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/sqlite3/-/sqlite3-5.1.1.tgz", - "integrity": "sha512-mMinkrQr/LKJqFiFF+AF7imPSzRCCpTCreusZO3D/ssJHVjZOrbu2Caz+zPH5KTmGGXBxXMGSRDssL+44CLxvg==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/sqlite3/-/sqlite3-5.1.2.tgz", + "integrity": "sha512-D0Reg6pRWAFXFUnZKsszCI67tthFD8fGPewRddDCX6w4cYwz3MbvuwRICbL+YQjBAh9zbw+lJ/V9oC8nG5j6eg==", "requires": { "@mapbox/node-pre-gyp": "^1.0.0", "node-addon-api": "^4.2.0", @@ -28038,11 +28099,11 @@ "peer": true }, "streamroller": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/streamroller/-/streamroller-3.1.2.tgz", - "integrity": "sha512-wZswqzbgGGsXYIrBYhOE0yP+nQ6XRk7xDcYwuQAGTYXdyAUmvgVFE0YU1g5pvQT0m7GBaQfYcSnlHbapuK0H0A==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/streamroller/-/streamroller-3.1.3.tgz", + "integrity": "sha512-CphIJyFx2SALGHeINanjFRKQ4l7x2c+rXYJ4BMq0gd+ZK0gi4VT8b+eHe2wi58x4UayBAKx4xtHpXT/ea1cz8w==", "requires": { - "date-format": "^4.0.13", + "date-format": "^4.0.14", "debug": "^4.3.4", "fs-extra": "^8.1.0" }, @@ -28706,9 +28767,9 @@ } }, "utf-8-validate": { - "version": "5.0.9", - "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.9.tgz", - "integrity": "sha512-Yek7dAy0v3Kl0orwMlvi7TPtiCNrdfHNd7Gcc/pLq4BLXqfAmd0J7OWMizUQnTTJsyjKn02mU7anqwfmUP4J8Q==", + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.10.tgz", + "integrity": "sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==", "requires": { "node-gyp-build": "^4.3.0" } diff --git a/package.json b/package.json index 5df49ba4..caa9ac3e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "customdcbot", - "version": "3.6.0", + "version": "3.7.0", "description": "Create your own discord bot - Fully customizable and with a lot of features", "main": "main.js", "repository": { @@ -29,24 +29,26 @@ "@twurple/auth": "5.2.4", "age-calculator": "1.0.0", "bs58": "5.0.0", - "bufferutil": "4.0.6", + "bufferutil": "4.0.7", "centra": "2.5.0", - "discord.js": "13.11.0", + "discord-logs": "2.0.1", + "discord.js": "13.10.3", + "dotenv": "16.0.3", "erlpack": "github:discord/erlpack", "fs-extra": "10.1.0", "is-equal": "1.6.4", "isomorphic-webcrypto": "2.3.8", "jsonfile": "6.1.0", - "log4js": "6.6.1", + "log4js": "6.7.0", "node-schedule": "2.1.0", "parse-duration": "1.0.2", - "sequelize": "6.23.2", - "sqlite3": "5.1.1", + "sequelize": "6.25.5", + "sqlite3": "5.1.2", "stop-discord-phishing": "0.3.1", - "utf-8-validate": "5.0.9", + "utf-8-validate": "5.0.10", "zlib-sync": "0.1.7" }, "devDependencies": { - "eslint": "8.24.0" + "eslint": "8.23.0" } } \ No newline at end of file diff --git a/src/functions/configuration.js b/src/functions/configuration.js index d8a93c26..f9376574 100644 --- a/src/functions/configuration.js +++ b/src/functions/configuration.js @@ -7,6 +7,7 @@ const jsonfile = require('jsonfile'); const fs = require('fs'); const {logger} = require('../../main'); const {localize} = require('./localize'); +const isEqual = require('is-equal'); /** * Check every (including module) configuration and load them @@ -18,253 +19,191 @@ const {localize} = require('./localize'); async function loadAllConfigs(client) { logger.info(localize('config', 'checking-config')); return new Promise(async (resolve, reject) => { - await fs.readdir(`${__dirname}/../../config-generator/`, async (err, files) => { + await fs.readdir(`${__dirname}/../../config-generator`, async (err, files) => { for (const f of files) { - await checkBuildInConfig(f).catch((reason) => reject(reason)); + await checkConfigFile(f).catch((reason) => { + logger.error(reason); + reject(reason); + }); } + }); - for (const moduleName in client.modules) { - if (!client.modules[moduleName].userEnabled) continue; - await checkModuleConfig(moduleName, client.modules[moduleName]['config']['on-checked-config-event'] ? require(`./modules/${moduleName}/${client.modules[moduleName]['config']['on-checked-config-event']}`) : null) - .catch(async (e) => { - client.modules[moduleName].enabled = false; - client.logger.error(`[CONFIGURATION] ERROR CHECKING ${moduleName}. Module disabled internally. Error: ${e}`); - if (client.scnxSetup) await require('./scnx-integration').reportIssue(client, { - type: 'MODULE_FAILURE', - errorDescription: 'module_disabled', - module: moduleName, - errorData: {reason: 'Invalid configuration: ' + e} - }); + for (const moduleName in client.modules) { + if (!client.modules[moduleName].userEnabled) continue; + await checkModuleConfig(moduleName, client.modules[moduleName]['config']['on-checked-config-event'] ? require(`./modules/${moduleName}/${client.modules[moduleName]['config']['on-checked-config-event']}`) : null) + .catch(async (e) => { + client.modules[moduleName].enabled = false; + client.logger.error(`[CONFIGURATION] ERROR CHECKING ${moduleName}. Module disabled internally. Error: ${e}`); + if (client.scnxSetup) await require('./scnx-integration').reportIssue(client, { + type: 'MODULE_FAILURE', + errorDescription: 'module_disabled', + module: moduleName, + errorData: {reason: 'Invalid configuration: ' + e} }); - } - const data = { - totalModules: Object.keys(client.modules).length, - enabled: Object.values(client.modules).filter(m => m.enabled).length, - configDisabled: Object.values(client.modules).filter(m => m.userEnabled && !m.enabled).length, - userEnabled: Object.values(client.modules).filter(m => m.userEnabled && !m.enabled).length - }; - logger.info(localize('config', 'done-with-checking', data)); - resolve(data); - }); + }); + } + const data = { + totalModules: Object.keys(client.modules).length, + enabled: Object.values(client.modules).filter(m => m.enabled).length, + configDisabled: Object.values(client.modules).filter(m => m.userEnabled && !m.enabled).length, + userEnabled: Object.values(client.modules).filter(m => m.userEnabled && !m.enabled).length + }; + logger.info(localize('config', 'done-with-checking', data)); + resolve(data); }); } /** - * Checks the build-in-configuration (not modules) - * @private - * @param {String} moduleName Name of the module to check - * @param {FileName} afterCheckEventFile File to execute after config got checked - * @returns {Promise} + * */ -async function checkModuleConfig(moduleName, afterCheckEventFile = null) { +async function checkConfigFile(file, moduleName) { + const {client} = require('../../main'); return new Promise(async (resolve, reject) => { - const {client} = require('../../main'); - const moduleConf = require(`../../modules/${moduleName}/module.json`); - if (!moduleConf['config-example-files']) return resolve(); - for (const v of moduleConf['config-example-files']) { - let exampleFile; - try { - exampleFile = require(`../../modules/${moduleName}/${v}`); - } catch (e) { - logger.error(`Not found config example file: ${moduleName}/${v}`); - return reject(`Not found config example file: ${moduleName}/${v}`); - } - if (!exampleFile) return; - let config = exampleFile.configElements ? [] : {}; - let ow = false; - try { - config = jsonfile.readFileSync(`${client.configDir}/${moduleName}/${exampleFile.filename}`); - } catch (e) { - logger.info(localize('config', 'creating-file', { - m: moduleName, - f: exampleFile.filename - })); - ow = true; + const builtIn = !moduleName; + let exampleFile; + try { + exampleFile = require(builtIn ? `${__dirname}/../../config-generator/${file}` : `${__dirname}/../../modules/${moduleName}/${file}`); + } catch (e) { + logger.error(`Not found config example file: ${file}`); + return reject(`Not found config example file: ${file}`); + } + if (!exampleFile) return; + let forceOverwrite = false; + let configData = exampleFile.configElements ? [] : {}; + try { + configData = jsonfile.readFileSync(`${client.configDir}${builtIn ? '' : '/' + moduleName}/${exampleFile.filename}`); + } catch (e) { + forceOverwrite = true; + logger.info(localize('config', 'creating-file', { + m: builtIn ? 'bot' : moduleName, + f: exampleFile.filename + })); + } + let newConfig = exampleFile.configElements ? [] : {}; + + if (exampleFile.skipContentCheck) newConfig = configData; + else if (exampleFile.configElements) { + if (!Array.isArray(configData)) { + client.logger.warn(`${builtIn ? '' : '/' + moduleName}/${exampleFile.filename}: This file should be a config-element, but is not. Converting to config-element.`); + if (typeof configData === 'object') configData = [configData]; + else configData = []; } - if (exampleFile.configElements) { - if (!Array.isArray(config)) { - client.logger.warn('Called f 239B (with addition: trying to automatically migrate) as work-around for wrong configuration'); // idk what the fuck this is, so i just added some random stuff to it - if (typeof config === 'object') config = [config]; - else config = []; - } - for (const field of exampleFile.content) { - if (client.locale) { - if (field[`default-${client.locale}`]) field.default = field[`default-${client.locale}`]; - else if (field[`default-en`]) field.default = field[`default-en`]; - } - for (const i in config) { - try { - config[i] = await checkField(field, config[i]); - } catch (e) { - return reject(e); - } - } - } - } else { + for (const object of configData) { + const objectData = {}; for (const field of exampleFile.content) { - if (client.locale) { - if (field[`default-${client.locale}`]) field.default = field[`default-${client.locale}`]; - else if (field[`default-en`]) field.default = field[`default-en`]; - } + const dependsOnField = field.dependsOn ? exampleFile.content.find(f => f.name === field.dependsOn) : null; + if (field.dependsOn && !dependsOnField) return reject(`Depends-On-Field ${field.dependsOn} does not exist.`); + if (dependsOnField && !(typeof object[dependsOnField.name] === 'undefined' ? (dependsOnField.default[client.locale] || dependsOnField.default['en']) : object[dependsOnField.name])) continue; try { - config = await checkField(field, config); + objectData[field.name] = await checkField(field, object[field.name]); } catch (e) { return reject(e); } } + newConfig.push(objectData); + } + } else { + for (const field of exampleFile.content) { + const dependsOnField = field.dependsOn ? exampleFile.content.find(f => f.name === field.dependsOn) : null; + if (field.dependsOn && !dependsOnField) return reject(`Depends-On-Field ${field.dependsOn} does not exist.`); + if (dependsOnField && !(typeof configData[dependsOnField.name] === 'undefined' ? (dependsOnField.default[client.locale] || dependsOnField.default['en']) : configData[dependsOnField.name])) { + newConfig[field.name] = configData[field.name]; // Otherwise disabled fields may be overwritten + continue; + } + try { + newConfig[field.name] = await checkField(field, configData[field.name]); + } catch (e) { + return reject(e); + } } + } - /** - * Checks the content of a field - * @param {Field} field Field-Object - * @param {*[]} configElement Current config element - * @returns {Promise} - */ - function checkField(field, configElement) { - return new Promise(async (res, rej) => { - if (!field.field_name) return rej('missing fieldname.'); - if (client.locale) { - if (field[`default-${client.locale}`]) field.default = field[`default-${client.locale}`]; - else if (field[`default-en`]) field.default = field[`default-en`]; - } - if (typeof configElement[field.field_name] === 'undefined') { - configElement[field.field_name] = field.default; - ow = true; - return res(configElement); - } else if (field.type === 'keyed' && field.disableKeyEdits) { - for (const key in field.default) { - if (!configElement[field.field_name][key]) { - ow = true; - configElement[field.field_name][key] = field.default[key]; - } - } - } - if (field.allowNull && (configElement[field.field_name] || '').toString().replaceAll(' ', '') === '' || typeof configElement[field.field_name] === 'undefined') return res(configElement); - if (!await checkType(field.type, configElement[field.field_name], field.content, field.allowEmbed)) { - if (client.scnxSetup) await require('./scnx-integration').reportIssue(client, { - type: 'CONFIGURATION_ISSUE', - module: moduleName, - field: field.field_name, - configFile: exampleFile.filename.replaceAll('.json', ''), - errorDescription: 'field_check_failed' - }); - logger.error(localize('config', 'checking-of-field-failed', { - fieldName: field.field_name, - m: moduleName, - f: exampleFile.filename - })); - rej(localize('config', 'checking-of-field-failed', { - fieldName: field.field_name, - m: moduleName, - f: exampleFile.filename - })); + /** + * Checks the content of a field + * @param {Field} field Field-Object + * @param {*} fieldValue Current config element + * @returns {Promise} + */ + function checkField(fieldData, fieldValue) { + const field = {...fieldData}; + return new Promise(async (res, rej) => { + if (!field.name) return rej('missing fieldname.'); + if (typeof field.default === 'undefined' || typeof field.default.en === 'undefined') { + console.log(field.default); + return rej('Missing default value on ' + field.name); + } + if (typeof field.default !== 'object') return rej(`${field.name} has an invalid default value. The default value needs to be localized. A possible fix could be: default = "${JSON.stringify({en: field.default})}". If you want a default value for all languages, only set the "en" key.`); + field.default = field.default[client.locale] || field.default['en']; + if (typeof fieldValue === 'undefined') { + fieldValue = field.default; + return res(fieldValue); + } else if (field.type === 'keyed' && field.disableKeyEdits) for (const key in field.default) if (typeof fieldValue[key] === 'undefined') fieldValue[key] = field.default[key]; + if (field.allowNull && field.type !== 'boolean' && !fieldValue) return res(fieldValue); + if (!await checkType(field.type, fieldValue, field.content, field.allowEmbed)) { + if (client.scnxSetup) await require('./scnx-integration').reportIssue(client, { + type: 'CONFIGURATION_ISSUE', + module: moduleName, + field: field.name, + configFile: exampleFile.filename.replaceAll('.json', ''), + errorDescription: 'field_check_failed' + }); + logger.error(localize('config', 'checking-of-field-failed', { + fieldName: field.name, + m: moduleName, + f: exampleFile.filename + })); + rej(localize('config', 'checking-of-field-failed', { + fieldName: field.name, + m: moduleName, + f: exampleFile.filename + })); + } + if (field.disableKeyEdits && field.type === 'keyed') { + for (const key in fieldValue) { + if (typeof field.default[key] === 'undefined') delete fieldValue[key]; } - if (field.disableKeyEdits) { - for (const content in configElement[field.field_name]) { - if (typeof field.default[content] === 'undefined') { - delete configElement[field.field_name][content]; - ow = true; - } - } + for (const key in field.default) { + if (typeof fieldValue[key] === 'undefined') fieldValue[key] = field.default[key]; } - if (client.scnxSetup) configElement[field.field_name] = require('./scnx-integration').setFieldValue(client, field, configElement[field.field_name]); - res(configElement); - }); - } + } + if (client.scnxSetup) fieldValue = require('./scnx-integration').setFieldValue(client, field, fieldValue); + res(fieldValue); + }); + } - if (ow) { - if (!fs.existsSync(`${client.configDir}/${moduleName}`)) fs.mkdirSync(`${client.configDir}/${moduleName}`); - jsonfile.writeFileSync(`${client.configDir}/${moduleName}/${exampleFile.filename}`, config, {spaces: 2}); - logger.info(localize('config', 'saved-file', { - f: v, - m: moduleName - })); - } - client.configurations[moduleName][exampleFile.filename.split('.json').join('')] = config; + if (!isEqual(configData, newConfig) || forceOverwrite) { + if (!fs.existsSync(`${client.configDir}/${moduleName}`) && moduleName) fs.mkdirSync(`${client.configDir}/${moduleName}`); + jsonfile.writeFileSync(`${client.configDir}${builtIn ? '' : '/' + moduleName}/${exampleFile.filename}`, newConfig, {spaces: 2}); + logger.info(localize('config', 'saved-file', { + f: file, + m: moduleName + })); } + if (!builtIn) client.configurations[moduleName][exampleFile.filename.split('.json').join('')] = newConfig; resolve(); - if (afterCheckEventFile) require(`../../modules/${moduleName}/${afterCheckEventFile}`).afterCheckEvent(config); - } - ); + }); } /** * Checks the build-in-configuration (not modules) * @private - * @param {String} configName Name of the configuration to check + * @param {String} moduleName Name of the module to check + * @param {FileName} afterCheckEventFile File to execute after config got checked * @returns {Promise} */ -async function checkBuildInConfig(configName) { +async function checkModuleConfig(moduleName, afterCheckEventFile = null) { return new Promise(async (resolve, reject) => { - const {client} = require('../../main'); - const exampleFile = require(`../../config-generator/${configName}`); - if (!exampleFile) return; - let config = {}; - let ow = false; + const moduleConf = require(`../../modules/${moduleName}/module.json`); + if ((moduleConf['config-example-files'] || []).length === 0) return resolve(); try { - config = jsonfile.readFileSync(`${client.configDir}/${configName}`); - } catch (e) { - logger.log(localize('config', 'creating-file', { - m: 'config', - f: configName - })); - ow = true; - } - if (!exampleFile.skipContentCheck) for (const field of exampleFile.content) { - if (!field.field_name) return reject(`One field is missing a name. Please check your config generation files`); - if (client.locale) { - if (field[`default-${client.locale}`]) field.default = field[`default-${client.locale}`]; - else if (field[`default-en`]) field.default = field[`default-en`]; - } - if (!config[field.field_name]) { - config[field.field_name] = field.default; - continue; - } - if (!await checkType(field.type, config[field.field_name], field.content, field.allowEmbed)) { - if (client.scnxSetup) await require('./scnx-integration').reportIssue(client, { - type: 'CONFIGURATION_ISSUE', - field: field.field_name, - configFile: exampleFile.filename.replaceAll('.json', ''), - errorDescription: 'field_check_failed' - }); - logger.error(localize('config', 'checking-of-field-failed', { - fieldName: field.field_name, - m: 'config', - f: exampleFile.filename - })); - return reject(localize('config', 'checking-of-field-failed', { - fieldName: field.field_name, - m: 'config', - f: exampleFile.filename - })); - } - if (field.disableKeyEdits) { - for (const content in config[field.field_name]) { - if (!field.default[content]) { - delete config[field.field_name][content]; - ow = true; - logger.warn(`Error with ${content} in ${field.field_name} in config/${configName}: Unexpected index ${content}. Auto-Fix attempt succeeded`); - } - } - } - } - else if (ow) config = exampleFile.default; - if (ow) { - jsonfile.writeFile(`${client.configDir}/${configName}`, config, {spaces: 2}, (err => { - if (err) { - logger.error(`An error occurred while saving config/${configName}: ${err}`); - } else { - logger.info(localize('config', 'saved-file', { - f: configName, - m: 'config' - })); - } - resolve(); - })); - } else { + for (const v of moduleConf['config-example-files']) await checkConfigFile(v, moduleName); resolve(); + } catch (r) { + reject(r); } - }); + if (afterCheckEventFile) require(`../../modules/${moduleName}/${afterCheckEventFile}`).afterCheckEvent(config); + } + ); } module.exports.loadAllConfigs = loadAllConfigs; @@ -297,7 +236,8 @@ async function checkType(type, value, contentFormat = null, allowEmbed = false) } return !errored; case 'userID': - const user = await client.users.fetch(value).catch(() => {}); + const user = await client.users.fetch(value).catch(() => { + }); if (!user) { logger.error(localize('config', 'user-not-found', {id: value})); return false; diff --git a/src/functions/helpers.js b/src/functions/helpers.js index da1eb526..6515924d 100644 --- a/src/functions/helpers.js +++ b/src/functions/helpers.js @@ -44,15 +44,15 @@ function inputReplacer(args, input) { * @param {string|array} input Input in the configuration file * @param {Object} args Object of variables to replace * @param {Object} optionsToKeep [BaseMessageOptions](https://discord.js.org/#/docs/main/stable/typedef/BaseMessageOptions) to keep + * @param {Array} mergeComponentsRows ActionRows to be merged with custom rows * @author Simon Csaba * @return {object} Returns [MessageOptions](https://discord.js.org/#/docs/main/stable/typedef/MessageOptions) */ -module.exports.embedType = function (input, args = {}, optionsToKeep = {}) { +module.exports.embedType = function (input, args = {}, optionsToKeep = {}, mergeComponentsRows = []) { if (!optionsToKeep.allowedMentions) { optionsToKeep.allowedMentions = {parse: ['users', 'roles']}; if (client.config.disableEveryoneProtection) optionsToKeep.allowedMentions.parse.push('everyone'); } - if (!optionsToKeep.allowedMentions) optionsToKeep.allowedMentions = {parse: ['users', 'roles']}; if (client.scnxSetup) input = require('./scnx-integration').verifyEmbedType(client, input); if (typeof input === 'string') { optionsToKeep.content = inputReplacer(args, input); @@ -69,7 +69,7 @@ module.exports.embedType = function (input, args = {}, optionsToKeep = {}) { if (input['thumbnail']) emb.setThumbnail(inputReplacer(args, input['thumbnail'])); if (input['author'] && typeof input['author'] === 'object' && (input['author'] || {}).name) emb.setAuthor({ name: inputReplacer(args, input['author']['name']), - iconURL: inputReplacer(args, input['author']['img']) + iconURL: input['author']['img'] ? inputReplacer(args, input['author']['img']) : null }); if (typeof input['fields'] === 'object') { input.fields.forEach(f => { @@ -84,7 +84,7 @@ module.exports.embedType = function (input, args = {}, optionsToKeep = {}) { }); optionsToKeep.embeds = [emb]; } else optionsToKeep.embeds = []; - if (!optionsToKeep.components && client.scnxSetup) optionsToKeep.components = require('./scnx-integration').returnSCNXComponents(input); + if (!optionsToKeep.components && client.scnxSetup) optionsToKeep.components = require('./scnx-integration').returnSCNXComponents(input, mergeComponentsRows); optionsToKeep.content = input['message'] ? inputReplacer(args, input['message']) : null; return optionsToKeep; };