The easiest way to create your own optimized Discord Bot.
MelisaPy is a Discord microframework for Python 3 for the Discord API.
It supports Discord V10 REST API and Gateway
We are trying to make our library optimized. We are going to create really cool cache configuration, so don't worry about the RAM :)
pip install melisa
pip install git+https://github.com/MelisaDev/melisa
import melisa
client = melisa.Client("your cool token...")
@client.listen
async def on_message_create(message):
if message.content.startswith('$greet'):
await message.channel.send(f'Hello man!')
client.run_autosharded()
Also, we should tell you, that logging is enabled automatically (evil laugh). But do not worry, only some important things will be logged, but it can be disabled or changed.
If you wish to specify some intents, you should do it something like that:
import melisa
client = melisa.Client("your cool token...",
intents=[
melisa.Intents.GUILD_MEMBERS,
melisa.Intents.GUILD_BANS
])
Or you can do something like this:
import melisa
intents = melisa.Intents.all() - melisa.Intents.GUILD_PRESENCES
client = melisa.Client("your cool token...",
intents=intents)
Also sharding is fully supported in Melisa, but it is too long to write about it here, so feel free to read our docs!
You can specify some optimization flags in CPython interpreter
python bot.py
- no optimizationpython -O bot.py
- features such as internal assertions will be disabled.python -OO bot.py
- more features (including all docstrings) will be removed from the loaded code at runtime.
Also you can speed up some features in Melisa, like json parsing.
It will install orjson
.
Contributing manual is not ready yet, but will be done in some days. Feel free to us in our Discord Server about contributing to the Melisa.