Anycase commands for Telegraf
npm install telegraf-anycase-commands
$ npm install telegraf-anycase-commands
or
$ yarn add telegraf-anycase-commands
`
$3
`javascript
const AnyCase = require('telegraf-anycase-commands')
const bot = new Telegraf(process.env.BOT_TOKEN)
// Or:
const bot = new Composer()
// Then:
AnyCase.apply(bot)
// Or simply:
const bot = AnyCase.apply(new Telegraf(process.env.BOT_TOKEN))
// Or:
const bot = AnyCase.apply(new Composer())
`
Or if you only want to use the middleware for commands in incoming messages, without applying it on commands in your code:
`javascript
bot.use(AnyCase.lowercase())
``