Refactor command definitions across multiple cogs to replace hybrid commands with regular commands for consistency. This change enhances clarity and standardizes command handling throughout the bot.
This commit is contained in:
@@ -21,7 +21,7 @@ class Messagespack(commands.Cog):
|
||||
def __init__(self, bot):
|
||||
self.bot = bot
|
||||
|
||||
@commands.hybrid_command(name="addmessages", aliases=["addmsg"])
|
||||
@commands.command(name="addmessages", aliases=["addmsg"])
|
||||
@commands.has_permissions(manage_messages=True)
|
||||
async def addmessages(self, ctx, member: discord.Member, amount: int):
|
||||
if amount <= 0:
|
||||
@@ -46,7 +46,7 @@ class Messagespack(commands.Cog):
|
||||
conn.close()
|
||||
await ctx.send(f"Added {amount} messages to {member.mention} for today.")
|
||||
|
||||
@commands.hybrid_command(name="removemessages", aliases=["removemsg"])
|
||||
@commands.command(name="removemessages", aliases=["removemsg"])
|
||||
@commands.has_permissions(manage_messages=True)
|
||||
async def removemessages(self, ctx, member: discord.Member, amount: int):
|
||||
if amount <= 0:
|
||||
@@ -70,7 +70,7 @@ class Messagespack(commands.Cog):
|
||||
await ctx.send(f"{member.mention} has no messages recorded for today.")
|
||||
conn.close()
|
||||
|
||||
@commands.hybrid_command(name="clearmessage", aliases=["clearmsg"])
|
||||
@commands.command(name="clearmessage", aliases=["clearmsg"])
|
||||
@commands.has_permissions(manage_messages=True)
|
||||
async def clearmessage(self, ctx, member: discord.Member):
|
||||
conn = sqlite3.connect(db_path("messages.db"))
|
||||
|
||||
Reference in New Issue
Block a user