A compatability shim between Discord.py and Hikari.
Project description
Usage as a partial shim:
import discord
import hikari
import hikari_shim
dpy_bot = discord.Client(intents=discord.Intents.all(), enable_debug_events=True)
hikari_bot = hikari.GatewayBot("TOKEN")
@dpy_bot.event
async def on_message(message):
print("message received on discord.py side!")
@hikari_bot.listen(hikari.MessageCreateEvent)
async def hikari_on_message(evt):
print("message received on hikari side!")
hikari_shim.partial_load(dpy_bot, hikari_bot)
dpy_bot.run("TOKEN")
There's also a full (?) shim, but it runs into loop issues and whatnot. It requires you to use a hikari client with no intents and start both clients.
caveat emptor
- This does not work with
discord.AutoShardedClient
. - This has a peer dependency on discord.py, make sure to install that!
- There are some operations that are not shimmed (voice and chunking guild members, to be specific, because I do not know how to do them in dpy).
- Ratelimiting is not shared.
- You will have double the CPU usage and double the memory usage. (or something in that range).
- More, probably.
contact me
You can find me in the Hikari Discord server.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for hikari_shim-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f81dc291a236e48196c2bc26cf81a35301e6ef082eab478f1dd6407b3e9b064 |
|
MD5 | 4b701f7de01714e29c45a05026a323c5 |
|
BLAKE2b-256 | f428c93b020c92ef67e8fa1954643bee984ebffce15eb7da7613a067df0680df |