Skip to main content

Automatically interact with your Rumble livestream chats.

Project description

Rumble Chat Actor

Automatically interact with your Rumble livestream chats.

This project is currently just a Python module. It is fully functional, but you have to install the Python Programming Language and write your own little script to inport and use it.

This project requires the following python libraries:

RumChat Actor itself is on PyPi, so once you have Python, installing it with pip install rumchat-actor should automatically download all dependencies. Note that, if you are using Linux, you may have to install python3-pip separately. On Windows, Pip comes with Python.

Additional software requirements that aren't directly Python-related:

This is basically meant to be a FOSS local implementation of The Rumble Bot, and should run alongside your streaming software and / or other applications on most systems.

Here is an example usage script. Lines starting with # are comments. You would write a script like this, and save it as 'my_rumchat_actor_rig.py` or similar.

#First, import the module
import rumchat_actor

#Then, instantiate the Actor object.
#stream_id is either the base 10 or base 36 livestream ID you want the Actor to connect to, obtained from the popout chat or the Rumble Live Stream API.
#If stream_id is None but you pass api_url, the latest livestream shown on the API is chosen automatically.
#If you pass profile_dir to an existing Firefox profile directory, your sign-ins to Rumble chat for the actor will be saved.
#Otherwise, you will have to log in manuaglly each time you use the bot, or pass credentials = (username, password).
actor = rumchat_actor.RumbleChatActor(stream_id = STREAM_ID)

#Let's set up a message action. A message action is a function called on every chat message.
#It is passed the cocorum.ssechat.SSEChatMessage object, and the RumbleChatActor object.

def eat_some_cheese(message, actor):
    '''If a message mentions cheese, eat some cheese'''
    if "cheese" in message.text.lower():
        actor.send_message(f"@{message.user.username} Eat some cheese 🧀.")
    #Actions should return True if they had to delete a message.
    #This action does not delete messages, so leaving it at the Python default
    # of returning None is fine.

actor.register_message_action(eat_some_cheese)

#There are many ways to register commands. Internally, they all end up
# as some form of rumchat_actor.commands.ChatCommand().
#The simplest way is to instantiate a prebuilt modification of this class.
#Be sure to pass the actor object to the class when you instantiate it.

actor.register_command(rumchat_actor.commands.KillswitchCommand(actor))

#This KillswitchCommand, by the way, shuts down the actor when a mod or admin runs it.
#You can open the Python interpreter and run help("rumchat_actor.commands") to
# see info on other ChatCommand derivative classes.

#The other main way to register a command is via a simple callable.
#Like message actions, these are also passed SSEChatMEssage and RumbleChatActor
def tester(message, actor):
    '''Test command callable'''
    actor.send_message(f"Test command run by @{message.user.username}")

#You must provide a command name when you do this way.
actor.register_command(name = "tester", command = tester)

#Finally, once everything is registered, we call the actor's mainloop method
# to run it. When this is running, you can press Ctrl+C to exit,
# but it might take a moment to respond.
actor.mainloop()

You would write this script, and run it as your local Rumble Chat Actor instance. Note that it currently does not exit on its own when a livestream ends. It may also exit on its own if chat is inactive for a very long time. Hope this helps!

Be sure to run help("rumchat_actor") in the Python interpreter to get more info on the various methods that are available. I'll try to get some better documentation up soon. Hope this helps!

I, Wilbur Jaywright, and my brand, Marswide BGL, have no official association with Rumble Corp. beyond that of a normal user and/or channel on the Rumble Video platform. This project is not officially endorsed by Rumble Corp. or its subsidiaries.

S.D.G.

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

rumchat_actor-2.3.1.tar.gz (35.2 kB view details)

Uploaded Source

Built Distribution

rumchat_actor-2.3.1-py3-none-any.whl (38.4 kB view details)

Uploaded Python 3

File details

Details for the file rumchat_actor-2.3.1.tar.gz.

File metadata

  • Download URL: rumchat_actor-2.3.1.tar.gz
  • Upload date:
  • Size: 35.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for rumchat_actor-2.3.1.tar.gz
Algorithm Hash digest
SHA256 72457dfb3ef1354432b164ceab833d1a9841cc94af80fcbd49b08adf06aecadb
MD5 7eb2f3e786b5a7955582c5f64db1d8f4
BLAKE2b-256 00f6b3ee4e002b1595c401218163ff70b19987f1cbf1f5ba7ff30b0982be1452

See more details on using hashes here.

File details

Details for the file rumchat_actor-2.3.1-py3-none-any.whl.

File metadata

File hashes

Hashes for rumchat_actor-2.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2d9e7a7b7b306f60c170ba148956fcd55bb1c9e9d22a9bd03b199c226e0224b4
MD5 89ea89ee487b4d8393c3d8bf7e0d8083
BLAKE2b-256 77b25754cd61d7eec544dac449d9e356bf915189111d6e756d8c69295bf7a18a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page