Implement slash command synchronization features in environment files and update command definitions to hybrid commands across various cogs. Enhance command registration for improved user experience and streamline command handling in the bot.
This commit is contained in:
@@ -35,7 +35,7 @@ class FastGreet(commands.Cog):
|
||||
)
|
||||
""")
|
||||
|
||||
@commands.command(name="fastgreet_add")
|
||||
@commands.hybrid_command(name="fastgreet_add")
|
||||
@commands.has_permissions(administrator=True)
|
||||
async def add_greet_channel(self, ctx, channel: discord.TextChannel):
|
||||
with sqlite3.connect(DB_PATH) as conn:
|
||||
@@ -45,7 +45,7 @@ class FastGreet(commands.Cog):
|
||||
""", (ctx.guild.id, channel.id))
|
||||
await ctx.send(f"✅ {channel.mention} added as a greet channel.")
|
||||
|
||||
@commands.command(name="fastgreet_remove")
|
||||
@commands.hybrid_command(name="fastgreet_remove")
|
||||
@commands.has_permissions(administrator=True)
|
||||
async def remove_greet_channel(self, ctx, channel: discord.TextChannel):
|
||||
with sqlite3.connect(DB_PATH) as conn:
|
||||
@@ -54,7 +54,7 @@ class FastGreet(commands.Cog):
|
||||
""", (ctx.guild.id, channel.id))
|
||||
await ctx.send(f"❌ {channel.mention} removed from greet channels.")
|
||||
|
||||
@commands.command(name="fastgreet_list")
|
||||
@commands.hybrid_command(name="fastgreet_list")
|
||||
async def list_greet_channels(self, ctx):
|
||||
with sqlite3.connect(DB_PATH) as conn:
|
||||
cursor = conn.execute("""
|
||||
|
||||
Reference in New Issue
Block a user