Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions bot/cogs/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ def construct_load_bar_string(percent: int, suffix_message: str = None, size: in
@app_commands.choices(name=[
app_commands.Choice(name="Ask", value="ask"),
app_commands.Choice(name="Markdown", value="markdown"),
app_commands.Choice(name="Spoiler", value="spoiler"),
app_commands.Choice(name="Run Help", value="run_help"),
app_commands.Choice(name="Zen", value="zen"),
app_commands.Choice(name="Add to Issues", value="add_to_issues")
Expand Down Expand Up @@ -152,6 +153,26 @@ async def tag(self, interaction: discord.Interaction, name: app_commands.Choice[
message = await interaction.original_response()
await RemovableMessage.create_instance(self.bot, message, interaction.user)

elif value == "spoiler":
content = (
"You can hide your code by applying spoiler tags like this:\n\n"
"\\|\\|\n\\`\\`\\`python\n"
"print('Hello world')\n"
"\\`\\`\\`\\|\\|\n\n"
"This would give you:\n"
"||```python\n"
"print('Hello world')```||\n"
"**Video explanation:**\n"
)
embed = info(
content, interaction.guild.me, "",
"Note: The character | is the pipe operator."
)
embed.set_image(url="https://lairesit.sirv.com/Tortoise/howtoapplyspoiler.gif")
await interaction.response.send_message(embed=embed)
message = await interaction.original_response()
await RemovableMessage.create_instance(self.bot, message, interaction.user)

elif value == "run_help":
content = (
"# How to Run Code using the bot\n\n"
Expand Down
Loading