MelisaPy is a cache-optimized Discord microframework for Python 3
Find a file
dependabot[bot] 7882dc782d
chore(deps): bump orjson from 3.8.12 to 3.9.5
Bumps [orjson](https://github.com/ijl/orjson) from 3.8.12 to 3.9.5.
- [Release notes](https://github.com/ijl/orjson/releases)
- [Changelog](https://github.com/ijl/orjson/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ijl/orjson/compare/3.8.12...3.9.5)

---
updated-dependencies:
- dependency-name: orjson
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-17 13:41:14 +00:00
.github feat(guild): add list and get emoji 2022-06-27 22:43:02 +03:00
docs fix: something with emojis ya 2022-06-30 22:29:10 +03:00
melisa feat(utils): change snowflakes 2023-03-07 18:37:18 +03:00
tests feat(utils): change snowflakes 2023-03-07 18:37:18 +03:00
.flake8 feat(interactions): add ApplicationCommandOption 2022-06-10 16:59:24 +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
dev-requirements.txt chore(deps): bump pytest from 7.2.2 to 7.3.1 2023-04-17 14:05:20 +00: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
pyproject.toml BREAKING CHANGE: cache. 2022-05-29 13:39:56 +03:00
README.md Add README formatting 2022-06-15 17:20:39 +03:00
requirements.txt Create requirements.txt 2022-04-01 20:35:44 +03:00
setup.py chore(deps): bump orjson from 3.8.12 to 3.9.5 2023-08-17 13:41:14 +00:00
speed-requirements.txt chore(deps): bump orjson from 3.8.12 to 3.9.5 2023-08-17 13:41:14 +00: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 be 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 :)


Install MelisaPy

Installing from PyPi:

pip install melisa

Installing from Git:

pip install git+https://github.com/MelisaDev/melisa

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.