Skip to main content

Command handler for dico.

Project description

dico-command

Command handler for dico.
Note: Docs is still not ready.

Example

import dico
import dico_command

bot = dico_command.Bot("YOUR_TOKEN_HERE", "!", intents=dico.Intents.full())


@bot.command("test")
async def test(ctx: dico_command.Context):
    await ctx.send("Hello, World!")


bot.run()

Using Addon/module:

main.py:

import dico
import dico_command

bot = dico_command.Bot("YOUR_TOKEN_HERE", "!", intents=dico.Intents.full())
bot.load_module("addons.test")
bot.run()

addons/test.py:

import dico_command


class AddonTest(dico_command.Addon, name="Addon Test"):  # name=... is optional
    @dico_command.command(name="addon")
    async def example(self, ctx: dico_command.Context):
        await ctx.send(f"Hello! This is addon `{self.name}`.")


def load(bot):
    # Implementing function `load` is required. You may do any actions here.
    bot.load_addons(AddonTest)


def unload(bot):
    # Implementing function `unload` is required. You may do any actions here.
    bot.unload_addons(AddonTest)

Note that using async is forced unlike dico itself.

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

dico-command-0.0.11.tar.gz (10.1 kB view details)

Uploaded Source

Built Distribution

dico_command-0.0.11-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

File details

Details for the file dico-command-0.0.11.tar.gz.

File metadata

  • Download URL: dico-command-0.0.11.tar.gz
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.11

File hashes

Hashes for dico-command-0.0.11.tar.gz
Algorithm Hash digest
SHA256 774565660260998d17dd6e6f88b7f0cf75d64d966eb42515bfe71e973dfbcc51
MD5 d03112ae0cfd8d3f8b7e70974c1359b1
BLAKE2b-256 c749912f5b9475a834ad7a267a9e33323fbd6cbd22fa5c6e722c70049870ba74

See more details on using hashes here.

File details

Details for the file dico_command-0.0.11-py3-none-any.whl.

File metadata

  • Download URL: dico_command-0.0.11-py3-none-any.whl
  • Upload date:
  • Size: 12.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.11

File hashes

Hashes for dico_command-0.0.11-py3-none-any.whl
Algorithm Hash digest
SHA256 db9df3e41ff1612e9094dd65717bf1e1bf05e8868bd2e82e268cee2da7d01e98
MD5 696bdaad59fedb37a73453b6bfe63c9a
BLAKE2b-256 365c3fbedaf647acb7a940c30ae24e6b4d3fd0e5d8249c23ac6276ca937ba495

See more details on using hashes here.

Supported by

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