UsergeTeam / Userge-Plugins

Plugins for Userge

Home Page:https://userge.tech

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Userge-Plugins ๐Ÿ’Ž

Build Status Python Version Release Stars Forks Issues Open Issues Closed PR Open PR Closed Contributors Repo Size License Commit Activity Main Repo! Join Channel! DeepSource

Documentation ๐Ÿ“˜

Main Repo ๐Ÿ’ก

Contributing ๐Ÿ‘ฅ

You can support us by contributing to this project development. If you have any suggestions or improvements, please create an issue. Pull Requests are most welcome !

Example Plugin ๐Ÿคจ

from userge import userge, Message, filters

LOG = userge.getLogger(__name__)  # logger object
CHANNEL = userge.getCLogger(__name__)  # channel logger object

# add command handler
@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

# add filters handler
@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!")

Support & Discussions ๐Ÿ‘ฅ

Head over to the Discussion Group and Update Channel

Copyright & License ๐Ÿ‘ฎ

About

Plugins for Userge

https://userge.tech

License:GNU General Public License v3.0


Languages

Language:Python 100.0%