Giter VIP home page Giter VIP logo

melisa's Introduction

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.

melisa's People

Contributors

arslee07 avatar dependabot[bot] avatar grey-cat-1908 avatar madcat9958 avatar myolimpenjoyer avatar themistersenpai avatar timka-123 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

melisa's Issues

ToDo List

  • Models
    • Connected with Guild
    • Connected with Channel
    • Connected with Guild Member
    • Connected with Guild Role
    • Connected with Emoji
    • Connected with Sticker
    • Connected with Voice
    • Connected with Webhook
    • Connected with Invite
    • Connected with Guild Template
    • Connected with Guild Sheduled Event
    • Connected with Audit Log
    • Connected with Stage Instance
    • All that connected with Interactions
  • Core
    • Add some new methods to HTTPClient
    • Add property to set mobile status
    • Add Rate Limits handler
    • Add Threads support
    • Add support to every gateway event
  • Sharding
  • Cache Configuration
  • Cache Events
  • Cache Container
  • Clusterization
  • Interactions
  • Voice connection
  • Permissions converter

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.