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

@module.command()
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.2.1.tar.gz (7.6 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.2.1-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: irctk_bot-0.2.1.tar.gz
  • Upload date:
  • Size: 7.6 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.2.1.tar.gz
Algorithm Hash digest
SHA256 f0948224dbe9d1d812279ad492db4775ab1800316408a4390668719117e9bec7
MD5 b4d699a374669488dfc47bb7e317c672
BLAKE2b-256 e49191ab33c43e1a9221a0a666c68bd37fa5866eb1af24b353d901be05ff1342

See more details on using hashes here.

File details

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

File metadata

  • Download URL: irctk_bot-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 8.9 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.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 af4f0b140abbdb2aa1cb91746e008610e427294f298a5d088b5a85cc87a208ea
MD5 eb67e128c408ff81f6e133866b31cd0d
BLAKE2b-256 0779e8b2483e31899de3059df89bf6fb00358b8096e2ab85c966bb8ac3cf88ce

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