Skip to main content

Discord-based Swarm Protocol Library

Project description


Discord-based Swarm Protocol Library


Main class: Swarm

Initialize like so: swarm = Swarm(discord channel id: str, discord bot token: str, swarm id: str)

Sending message to swarm: swarm.send(string message)

Getting messages from swarm: swarm.get_queue() returns a list of (timestamp, decoded message) tuples from your swarm members


Before you end your program, call swarm.end() to cleanly end the discord bot process


  • Swarm ID: the same for all bots in your swarm, but it should be unique from any other swarm, at least on your swarm channel. To be safe, use a randomly generated string or number. Make sure every bot in your swarm has the same id, because bots with different ids cannot see eachother's messages.
  • get_queue() will only return messages from your swarm, so you can have multiple swarms in the same channel.
  • DiSwarm uses Fernet encryption, provided by the cryptography library. Install this library through pip install cryptography.
  • Also requires pip install discord

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 DiSwarm, version 2.2.0
Filename, size File type Python version Upload date Hashes
Filename, size DiSwarm-2.2.0-py3-none-any.whl (4.4 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size DiSwarm-2.2.0.tar.gz (3.0 kB) File type Source Python version None Upload date Hashes View

Supported by

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