mirror of
https://github.com/nexy7574/LCC-bot.git
synced 2024-09-19 18:16:34 +01:00
Support command references in starboard again
This commit is contained in:
parent
6b78174f12
commit
6a0cb80447
1 changed files with 6 additions and 2 deletions
|
@ -96,11 +96,15 @@ class StarBoardCog(commands.Cog):
|
||||||
embed.fields[1].value = field.value.replace(":\n>>> ", "")
|
embed.fields[1].value = field.value.replace(":\n>>> ", "")
|
||||||
else:
|
else:
|
||||||
embed.fields[1].value += textwrap.shorten(ref.content, 1024 - len(field.value), placeholder="...")
|
embed.fields[1].value += textwrap.shorten(ref.content, 1024 - len(field.value), placeholder="...")
|
||||||
elif message.interaction is not None:
|
if message.interaction is not None:
|
||||||
inter: discord.MessageInteraction = message.interaction
|
inter: discord.MessageInteraction = message.interaction
|
||||||
|
if inter.type == discord.InteractionType.application_command:
|
||||||
|
cmd = "</{}:{}>".format(inter.id, inter.name)
|
||||||
|
else:
|
||||||
|
cmd = repr(inter.name)
|
||||||
embed.add_field(
|
embed.add_field(
|
||||||
name="In response to",
|
name="In response to",
|
||||||
value=f"Command '{inter.name}' by {inter.user.display_name}]):",
|
value=f"Command {cmd} by {inter.user.display_name}",
|
||||||
inline=False,
|
inline=False,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue