Compare commits
2 Commits
fd9cc47836
...
dec7d3a50a
Author | SHA1 | Date | |
---|---|---|---|
dec7d3a50a | |||
978e08b713 |
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
||||
node_modules
|
||||
secrets.env
|
||||
data
|
||||
tokens.txt
|
@ -40,7 +40,7 @@ module.exports = class DiscordBackup {
|
||||
}
|
||||
}
|
||||
|
||||
async serialize() {
|
||||
serialize() {
|
||||
return JSON.stringify(this.data);
|
||||
}
|
||||
|
||||
|
@ -15,7 +15,7 @@ commands.push({
|
||||
{
|
||||
type: "STRING",
|
||||
name: "text",
|
||||
description: "Text",
|
||||
description: "Text to translate",
|
||||
required: true
|
||||
}
|
||||
],
|
||||
@ -29,12 +29,60 @@ commands.push({
|
||||
{
|
||||
type: "STRING",
|
||||
name: "text",
|
||||
description: "Text",
|
||||
description: "Text to translate",
|
||||
required: true
|
||||
}
|
||||
],
|
||||
exec: i => t(i, "JA")
|
||||
});
|
||||
commands.push({
|
||||
name: "to",
|
||||
description: "Translate text to any language",
|
||||
global: true,
|
||||
options: [
|
||||
{
|
||||
type: "STRING",
|
||||
name: "lang",
|
||||
description: "Language to translate to",
|
||||
required: true,
|
||||
options: [
|
||||
{ name: 'Bulgarian', value: 'BG' },
|
||||
{ name: 'Czech', value: 'CS' },
|
||||
{ name: 'Danish', value: 'DA' },
|
||||
{ name: 'German', value: 'DE' },
|
||||
{ name: 'Greek', value: 'EL' },
|
||||
{ name: 'English (British)', value: 'EN-GB' },
|
||||
{ name: 'English (American)', value: 'EN-US' },
|
||||
{ name: 'Spanish', value: 'ES' },
|
||||
{ name: 'Estonian', value: 'ET' },
|
||||
{ name: 'Finnish', value: 'FI' },
|
||||
{ name: 'French', value: 'FR' },
|
||||
{ name: 'Hungarian', value: 'HU' },
|
||||
{ name: 'Italian', value: 'IT' },
|
||||
{ name: 'Japanese', value: 'JA' },
|
||||
{ name: 'Lithuanian', value: 'LT' },
|
||||
{ name: 'Latvian', value: 'LV' },
|
||||
{ name: 'Dutch', value: 'NL' },
|
||||
{ name: 'Polish', value: 'PL' },
|
||||
{ name: 'Portuguese (all Portuguese varieties excluding Brazilian Portuguese)', value: 'PT-PT' },
|
||||
{ name: 'Portuguese (Brazilian)', value: 'PT-BR' },
|
||||
{ name: 'Romanian', value: 'RO' },
|
||||
{ name: 'Russian', value: 'RU' },
|
||||
{ name: 'Slovak', value: 'SK' },
|
||||
{ name: 'Slovenian', value: 'SL' },
|
||||
{ name: 'Swedish', value: 'SV' },
|
||||
{ name: 'Chinese', value: 'ZH' }
|
||||
]
|
||||
},
|
||||
{
|
||||
type: "STRING",
|
||||
name: "text",
|
||||
description: "Text to translate",
|
||||
required: true
|
||||
}
|
||||
],
|
||||
exec: i => t(i, i.options.getString("lang"))
|
||||
});
|
||||
|
||||
async function t(i, target_lang) {
|
||||
var text = i.options.getString("text");
|
||||
|
Loading…
Reference in New Issue
Block a user