Skip to main content

An easy to use package for levelling features in discord.py.

Project description

Discord Levelling

A package built for discord.py developers who want to easily and seamlessly integrate a levelling system into their bots.

Key features

  • Easy database integration for any database system
  • Fully tested
  • Highly customizable
  • Plug & Play

Example usage

import os

import discord
from discord.ext import commands
from levelling import Level, LevelUpPayload


class Bot(commands.Bot):
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)

        self.level = Level(self)

    async def on_ready(self):
        print(f"-----\nLogged in as: {self.user.name} : {self.user.id}\n-----")

    async def on_message(self, message):
        leveled_up = await self.level.propagate(message)
        if leveled_up:
            await self.on_level_up(leveled_up)

        await self.process_commands(message)

    async def on_level_up(self, payload: LevelUpPayload):
        # This is triggered when a Member levels up
        member = payload.guild.get_member(payload.member.id)
        embed = discord.Embed(

            title=f"`{member.display_name}` has leveled up to level `{payload.level}`!"

        )
        await payload.channel.send(embed=embed)


if __name__ == "__main__":
    token = os.getenv("TOKEN")
    Bot(command_prefix="!", intents=discord.Intents.all()).run(token)

Documentation | Examples | Support

For documentation and examples, see here

Join the MenuDocs' discord server for support with this package!

or dm us on twitter!

Project details


Download files

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

Source Distribution

levelling-0.1.2.tar.gz (9.6 kB view hashes)

Uploaded Source

Built Distribution

levelling-0.1.2-py3-none-any.whl (12.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page