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.0.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.0-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: irctk_bot-0.2.0.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.0.tar.gz
Algorithm Hash digest
SHA256 0d2ba5850726f876ace98584c76962cfba1ef873d84c2121d909f60eba114be9
MD5 8804c77a215f63e1c35ee5662b85a5bc
BLAKE2b-256 bd6e755d8f0245bbbcf7d33e0fe3cee7c7c086d2c55d51024f6362c8f0331d47

See more details on using hashes here.

File details

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

File metadata

  • Download URL: irctk_bot-0.2.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a8a6a4dd7faff74e5e9579d7bdff57d4f8522145de5f7628e4d048ebec744f3f
MD5 ffc828238560afdadba2d3fb10b3e1ef
BLAKE2b-256 1462f6a5bf205782ef49fc7a91e0ff8b43172e318b57df33ae2ae71b856e126c

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