ttstoy: remove slash commands, make tts prefix-only
Change tts from commands.hybrid_command to commands.command so it no longer registers an app (slash) command, and drop the ctx.interaction reply branch (always react_quietly now).
This commit is contained in:
+1
-4
@@ -2424,7 +2424,7 @@ class TtsToy(Cog):
|
|||||||
# ---------------------------------------------------------------------
|
# ---------------------------------------------------------------------
|
||||||
# SPEAK COMMAND (JUST [p]tts)
|
# SPEAK COMMAND (JUST [p]tts)
|
||||||
# ---------------------------------------------------------------------
|
# ---------------------------------------------------------------------
|
||||||
@commands.hybrid_command(name="tts")
|
@commands.command(name="tts")
|
||||||
@commands.guild_only()
|
@commands.guild_only()
|
||||||
async def tts(self, ctx: commands.Context, *, text: str):
|
async def tts(self, ctx: commands.Context, *, text: str):
|
||||||
"""
|
"""
|
||||||
@@ -2583,9 +2583,6 @@ class TtsToy(Cog):
|
|||||||
|
|
||||||
await queue.put((ctx, audio_path))
|
await queue.put((ctx, audio_path))
|
||||||
|
|
||||||
if ctx.interaction:
|
|
||||||
await ctx.reply("🗣")
|
|
||||||
else:
|
|
||||||
await ctx.react_quietly("🗣")
|
await ctx.react_quietly("🗣")
|
||||||
|
|
||||||
# =========================================================================
|
# =========================================================================
|
||||||
|
|||||||
Reference in New Issue
Block a user