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.2.tar.gz (7.8 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.2-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: irctk_bot-0.2.2.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.12.7 Linux/6.6.63

File hashes

Hashes for irctk_bot-0.2.2.tar.gz
Algorithm Hash digest
SHA256 d882edc6e41430900d6ff75b89c2ee986d3e2a7d9fb4211d3806b7e67f08f02b
MD5 5602d56d7841815e1b00555e7f21ced1
BLAKE2b-256 9f3aa9c7fe25f01cdf457720ab8c7094af0c9a24043521008b6b389276cc5f5d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: irctk_bot-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 9.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.12.7 Linux/6.6.63

File hashes

Hashes for irctk_bot-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0f7c1eb0d637be20a0be4b0ce6ec0a87e6f25793f55534c42b8c01186af4c53b
MD5 d92e446080ad6b165f8faea79d896b11
BLAKE2b-256 ae2eb240a33449f52b6bb076cc99ad13c1b37614dc2291e6ea72f028325a7d23

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