Update link_fixer.py - #138
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the Discord bot’s link rewriting cog to add an additional “Twitter Web Viewer” link for rewritten Twitter/X URLs, offering an alternative viewer option alongside the existing FxTwitter rewrite.
Changes:
- Added a helper (
twitter_web_viewer_url) to extract a tweet ID from a rewritten Twitter/X URL and build atwitterwebviewer.comlink. - Updated
on_messagehandling to optionally post the Twitter Web Viewer link when the rewritten URL is an FxTwitter link.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
Suppressed comments (1)
arsene_wenger/cogs/link_fixer.py:72
- The
elsebranch reply call has inconsistent indentation inside the parentheses, which hurts readability and can trigger formatter/linter failures.
else:
await message.reply(
f"Fx'ed that for you! {new_url}", mention_author=False
)
|
Do me a favor and run a If there are any flags related to your new/changed code, please fix them. |
PS C:\Users\renat\Documents\GitHub\ArseneWenger> uvx ruff check arsene_wenger/cogs/link_fixer.py
32 + a twitter web viewer url.
|
adding a second twitter web viewer link so that people can use that instead of going straight to x.