mix ex_gram.router.tree (ex_gram_router v0.1.0)

Copy Markdown View Source

Prints the routing tree of an ExGram.Router bot module in a human-readable indented tree format.

Usage

mix ex_gram.router.tree MyApp.Bot

Example output

MyApp.Bot routing tree:
 scope
    filters: [Command(:start)]
    handle: &MyHandlers.start/1
 scope
     filters: [StateFilter(:registration)]
     scope
        filters: [Text, StateFilter({:sub_state, :get_name})]
        handle: &Handlers.got_name/1
     scope
         filters: [Text, StateFilter({:sub_state, :get_email})]
         handle: &Handlers.got_email/1

The module must use ExGram.Router — it must export __exgram_routing_tree__/0.