DonDebonair / slack-machine

A simple, yet powerful and extendable Slack bot
https://dondebonair.github.io/slack-machine/
MIT License
755 stars 54 forks source link

Type-hinted message listener functions #1035

Open DonDebonair opened 3 months ago

DonDebonair commented 3 months ago

Currently, message listener functions are called with a Message object and the named regex groups as keyword arguments. It would be nice to allow type hints so that these named groups can automatically be cast/parsed into the right type.

FastAPI could provide nice inspiration for how to do this parsing.