-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I started making a level command :3 #559
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,35 @@ | ||||||||
import discord | ||||||||
from discord.ext import commands | ||||||||
|
||||||||
from tux.bot import Tux | ||||||||
from tux.ui.embeds import EmbedCreator | ||||||||
|
||||||||
client = discord.Client | ||||||||
|
||||||||
|
||||||||
usermessages = [] | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion: Remove unused global list 'usermessages' This list is defined globally but never used in the code. It's best to remove unused variables to keep the code clean and prevent potential issues with global state.
Suggested change
|
||||||||
|
||||||||
|
||||||||
class Levels(commands.Cog): | ||||||||
def __init__(self, bot: Tux) -> None: | ||||||||
self.bot = bot | ||||||||
|
||||||||
@commands.hybrid_group( | ||||||||
name="level", | ||||||||
aliases=["lvl"], | ||||||||
) | ||||||||
@commands.guild_only() | ||||||||
async def main(self, ctx: commands.Context[Tux]) -> None: | ||||||||
embed = EmbedCreator.create_embed( | ||||||||
bot=self.bot, | ||||||||
embed_type=EmbedCreator.INFO, | ||||||||
user_name="Tux - EXP", | ||||||||
title="You are level level", | ||||||||
description="Your have exp exp!", | ||||||||
Comment on lines
+27
to
+28
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion: Implement actual level and exp calculation logic The current implementation uses placeholder text for level and exp. Consider implementing the actual logic to calculate and display the user's level and experience points.
|
||||||||
) | ||||||||
|
||||||||
await ctx.send(embed=embed) | ||||||||
|
||||||||
|
||||||||
async def setup(bot: Tux) -> None: | ||||||||
await bot.add_cog(Levels(bot)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: Remove unused 'client' variable
This variable is assigning the Discord Client class to a variable, not instantiating it, and it's never used in the code. Consider removing it to improve code clarity.