Skip to main content

Bot framework for irctk

Project description

irctk-bot

Bot framework for irctk. irctk-bot can be installed from PyPI.

Usage:

$ irctk-bot -h irc.example.com -m irctk_bot.modules.ping

Where module is the Python module name to any modules you wish to load, you may provide -m multiple times.

Alternatively, you may use a config file, see example.toml.

$ irctk-bot -c example.toml

Writing a module

Expose an instance of the Module class as a global module property to a Python module. Use the Module.command decorator to register commands.

from irctk_bot import Context, Module

module = Module()

def ping(context: Context, name: Optional[str] = None) -> None:
    if name:
        return context.reply(f'pong {name}')
    context.reply('pong')

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

irctk_bot-0.1.0.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

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

irctk_bot-0.1.0-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file irctk_bot-0.1.0.tar.gz.

File metadata

  • Download URL: irctk_bot-0.1.0.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.11.9 Linux/6.6.58

File hashes

Hashes for irctk_bot-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0d85c50ece9dba56c9c9ad94a426c099348c2307354404a68c0973bbb6f81592
MD5 667098e905623f5094fe8369c3d9e18d
BLAKE2b-256 18317babcac8b4568fb4ebf90b3db71dc562150b7035c8647effe333c2bc8c74

See more details on using hashes here.

File details

Details for the file irctk_bot-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: irctk_bot-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.11.9 Linux/6.6.58

File hashes

Hashes for irctk_bot-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0a5e5f4c6020c970fe83883c663031cd899e99314d8384246cafaf0fef1d9ba6
MD5 df25063831db60b0bdd23c4bc8550f69
BLAKE2b-256 d667221749e486d2b8f48fc89c666c335a247f1f02b6eb64ac9ab4831a9ae890

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