@grammyjs/commands 0.6.0 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/out/command.d.ts CHANGED
@@ -17,7 +17,7 @@ export declare class Command<C extends Context = Context> implements MiddlewareO
17
17
  *
18
18
  * @param name Default command name
19
19
  * @param description Default command description
20
- * @param options Options object that shuold apply to this command only
20
+ * @param options Options object that should apply to this command only
21
21
  * @access package
22
22
  */
23
23
  constructor(name: string | RegExp, description: string, options?: Partial<CommandOptions>);
package/out/command.js CHANGED
@@ -19,7 +19,7 @@ class Command {
19
19
  *
20
20
  * @param name Default command name
21
21
  * @param description Default command description
22
- * @param options Options object that shuold apply to this command only
22
+ * @param options Options object that should apply to this command only
23
23
  * @access package
24
24
  */
25
25
  constructor(name, description, options = {}) {
package/out/commands.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Command, MaybeArray } from "./command.js";
2
- import { Api, BotCommand, BotCommandScope, Context, Middleware } from "./deps.node.js";
2
+ import { Api, BotCommand, BotCommandScope, CommandContext, Context, Middleware } from "./deps.node.js";
3
3
  import { CommandOptions } from "./types.js";
4
4
  type SetMyCommandsParams = {
5
5
  /**
@@ -40,7 +40,7 @@ export declare class Commands<C extends Context> {
40
40
  * @param options Extra options that should apply only to this command
41
41
  * @returns An instance of the `Command` class
42
42
  */
43
- command(name: string | RegExp, description: string, handler: MaybeArray<Middleware<C>>, options?: Partial<CommandOptions>): Command<C>;
43
+ command(name: string | RegExp, description: string, handler: MaybeArray<Middleware<CommandContext<C>>>, options?: Partial<CommandOptions>): Command<C>;
44
44
  /**
45
45
  * Registers a new command with no handlers.
46
46
  * @param name Default command name
@@ -1,2 +1,2 @@
1
- export { Api, Bot, type ChatTypeContext, type ChatTypeMiddleware, type CommandMiddleware, Composer, Context, type Middleware, type MiddlewareObj, type NextFunction, } from "grammy";
1
+ export { Api, Bot, type ChatTypeContext, type ChatTypeMiddleware, type CommandContext, type CommandMiddleware, Composer, Context, type Middleware, type MiddlewareObj, type NextFunction, } from "grammy";
2
2
  export type { BotCommand, BotCommandScope, BotCommandScopeAllChatAdministrators, BotCommandScopeAllGroupChats, BotCommandScopeAllPrivateChats, Chat, } from "grammy/types";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grammyjs/commands",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "description": "grammY Commands Plugin",
5
5
  "main": "out/mod.js",
6
6
  "scripts": {