Skip to main content

A bot for rocketchat messaging, allowing you to react to messages or commands.

Project description

Rocketbotte

A bot for rocketchat messaging, allowing you to react to messages or commands.

It works with rocketchat's realtime api (websocket) to receive messages, and responds with the REST api. To do this, it uses the aiohttp python library.

Installation

pip install rocketbotte

Usage

from rocketbotte import Bot, Context, Message

bot = Bot(server_url=SERVER_URL, user_id=USER_ID, auth_token=AUTH_TOKEN)

@bot.command('test')
async def test(ctx:Context, args:str):
    await ctx.send_message(f'response to {args}')

@bot.listen()
async def on_message(message:Message):
    if 'hello' in message.content:
        await bot.send_message(message.room_id, 'world ')

bot.run()

Bot parameters :

  • server_url: the server url as https://myrocketchat.org
  • auth_token: the personal authentification token for the bot
  • command_prefix: default : '!'
  • user_id: the user id who belongs to the authentification token
  • max_retry: number of attempt restart after an uncaught exception, default to 5

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

rocketbotte-0.1.1.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

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

rocketbotte-0.1.1-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file rocketbotte-0.1.1.tar.gz.

File metadata

  • Download URL: rocketbotte-0.1.1.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.13.3 Windows/11

File hashes

Hashes for rocketbotte-0.1.1.tar.gz
Algorithm Hash digest
SHA256 33a53c3ad5ba67d93f37622fa52743a69a99496df0db174fd8bb479f7f9d1780
MD5 439f8572f3611c5823e460cb873a8cc8
BLAKE2b-256 18b32d507882b5c738d10f50d8d79fc10c23b8013fcb8f015e7ef6a8c4135241

See more details on using hashes here.

File details

Details for the file rocketbotte-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: rocketbotte-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 7.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.13.3 Windows/11

File hashes

Hashes for rocketbotte-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7758bd095c49489d9294d3c75dfc02589641e9f07016022422995acaa7cb73f9
MD5 1fa3961ef38cdc01287bc3556fa0d2ed
BLAKE2b-256 e108f76f1bbe16c9f7ba108fdcb404740af4c7ad6ba03cc87de8e5bebf95f5a2

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