Skip to main content

A Python library to wrap the Revolt API, made to be easy-to-use but powerful and feature rich.

Project description

pyrevolt

A Python library to wrap the Revolt API, made to be easy-to-use but powerful and feature rich.

Version Stability

Installing pyrevolt

Python 3.10 or greater is required

To install pyrevolt, you can run the following command:

# Linux/macOS command
python3 -m pip install py   revolt
# Windows
py -m pip install pyrevolt

Using pyrevolt

This shows a very quick example of how to use pyrevolt. As a note, pyrevolt is still under heavy development and this example and the library as a whole may change.

import pyrevolt

bot = pyrevolt.Bot(prefix="!")

@pyrevolt.Ready()
async def onReady(users: list[pyrevolt.User], channels: list[pyrevolt.Channel], servers: list[pyrevolt.Server]) -> None:
    print("Ready!")

@bot.on(pyrevolt.GatewayEvent.OnMessage)
async def onMessage(message: pyrevolt.Message) -> None:
    print(f"{message.author.username} said: {message.content}")

@bot.commands.Command(name="ping")
async def ping(message: pyrevolt.Message) -> None:
    await message.Send(content=f"Pong {message.author.username}!", embeds=[pyrevolt.Embed.Create(title="Pong!", description=f"{message.author.mention}!", colour="#0000ff")], replies=[pyrevolt.Reply(message.messageID, True)])

@bot.commands.Command(name="hello", aliases=["hi"])
async def hello(message: pyrevolt.Message, name: str) -> None:
    await message.Send(content=f"Hello {name}!")
@hello.Error
async def helloError(message: pyrevolt.Message, error: Exception) -> None:
    await message.Send(content=f"{str(error)}")

bot.Run(token="TOKEN")

As the library expands, more examples will be added, but we expect users during the very initial development phases to read through the source in order to find how to develop (this will of course change over the development of the library).

Useful Information

Code Quality

CodeFactor CircleCI

Repository Information

License: GPL v3 Percentage of issues still open

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

pyrevolt-0.2.1.dev0.tar.gz (12.8 kB view details)

Uploaded Source

Built Distribution

pyrevolt-0.2.1.dev0-py3-none-any.whl (16.0 kB view details)

Uploaded Python 3

File details

Details for the file pyrevolt-0.2.1.dev0.tar.gz.

File metadata

  • Download URL: pyrevolt-0.2.1.dev0.tar.gz
  • Upload date:
  • Size: 12.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.4

File hashes

Hashes for pyrevolt-0.2.1.dev0.tar.gz
Algorithm Hash digest
SHA256 a48d85e6035e1a025f5e9fe7959878ff50e6b16960261756fe3162b1d3384cdc
MD5 87d58de9b89ade2a52d6c252c81c5197
BLAKE2b-256 e062f124153a290ebc99c8c13a483f7c703c16f34bb2f16204f1cc02759661d8

See more details on using hashes here.

File details

Details for the file pyrevolt-0.2.1.dev0-py3-none-any.whl.

File metadata

File hashes

Hashes for pyrevolt-0.2.1.dev0-py3-none-any.whl
Algorithm Hash digest
SHA256 6500aec8576bce3c9ade026fee246c8f9c4a8ca9ff0ce38cb0d0352dcf1c7493
MD5 1f51bc570fae1d3c4c17b832a9e1d47f
BLAKE2b-256 585bd6352d3282b76acb7764ffeaa2849f0424df7dc4037c546203417dc5eaa9

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