Skip to content
This repository was archived by the owner on Feb 7, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,17 @@

Isobot is a simple discord.py-based Python Discord bot made by the [NKA Development Team](https://github.com/PyBotDevs), to represent the original [Heckerbot](https://github.com/notsniped/heckerbot) in an even more efficient, fast, contributable, community-focused and enhanced way.

This open-source project was supposed to represent what the next-generation of Heckerbot will look like, and here it is in full-swing.

## Why a new project?
At that time, I wanted to make brand new, cutting-edge features for the old isobot codebase. But in the process, I ran into some codeblocks which prevented me from doing so efficiently. This is why I decided to completely rewrite isobot as codename 'lazer' which is meant to be more future-proof. And it sure was.
This open-source project was supposed to represent what the next-generation of Heckerbot will look like, and here it is in full-swing, since 2020.

## Why isobot?
We think isobot can help a multi-purpose economy Discord bot for your server. Apart from the economy system, you also get features for
* moderation
* levelling
* automod
* server verification (soon)
* maths commands
* fun commands
* and reddit media commands

## How can I help?
***PLEASE SUBMIT ISSUES AND PULL REQUESTS TO THE REPOSITORY!*** It helps us make our work easier c:
Expand Down
29 changes: 29 additions & 0 deletions cogs/levelling.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,34 @@ async def edit_xp(self, ctx: ApplicationContext, user:discord.User, new_xp:int):
await ctx.respond(f"{user.display_name}\'s XP count successfully edited. `New XP: {levels[str(user.id)]['xp']}`")
except KeyError: return await ctx.respond("That user isn't indexed yet.", ephemeral=True)

@special_event.command(
name="leaderboard",
description="View the global leaderboard for user levelling ranks."
)
async def leaderboard(ctx: ApplicationContext):
levels_dict = dict()
for person in levels:
levels_dict[str(person)] = levels[str(person)]["level"]
undicted_leaderboard = sorted(levels_dict.items(), key=lambda x:x[1], reverse=True)
dicted_leaderboard = dict(undicted_leaderboard)
parsed_output = str()
y = 1
for i in dicted_leaderboard:
if y < 10:
try:
if levels_dict[i] != 0:
user_context = await client.fetch_user(i)
if not user_context.bot and levels_dict[i] != 0:
print(i, levels_dict[i])
if y == 1: yf = ":first_place:"
elif y == 2: yf = ":second_place:"
elif y == 3: yf = ":third_place:"
else: yf = f"#{y}"
parsed_output += f"{yf} **{user_context.name}:** level {levels_dict[i]}\n"
y += 1
except discord.errors.NotFound: continue
localembed = discord.Embed(title="Global levelling leaderboard", description=parsed_output, color=color)
await ctx.respond(embed=localembed)

def setup(bot):
bot.add_cog(Levelling(bot))
11 changes: 11 additions & 0 deletions config/commands.json
Original file line number Diff line number Diff line change
Expand Up @@ -639,4 +639,15 @@
"disabled": false,
"bugged": false
}
,
"leaderboard": {
"name": "Levelling Leaderboard",
"description": "See the global leaderboard for user levels.",
"type": "levelling",
"cooldown": null,
"args": null,
"usable_by": "everyone",
"disabled": false,
"bugged": false
}
}