Middleware that strips the bot username from commands.
Transforms /command@bot_username to /command before the message is handled.
This is useful when your bot is used in group chats where commands may be
explicitly targeted at your bot to avoid ambiguity with other bots.
Example
defmodule MyBot do
use ExGram.Bot, name: :my_bot
middleware ExGram.Middleware.IgnoreUsername
endSee the Middlewares guide for more details.
Summary
Functions
Callback implementation for ExGram.Middleware.call/2.
Callback implementation for ExGram.Middleware.init/1.
Functions
Callback implementation for ExGram.Middleware.call/2.
Callback implementation for ExGram.Middleware.init/1.