MelisaPy is a cache-optimized Discord microframework for Python 3
Find a file
2022-05-23 20:35:35 +03:00
.github Create FUNDING.yml 2022-04-05 23:19:56 +03:00
docs feat(client): add allowed_mentions and update docs 2022-04-29 16:01:11 +03:00
melisa add some new cache tests 2022-05-23 20:35:35 +03:00
packages Bump pytest from 7.1.1 to 7.1.2 2022-04-25 13:40:58 +00:00
tests add some new cache tests 2022-05-23 20:35:35 +03:00
.flake8 message simple docs 2022-04-07 22:20:05 +03:00
.gitignore some requirements and tests 2022-03-18 14:57:47 +03:00
.readthedocs.yml docs, update docstrings, fix recursion 2022-03-17 21:32:43 +03:00
docs-requirements.txt docs, update docstrings, fix recursion 2022-03-17 21:32:43 +03:00
LICENSE.txt some requirements and tests 2022-03-18 14:57:47 +03:00
README.md chore(readme): Add examples and more information about melisa 2022-04-15 23:09:24 +03:00
requirements.txt Create requirements.txt 2022-04-01 20:35:44 +03:00

The easiest way to create your own optimized Discord Bot.


Documentation Status Repo Size GitHub last commit GitHub commit activity Discord

THIS LIBRARY IS CURRENTLY UNDER DEVELOPMENT!

Every provided example or a feature is not ready or may sbe changed in the future

About

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 :)


Events Listening

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!


Making your bot more efficient

Python optimization flags

You can specify some optimization flags in CPython interpreter

  1. python bot.py - no optimization
  2. python -O bot.py - features such as internal assertions will be disabled.
  3. python -OO bot.py - more features (including all docstrings) will be removed from the loaded code at runtime.

melisa[speed]

Also you can speed up some features in Melisa, like json parsing. It will install orjson.


Want to help us?

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.