grammyjs / commands

Work-in-progress plugin for managing commands with grammY.
https://grammy.dev
MIT License
12 stars 2 forks source link

`setCommands` and `setMyCommands` registering command with custom prefixes in the telegram command menu #37

Closed carafelix closed 2 months ago

carafelix commented 3 months ago

for the following command group:

const userCommands = new Commands()

userCommands.command('start', 'example', (ctx) => {
    ctx.reply('a')
})
userCommands.command('entecito', '_', () => {}, {
    prefix: '?',
})

calling either:

await userCommands.setCommands(bot)

bot.command('help', async (ctx) => {
    await ctx.setMyCommands(userCommands)
})

will register imagen when it should only register the example start command