Skip to content
This repository has been archived by the owner on Aug 28, 2021. It is now read-only.

Ext-Creators/discord-ext-rx

Repository files navigation

discord-ext-rx

package versions dependencies license cloned

Combine RxPy with discord.py.

⚠️ Work In Progress!

Installation

This extension is on PyPI.

$ python3 -m pip install -U discord-ext-rx

Usage

from discord.ext.rx import RxBot, _
from rx import operators as ops

bot = 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')

About

⚛️ A discord.py extension with a reactive events implementation.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Languages