rockneurotiko/ex_gram

Command parsing is buggy for `/command@botname`

indocomsoft opened this issue · 1 comments

This is sometimes required for a bot with privacy mode on in a group.

Are you using the middleware to ignore @botname?

defmodule MyBot do
    use ExGram.Bot, name: :my_bot

    middleware ExGram.Middleware.IgnoreUsername # <--- This middleware

   ....
end

You can read the source code here: https://github.com/rockneurotiko/ex_gram/blob/master/lib/ex_gram/middleware/ignore_username.ex

Basically, it removes from the command the @botname of your bot.