Skip to main content

Decorator for discord.py chat bots

Project description

Discord Router

A simple router decorator for discord.py chat bots.

Installation

pip3 install discordrouter

Usage

from discordrouter import Router, message

class ChatBot(discord.Client):
  router = Router('!test')

  async def on_ready(self):
    print(f'Logged in as {self.user.name}')
  
  async on_message(self, message):
    await self.router(message)

  @message(router, "new <name>")
  async _test1(self, items, message):
    name = items['name']
    await message.channel.send('{name}')

Project details


Download files

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

Source Distribution

discordrouter-0.0.5.tar.gz (1.9 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

discordrouter-0.0.5-py3.7.egg (4.1 kB view details)

Uploaded Egg

discordrouter-0.0.5-py3-none-any.whl (2.4 kB view details)

Uploaded Python 3

File details

Details for the file discordrouter-0.0.5.tar.gz.

File metadata

  • Download URL: discordrouter-0.0.5.tar.gz
  • Upload date:
  • Size: 1.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.3

File hashes

Hashes for discordrouter-0.0.5.tar.gz
Algorithm Hash digest
SHA256 beb1883fba67d5cb917f2b59f6cf7cc0c3dfaced6ddef64e2d67532c4f4c4489
MD5 9af25c45d864dd45260fb452c7fb45db
BLAKE2b-256 6011e87ceb82f18c697a44867daea37946da9c9f271086405cb4f35e0373ea6b

See more details on using hashes here.

File details

Details for the file discordrouter-0.0.5-py3.7.egg.

File metadata

  • Download URL: discordrouter-0.0.5-py3.7.egg
  • Upload date:
  • Size: 4.1 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.3

File hashes

Hashes for discordrouter-0.0.5-py3.7.egg
Algorithm Hash digest
SHA256 4a2f4e36638f66166f2a81c99b2d41088d5fdd7e406640a8521ed5d7684ed7d4
MD5 87b743a38ee9627f52b0ceb091fee721
BLAKE2b-256 47264c604e28f0dca3a430487dcf0fc81c64b7659836fb1a1a761cb4a33d35ec

See more details on using hashes here.

File details

Details for the file discordrouter-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: discordrouter-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 2.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.3

File hashes

Hashes for discordrouter-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 629d863fbe9052ebb86cfe1c44aa5fb761830646098c7f5ebed1a2dae15191ec
MD5 0400be2b563b10b02b9bd5fb517821f3
BLAKE2b-256 a118f245a25761500d6ba017e03ea638874389edf46364eac0d401d83595697f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page