Compare commits
No commits in common. "dec7d3a50a4c997a28fb9bad1a262aed28d7c864" and "fd9cc4783609b73d87593bdd3f1a98c2c5099a2a" have entirely different histories.
dec7d3a50a
...
fd9cc47836
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,4 +1,3 @@
|
||||
node_modules
|
||||
secrets.env
|
||||
data
|
||||
tokens.txt
|
@ -40,7 +40,7 @@ module.exports = class DiscordBackup {
|
||||
}
|
||||
}
|
||||
|
||||
serialize() {
|
||||
async serialize() {
|
||||
return JSON.stringify(this.data);
|
||||
}
|
||||
|
||||
|
@ -15,7 +15,7 @@ commands.push({
|
||||
{
|
||||
type: "STRING",
|
||||
name: "text",
|
||||
description: "Text to translate",
|
||||
description: "Text",
|
||||
required: true
|
||||
}
|
||||
],
|
||||
@ -29,60 +29,12 @@ commands.push({
|
||||
{
|
||||
type: "STRING",
|
||||
name: "text",
|
||||
description: "Text to translate",
|
||||
description: "Text",
|
||||
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