Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
A blazing fast Discord API wrapper that you can't deny
Support Guild | Topical documentation | Examples | Technical documentation | Source
New hata versions use Discord API V10 .
Hata is an asynchronous Discord API wrapper built on top of scarletio. It is designed to be easy to use, with also providing rich API offering everything what an advanced developer might need.
Named after Hata no Kokoro from Touhou Project.
Multiple simultaneous clients
Hata can run multiple clients from the same instance without sacrificing performance.
Performant
Fast concurrent code based on async/await paradigm with cache control, PyPy support and much more!
Newest API features
Whatever Discord decides to release/update/break Hata will support it natively in no time!
100% Python
Built in Python! Easy to code, easy to read, easy to maintain.
Simple example implementing a ping
command.
from hata import Client, Guild, wait_for_interruption
GUILD = Guild.precreate(guild_id)
Seija = Client('TOKEN', extensions = ['slash'])
@Seija.events
async def ready(client):
print(f'{client:f} logged in.')
@Seija.interactions(guild = GUILD)
async def ping():
"""ping-pong"""
return 'pong'
Seija.start()
wait_for_interruption()
Hata leaves the main thread free, client.start()
blocks it only till the client logs in (or fails it), although you
can still use the start_clients()
function, what as it says, starts up all the non-running clients parallelly.
Sometimes leaving the main thread might cause problems when trying to shut down the bot(s). At this case, you might
want to use wait_for_interruption()
, which disconnects the clients gracefully and closes the event loop on keyboard
interrupt.
To install Hata simply do
# Linux/OS X
$ python3 -m pip install hata
# Windows
$ python -m pip install hata
# Voice Support
$ python -m pip install hata[voice]
And you are good to go! Hata has native pypy support as well if you need some more speed!
If you have issues, suggestions, want to contribute, or just want to hang out, join our discord server.
Shout-Out to our brave testers who are helping the most to improve Hata!
FAQs
A powerful asynchronous library for creating Discord bots in Python.
We found that hata demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.