pyrevolt 0.2.9.dev0

Creator: bradpython12

Last updated:

0 purchases

pyrevolt 0.2.9.dev0 Image
pyrevolt 0.2.9.dev0 Images
Add to Cart

Description:

pyrevolt 0.2.9.dev0

pyrevolt

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




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 pyrevolt
# 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.ReadySimplified()
async def onReady() -> 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}!", embed=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 documentation and see how to use the library. If you have any questions, please join the support server and ask for help.
Useful Information
Code Quality


Repository Information

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.