aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Steele Farnsworth <[email protected]>2023-04-04 19:02:54 -0400
committerGravatar Steele Farnsworth <[email protected]>2023-04-04 19:02:54 -0400
commite7b393bea0ed258941b938764bd1ff6967321cfc (patch)
treeb3d6daacc7a246b460e1b22a60bc36c2669d107b
parentPing help thread owner if thread closes without engagement. (diff)
Add warning not to pip install unrelated packages.
This is in response to recent attacks where the attacker DMs someone who opens a thread and tells the thread opener to pip install a malicious package under the false pretense that it will solve their problem. The warning replaces "For more tips, check out our guide on asking good questions", which is stated in the thread closer embed.
-rw-r--r--bot/exts/help_channels/_channel.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/bot/exts/help_channels/_channel.py b/bot/exts/help_channels/_channel.py
index 63a83c8fa..fff93dff1 100644
--- a/bot/exts/help_channels/_channel.py
+++ b/bot/exts/help_channels/_channel.py
@@ -17,13 +17,13 @@ ASKING_GUIDE_URL = "https://pythondiscord.com/pages/asking-good-questions/"
BRANDING_REPO_RAW_URL = "https://raw.githubusercontent.com/python-discord/branding"
POST_TITLE = "Python help channel"
-NEW_POST_MSG = f"""
+NEW_POST_MSG = """
**Remember to:**
• **Ask** your Python question, not if you can ask or if there's an expert who can help.
• **Show** a code sample as text (rather than a screenshot) and the error message, if you've got one.
• **Explain** what you expect to happen and what actually happens.
-For more tips, check out our guide on [asking good questions]({ASKING_GUIDE_URL}).
+:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
"""
NEW_POST_FOOTER = f"Closes after a period of inactivity, or when you send {constants.Bot.prefix}close."
NEW_POST_ICON_URL = f"{BRANDING_REPO_RAW_URL}/main/icons/checkmark/green-checkmark-dist.png"
@@ -86,7 +86,7 @@ async def send_opened_post_message(post: discord.Thread) -> None:
)
embed.set_author(name=f"{POST_TITLE} opened", icon_url=NEW_POST_ICON_URL)
embed.set_footer(text=NEW_POST_FOOTER)
- await post.send(embed=embed)
+ await post.send(embed=embed, content=post.owner.mention)
async def send_opened_post_dm(post: discord.Thread) -> None: