From 8cf9b6af949eb2d35df7b701f8173ce893f93f36 Mon Sep 17 00:00:00 2001 From: Syping Date: Tue, 20 Feb 2024 01:53:15 +0100 Subject: [PATCH] improve configuration example --- etc/dtranslatebot.example.json | 37 ++++++++++++++++++++++++++++++++++ etc/dtranslatebot.json | 37 ++-------------------------------- 2 files changed, 39 insertions(+), 35 deletions(-) create mode 100644 etc/dtranslatebot.example.json diff --git a/etc/dtranslatebot.example.json b/etc/dtranslatebot.example.json new file mode 100644 index 0000000..202a0ee --- /dev/null +++ b/etc/dtranslatebot.example.json @@ -0,0 +1,37 @@ +{ + "guilds": { + "$guild1_id": { + "$channel1_id": { + "source": "en", + "target": "de", + "webhook": "https://discord.com/api/webhooks/$guild1_de_webhook_id/$guild1_de_webhook_token" + }, + "$channel2_id": { + "source": "de", + "target": "en", + "webhook": "https://discord.com/api/webhooks/$guild1_en_webhook_id/$guild1_en_webhook_token" + } + }, + "My Discord Guild": { + "id": $guild2_id, + "General English": { + "id": $channel3_id, + "source": "en", + "target": { + "de": "https://discord.com/api/webhooks/$guild2_de_webhook_id/$guild2_de_webhook_token", + "fr": "https://discord.com/api/webhooks/$guild2_fr_webhook_id/$guild2_fr_webhook_token" + } + } + } + }, + "preferred_lang": ["en", "de", "fr", ...], + "storage": "$working_directory", + "user": { + "avatar_size": 256 + }, + "token": "$bot_token", + "translator": { + "url": "http://127.0.0.1:5000/", + "apiKey": "" + } +} diff --git a/etc/dtranslatebot.json b/etc/dtranslatebot.json index a63b7e2..28381db 100644 --- a/etc/dtranslatebot.json +++ b/etc/dtranslatebot.json @@ -1,40 +1,7 @@ { - "guilds": { - "$guild1_id": { - "$channel1_id": { - "source": "en", - "target": "de", - "webhook": "https://discord.com/api/webhooks/$guild1_de_webhook_id/$guild1_de_webhook_token" - }, - "$channel2_id": { - "source": "de", - "target": "en", - "webhook": "https://discord.com/api/webhooks/$guild1_en_webhook_id/$guild1_en_webhook_token" - } - }, - "My Discord Guild": { - "id": "$guild2_id", - "General English": { - "id": "$channel3_id", - "source": "en", - "target": { - "de": "https://discord.com/api/webhooks/$guild2_de_webhook_id/$guild2_de_webhook_token", - "fr": "https://discord.com/api/webhooks/$guild2_fr_webhook_id/$guild2_fr_webhook_token" - } - } - } - }, - "preferred_lang": ["en", "de", "fr", ...], - "storage": "$working_directory", - "user": { - "avatar_size": 256 - }, - "token": "$bot_token", + "token": "", "translator": { - "hostname": "127.0.0.1", - "port": 80, - "url": "/", - "tls": false, + "url": "http://127.0.0.1:5000/", "apiKey": "" } }