- 👋 Hi, I’m @Mpriyanshu
- 👀 I’m interested in ...
- 🌱 I’m currently learning ...
- 💞️ I’m looking to collaborate on ...
- 📫 How to reach me ...
from userge import userge, Message, filters
LOG = userge.getLogger(name) # logger object CHANNEL = userge.getCLogger(name) # channel logger object
@userge.on_cmd("test", about="help text to this command") async def test_cmd(message: Message): LOG.info("starting test command...") # log to console
await message.edit("testing...", del_in=5) # this will be automatically deleted after 5 sec
await CHANNEL.log("testing completed!") # log to channel
@userge.on_filters(filters.me & filters.private) # filter my private messages async def test_filter(message: Message): LOG.info("starting filter command...")
await message.reply(f"you typed - {message.text}", del_in=5)
await CHANNEL.log("filter executed!")