Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

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

NOTE: Currently, installation is only possible using GitHub

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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

melisa-0.0.1.dev1.tar.gz (55.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

melisa-0.0.1.dev1-py3-none-any.whl (77.0 kB view details)

Uploaded Python 3

File details

Details for the file melisa-0.0.1.dev1.tar.gz.

File metadata

  • Download URL: melisa-0.0.1.dev1.tar.gz
  • Upload date:
  • Size: 55.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.1

File hashes

Hashes for melisa-0.0.1.dev1.tar.gz
Algorithm Hash digest
SHA256 3e5bbaadffbec426a49a4986b108f9940ff0bb75a90c4ab9ea235c942469a68c
MD5 becb95f273cb09620a2950ee827d8dbb
BLAKE2b-256 e446042e84942b0239162339597094502938a3cc5de95d205325fbe9b25a2a8f

See more details on using hashes here.

File details

Details for the file melisa-0.0.1.dev1-py3-none-any.whl.

File metadata

  • Download URL: melisa-0.0.1.dev1-py3-none-any.whl
  • Upload date:
  • Size: 77.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.1

File hashes

Hashes for melisa-0.0.1.dev1-py3-none-any.whl
Algorithm Hash digest
SHA256 05fe2c4a75689f3b17f9166f8860b130374ba3105a1b9ec778ca6895bd3af812
MD5 79e34441845d07655e3e00ae0eb218be
BLAKE2b-256 5c032e011a64fc345015d811e08b2ca71da13a7f57ad65b369759df8c4a114ac

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.0.1.dev1 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page