feat: paste overflow via FlaskPaste for long replies
Add Bot.long_reply() that sends lines directly when under threshold, or creates a FlaskPaste paste with preview + link when over. Refactor abuseipdb, alert history, crtsh, dork, exploitdb, and subdomain plugins to use long_reply(). Configurable paste_threshold (default: 4). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -2012,6 +2012,7 @@ async def cmd_alert(bot, message):
|
||||
return
|
||||
loop = asyncio.get_running_loop()
|
||||
fp = bot.registry._modules.get("flaskpaste")
|
||||
history_lines = []
|
||||
for row_id, backend, title, url, date, found_at, short_id, short_url in reversed(rows):
|
||||
ts = found_at[:10]
|
||||
title = _truncate(title) if title else "(no title)"
|
||||
@@ -2033,7 +2034,8 @@ async def cmd_alert(bot, message):
|
||||
line = f"[{name}/{backend}/{short_id}] ({date or ts}) {title}"
|
||||
if display_url:
|
||||
line += f" -- {display_url}"
|
||||
await bot.reply(message, line)
|
||||
history_lines.append(line)
|
||||
await bot.long_reply(message, history_lines, label="history")
|
||||
return
|
||||
|
||||
# -- info (any user, channel only) ---------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user