Skip to content

Commit

Permalink
deno fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
carafelix committed Jun 18, 2024
1 parent 3708c63 commit 9a8e7c4
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 45 deletions.
2 changes: 1 addition & 1 deletion src/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ export class Commands<C extends Context> {
* Calling this method with upperCased command names registered, will throw
* @see https://core.telegram.org/bots/api#botcommand
* @see https://core.telegram.org/method/bots.setBotCommands
*
*
* @param Instance of `bot` or { api: bot.api }
*/
public async setCommands({ api }: { api: Api }) {
Expand Down
2 changes: 1 addition & 1 deletion src/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export interface CommandsFlavor<C extends Context = Context> extends Context {
* Calling this method with upperCased command names registered, will throw
* @see https://core.telegram.org/bots/api#botcommand
* @see https://core.telegram.org/method/bots.setBotCommands
*
*
* @example
* ```typescript
* bot.hears("sudo", (ctx) =>
Expand Down
86 changes: 43 additions & 43 deletions test/jaroWrinkler.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,67 +115,67 @@ describe("Jaro-Wrinkler Algorithm", () => {
.localize("fr", "duc", "d");

cmds.command(/dad_(.*)/, "dad", () => {})
.localize('es', /papa_(.*)/, "f",);
.localize("es", /papa_(.*)/, "f");
it("should output all commands names, language and prefix", () => {
const json = cmds.toElementals();
assertEquals(json, [
{
name: "butcher",
language: "default",
prefix: "?",
scopes: [ { type: "default" } ],
description: "_"
name: "butcher",
language: "default",
prefix: "?",
scopes: [{ type: "default" }],
description: "_",
},
{
name: "carnicero",
language: "es",
prefix: "?",
scopes: [ { type: "default" } ],
description: "a"
name: "carnicero",
language: "es",
prefix: "?",
scopes: [{ type: "default" }],
description: "a",
},
{
name: "macellaio",
language: "it",
prefix: "?",
scopes: [ { type: "default" } ],
description: "b"
name: "macellaio",
language: "it",
prefix: "?",
scopes: [{ type: "default" }],
description: "b",
},
{
name: "duke",
language: "default",
prefix: "/",
scopes: [ { type: "default" } ],
description: "_"
name: "duke",
language: "default",
prefix: "/",
scopes: [{ type: "default" }],
description: "_",
},
{
name: "duque",
language: "es",
prefix: "/",
scopes: [ { type: "default" } ],
description: "c"
name: "duque",
language: "es",
prefix: "/",
scopes: [{ type: "default" }],
description: "c",
},
{
name: "duc",
language: "fr",
prefix: "/",
scopes: [ { type: "default" } ],
description: "d"
name: "duc",
language: "fr",
prefix: "/",
scopes: [{ type: "default" }],
description: "d",
},
{
name: "dad_(.*)",
language: "default",
prefix: "/",
scopes: [ { type: "default" } ],
description: "dad"
name: "dad_(.*)",
language: "default",
prefix: "/",
scopes: [{ type: "default" }],
description: "dad",
},
{
name: "papa_(.*)",
language: "es",
prefix: "/",
scopes: [ { type: "default" } ],
description: "f"
}
]);
name: "papa_(.*)",
language: "es",
prefix: "/",
scopes: [{ type: "default" }],
description: "f",
},
]);
});
});
describe("should return the command localization related to the user lang", () => {
Expand Down

0 comments on commit 9a8e7c4

Please sign in to comment.