A Discord bot created in python and built using discord.py to manage user points, display leaderboards, and enable admins to adjust points dynamically via slash commands. I made this to replace all of the outdated / broken points bots scattered from early Discord. This bot is perfect for engaging communities and gamifying participation in your server!
Github - Discord Points Bot - Paswrd
Code Snip:
Github - Discord Points Bot - Paswrd
Code Snip:
Code:
@PointsBot.tree.command(name="addpoints", description="Add points to a user.")
async def addpoints(interaction: discord.Interaction, member: discord.Member, points: int):
if not interaction.user.guild_permissions.administrator:
await interaction.response.send_message("You do not have permission to use this command.", ephemeral=True)
return
add_points(member.id, points)
await interaction.response.send_message(f"{points} points have been added to {member.mention}.")
@PointsBot.tree.command(name="removepoints", description="Remove points from a user.")
async def removepoints(interaction: discord.Interaction, member: discord.Member, points: int):
if not interaction.user.guild_permissions.administrator:
await interaction.response.send_message("You do not have permission to use this command.", ephemeral=True)
return
remove_points(member.id, points)
await interaction.response.send_message(f"{points} points have been removed from {member.mention}.")