Skip to content

Clovord/Library---py---clovord.py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

clovord

A Python SDK for interacting with the Clovord Gateway and REST API.

Installation

pip install clovord

For local development:

pip install -e .[dev]

Usage

import clovord
from clovord import Bot
import json


intents = clovord.Intents.default()
intents.members = True
intents.messages = True
intents.presence = True

bot = Bot(intents=intents)

@bot.event
async def on_ready():
    print("READY EVENT FIRED")

@bot.event
async def on_ready_payload(data):
    print("READY PAYLOAD:")
    print(json.dumps(data, indent=2, ensure_ascii=False))

bot.run("YourBotToken") 

Overview

  • Bot is the main entrypoint.
  • The Gateway connection is handled internally with heartbeat and reconnect support.
  • The REST client is asynchronous and available through bot.http.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages