Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Ext-Creators/discord-ext-rx
⚛️ A discord.py extension with a reactive events implementation.
https://github.com/Ext-Creators/discord-ext-rx
Last synced: 3 months ago
JSON representation
⚛️ A discord.py extension with a reactive events implementation.
- Host: GitHub
- URL: https://github.com/Ext-Creators/discord-ext-rx
- Owner: Ext-Creators
- License: apache-2.0
- Archived: true
- Created: 2020-07-20T12:10:52.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-08-02T18:35:05.000Z (over 4 years ago)
- Last Synced: 2024-09-17T23:12:02.924Z (4 months ago)
- Language: Python
- Homepage:
- Size: 13.7 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGELOG.rst
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
- awesome-discordpy - Ext-Creators/discord-ext-rx - A discord.py extension with a reactive events implementation. (Archived/Deprecated / Miscellaneous)
README
discord-ext-rx
==============|package| |versions| |dependencies| |license| |cloned|
Combine `RxPy`_ with `discord.py`_.
⚠️ Work In Progress!
Installation
------------This extension is on `PyPI `_.
.. code-block:: sh
$ python3 -m pip install -U discord-ext-rx
Usage
-----.. code:: py
from discord.ext.rx import RxBot, _
from rx import operators as opsbot = RxBot()
bot.messages.pipe(
ops.filter(lambda m: m.author.id == 121678432504512512),
ops.filter(lambda m: m.content == '418'),
ops.map(lambda m: m.channel)
).subscribe(
_(lambda c: c.send("I'm a teapot!"))
)bot.run('token')
.. _RxPy: https://github.com/ReactiveX/RxPy
.. _discord.py: https://github.com/Rapptz/discord.py.. |package| image:: https://img.shields.io/pypi/v/discord-ext-rx.svg
.. |versions| image:: https://img.shields.io/pypi/pyversions/discord-ext-rx.svg
.. |dependencies| image:: https://img.shields.io/librariesio/github/Ext-Creators/discord-ext-rx
.. |license| image:: https://img.shields.io/pypi/l/discord-ext-rx.svg
.. |cloned| image:: https://img.shields.io/pypi/dm/discord-ext-rx.svg