hiven.py

? Opensource Python wrapper for Hiven's REST and WebSocket API

Installation

pip install -U hiven.py

Usage

hiven.py is currently under development (that's going pretty fast), we have the basic receive + send message functionality for (jank) commands though!

Token

Hiven currently only supports selfbots so you'll need to get your Hiven token from the web application or the desktop client.

  1. Open the web app or desktop client
  2. Hit Ctrl+Shift+I to open Developer Tools
  3. Navigate to the Console tab
  4. Type in localStorage["hiven-auth"]
  5. Copy & paste the token in your code
image

Do not share this token with anybody

Quickstart

import hiven
from hiven import Client

bot = Client(bot=False)  # set bot = True if you're controlling a bot account


@bot.event
async def on_ready():
    """Triggered when the bot is ready """
    
    print("hello world!")


@bot.event
async def on_message(message: hiven.Message):
    """Triggered when a message (that the bot can see) is sent"""

    if message.content.startswith("!hello"):
        await message.room.send("hey there!")  # respond to the message if it starts with !hello


bot.run(token="YOUR_TOKEN_HERE")

GitHub

GitHub - trustedmercury/hiven.py: ? Opensource Python wrapper for Hiven’s REST and WebSocket API
? Opensource Python wrapper for Hiven’s REST and WebSocket API - GitHub - trustedmercury/hiven.py: ? Opensource Python wrapper for Hiven’s REST and WebSocket API