Skip to main content

Combine RxPy with discord.py.

Project description

discord-ext-rx

Work In Progress!

Combine RxPy with discord.py.

Example

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for discord-ext-rx, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size discord_ext_rx-0.1.0-py3-none-any.whl (3.4 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size discord-ext-rx-0.1.0.tar.gz (2.4 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page