# `ExGram.Middleware.IgnoreUsername`
[🔗](https://github.com/rockneurotiko/ex_gram/blob/0.65.0/lib/ex_gram/middleware/ignore_username.ex#L1)

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
    end

See the [Middlewares guide](middlewares.md) for more details.

# `call`

# `init`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
