-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: Add Schema Lang * chore: Renew schema * chore: Renew Schema * chore: Implement * chore(lang): First try on command runner * refactor: Add usefull comment * chore(lang): Implement on Argument parser * chore(lang): Implement on base type * chore(lang): Implement on Animals Command * refactor: Add emoji because koretekawaidesu! * chore(lang): Random response trans on 8ball * chore(lang): 9% Fun command * chore(lang): Fun 10% * chore(lang): All general command * chore(lang): 20% Fun Command * refactor: Change the post * chore(lang): Complete Music Module * feat: Add command to set lang * refactor(lang): Animal description * refactor(lang): remove type * chore(cat): Add aliases kitty * refactor(lang): Translate game desc * feat: Adding Sunda language
- Loading branch information
1 parent
ddd90bb
commit 734f735
Showing
60 changed files
with
1,061 additions
and
233 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,57 @@ | ||
[ | ||
"It is decidedly so", | ||
"Without a doubt", | ||
"Yes, definitely", | ||
"You may rely on it", | ||
"As I see it, yes", | ||
"Most likely", | ||
"Outlook good", | ||
"Yes", | ||
"Signs point to yes", | ||
"Reply hazy try again", | ||
"Ask again later", | ||
"Better not tell you now", | ||
"Cannot predict now", | ||
"Concentrate and ask again", | ||
"Don't count on it", | ||
"My reply is no", | ||
"My sources say no", | ||
"Outlook not so good", | ||
"Very doubtful", | ||
"Maybe?", | ||
"no", | ||
"Very Likely", | ||
"Probably No", | ||
"πOnly God Knows.", | ||
"πhmmm...", | ||
"π, What is your question?", | ||
"π€Don't see what happening!" | ||
] | ||
{ | ||
"en_US": [ | ||
"It is decidedly so", | ||
"Without a doubt", | ||
"Yes, definitely", | ||
"You may rely on it", | ||
"As I see it, yes", | ||
"Most likely", | ||
"Outlook good", | ||
"Yes", | ||
"Signs point to yes", | ||
"Reply hazy try again", | ||
"Ask again later", | ||
"Better not tell you now", | ||
"Cannot predict now", | ||
"Concentrate and ask again", | ||
"Don't count on it", | ||
"My reply is no", | ||
"My sources say no", | ||
"Outlook not so good", | ||
"Very doubtful", | ||
"Maybe?", | ||
"no", | ||
"Very Likely", | ||
"Probably No", | ||
"πOnly God Knows.", | ||
"πhmmm...", | ||
"π, What is your question?", | ||
"π€Don't see what happening!" | ||
], | ||
"id_ID": [ | ||
"Ini sudah pasti", | ||
"Ya, tanpa keraguan!", | ||
"Ya tentu saja!", | ||
"Kamu mungkin bergantung padanya", | ||
"Seperti yang kulihat ya!", | ||
"Hampir", | ||
"Ya", | ||
"Kurasa ya", | ||
"Emm coba lagi", | ||
"Tanya lagi nanti", | ||
"Bukan saatnya untuk memberi tahu mu", | ||
"Tidak terprediksi", | ||
"Kosentrasi dan bertanya lagi!", | ||
"Jangan anggap itu", | ||
"Jawaban ku adalah tidak", | ||
"Core ku menjawab tidak", | ||
"Sangat meragukan", | ||
"Mungkin?", | ||
"Tidak", | ||
"Mungkin No", | ||
"πHanya tuhan yang tahu.", | ||
"πhmmm...", | ||
"πApa pertanyaan mu?", | ||
"π€Tidak melihat apa yang terjadi!" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
import YumekoClient from "@yumeko/classes/Client"; | ||
import Command from "@yumeko/classes/Command"; | ||
import type { Message } from "discord.js"; | ||
import { DeclareCommand } from "@yumeko/decorators"; | ||
import CustomError from "@yumeko/classes/CustomError"; | ||
import { oneLineTrim } from "common-tags"; | ||
|
||
@DeclareCommand("language", { | ||
aliases: ["language", "lang", "setlang", "locale"], | ||
description: { | ||
content: (msg): string => msg.guild!.loc.get("COMMAND_LANGUAGE_DESCRIPTION"), | ||
usage: "language [lang]", | ||
examples: ["language", "language id_ID", "language 1"] | ||
}, | ||
category: "admin", | ||
permissions: { | ||
user: ["MANAGE_GUILD"] | ||
}, | ||
args: [ | ||
{ | ||
identifier: "language", | ||
match: "single", | ||
type: (msg, content): string => { | ||
const { langs } = msg.client as YumekoClient; | ||
let lang: string | void; | ||
if (!isNaN(Number(content))) lang = langs.keyArray()[Number(content) - 1]; | ||
else if (langs.has(content)) lang = content; | ||
if (!lang) throw new CustomError("!PARSING", msg.guild!.loc.get("COMMAND_LANGUAGE_NOT_FOUND", content)); | ||
return lang; | ||
}, | ||
optional: true | ||
} | ||
] | ||
}) | ||
export default class extends Command { | ||
public async exec(msg: Message, { language }: { language?: string }): Promise<Message> { | ||
if (language) { | ||
msg.guild!.loc.lang = language; | ||
const currentLang: [string, string] = [ | ||
msg.guild!.loc.get("META_NAME"), | ||
msg.guild!.loc.get("META_EMOJI") | ||
]; | ||
return msg.ctx.send(msg.guild!.loc.get("COMMAND_LANGUAGE_SET", ...currentLang)); | ||
} | ||
const currentLang: [string, string] = [ | ||
msg.guild!.loc.get("META_NAME"), | ||
msg.guild!.loc.get("META_EMOJI") | ||
]; | ||
let index = 0; | ||
const list = this.client.langs.map((x, i) => oneLineTrim` | ||
\`${++index}.\` | ||
**${x.META_NAME()}** | ||
\`${i}\` | ||
${x.META_EMOJI()} | ||
`).join("\n"); | ||
return msg.ctx.send(msg.guild!.loc.get("COMMAND_LANGUAGE_LIST", msg.prefix!, list, ...currentLang)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.