diff --git a/docs/CHEATSHEET.md b/docs/CHEATSHEET.md index b880df0..db48caf 100644 --- a/docs/CHEATSHEET.md +++ b/docs/CHEATSHEET.md @@ -276,11 +276,11 @@ VT rate limit: 4 req/min. Email check: max 5, admin only. ## FlaskPaste ``` -!paste some text here # Create paste, get URL !shorten https://long-url.com/x # Shorten URL ``` Auto-shortens URLs in `!alert` announcements and history when plugin is loaded. +Paste helper used internally for multi-line bot output. Config: `[flaskpaste]` in `config/derp.toml` or `FLASKPASTE_URL` env var. ### Data Setup diff --git a/docs/USAGE.md b/docs/USAGE.md index 49f58f2..6fcbb05 100644 --- a/docs/USAGE.md +++ b/docs/USAGE.md @@ -131,7 +131,6 @@ format = "text" # Log format: "text" (default) or "json" | `!abuse report ` | Report IP to AbuseIPDB (admin) | | `!vt ` | VirusTotal lookup | | `!emailcheck [email2 ...]` | SMTP email verification (admin) | -| `!paste ` | Create a paste on FlaskPaste | | `!shorten ` | Shorten a URL via FlaskPaste | ### Command Shorthand @@ -848,24 +847,6 @@ bad@example.com -- SMTP 550 User unknown (mx: mail.example.com) - 15-second timeout per connection - Max 5 emails per invocation -### `!paste` -- Create Paste - -Upload text to FlaskPaste and get a shareable URL. - -``` -!paste some long text here -``` - -Output format: - -``` -https://paste.mymx.me/abc12345 -``` - -- mTLS client cert skips PoW; falls back to PoW challenge if no cert -- Content sent as JSON body to FlaskPaste API -- Raw content available at `/raw` - ### `!shorten` -- Shorten URL Shorten a URL via FlaskPaste's URL shortener. diff --git a/plugins/flaskpaste.py b/plugins/flaskpaste.py index 86113dc..4791b05 100644 --- a/plugins/flaskpaste.py +++ b/plugins/flaskpaste.py @@ -151,34 +151,6 @@ def create_paste(bot, content: str) -> str | None: # -- Commands ---------------------------------------------------------------- -@command("paste", help="Create a paste: !paste ") -async def cmd_paste(bot, message): - """Create a paste on FlaskPaste and return the URL. - - Usage: - !paste some long text here - """ - parts = message.text.split(None, 1) - if len(parts) < 2: - await bot.reply(message, "Usage: !paste ") - return - - content = parts[1] - base_url = _get_base_url(bot) - loop = asyncio.get_running_loop() - - try: - url = await loop.run_in_executor(None, _create_paste, base_url, content) - except Exception as exc: - await bot.reply(message, f"paste failed: {exc}") - return - - if url: - await bot.reply(message, url) - else: - await bot.reply(message, "paste failed: no URL returned") - - @command("shorten", help="Shorten a URL: !shorten ") async def cmd_shorten(bot, message): """Shorten a URL via FlaskPaste.