mirror of
https://github.com/tiennm99/tiennm99bot.git
synced 2026-10-13 22:16:33 +00:00
feat(monkeyd): add /monkeyd_tags to report a novel's tags as hashtags
Replies with a hashtag line led by #MonkeyD, then a blank line and the novel URL, sent as a code block so it can be copied in one tap. Each genre label becomes one hashtag with spaces and punctuation stripped and every word capitalised, since Telegram ends a hashtag at the first character that is not a letter, digit, or underscore. Diacritics survive; a label with no letters is dropped rather than emitted as a bare hash. The command costs one request and runs inline under a short timeout rather than in the background: handlers are dispatched one at a time, so a stalled fetch would block every other command. It shares the export page cache. Advance the submodule to the tag parser, which matches itemprop="genre" microdata so the site-wide genre navigation stays out of the result.
This commit is contained in:
1 parent
67341b8772
commit
181bfb5a8d
9 files changed
+508
-22
No files matched your search
@@ -68,6 +68,7 @@ func TestCommandDiscovery_AllPublicCommandsHaveSafeMetadata(t *testing.T) {
|
||||
"lol": "[date]",
|
||||
"loldle": "[champion]",
|
||||
"monkeyd_crawl": "<url> [font_size]",
|
||||
"monkeyd_tags": "<url>",
|
||||
"random": "<option,...>",
|
||||
"stats": "[users | user <username> | cmd <command_name>]",
|
||||
"stock_events": "<ticker> [days]",
|
||||
|
||||
Reference in new issue
Block a user