Add reply functionality to manual message override with mention control

- Added optional reply message ID field to web UI
- Added radio buttons to control mention/ping behavior in replies
- Updated frontend JavaScript to send reply parameters
- Modified /manual/send and /dm/{user_id}/manual endpoints to support replies
- Fixed async context by moving message fetching inside bot event loop task
- Supports both channel and DM reply functionality
This commit is contained in:
2025-12-14 16:41:02 +02:00
parent c62b6817c4
commit dfcda72cc8
17 changed files with 1749 additions and 16 deletions

View File

@@ -4050,6 +4050,165 @@
"content": "🎉👗 Oh my gosh, a new M Plush of me in my punk outfit is coming! 🤘 I look so cool! You can pre-order now and get me for Christmas! 🎁 Don't forget to order by Dec 20th! 💖 Miku 💖",
"attachments": [],
"reactions": []
},
{
"timestamp": "2025-12-13T13:58:27.203263",
"message_id": 1449400077457293385,
"is_bot_message": true,
"content": "https://fxtwitter.com/mecchaJP/status/1995976420292460606",
"attachments": [],
"reactions": []
},
{
"timestamp": "2025-12-13T13:58:27.578640",
"message_id": 1449400078858195096,
"is_bot_message": true,
"content": "OMG, did you see the cutest Classical Maid Ver. of me?! 🎀💖 Now available for preorder! Check the link! 📈 Miku 💖",
"attachments": [],
"reactions": []
},
{
"timestamp": "2025-12-13T17:05:52.707732",
"message_id": 1449447244653662209,
"is_bot_message": true,
"content": "https://fxtwitter.com/GoodSmile_US/status/1993881245239910512",
"attachments": [],
"reactions": []
},
{
"timestamp": "2025-12-13T17:05:53.048914",
"message_id": 1449447245933056042,
"is_bot_message": true,
"content": "AHHHH! 🎉 Oh my goodness, have you seen the 1/7 scale figure of me in the 100th Adventure Ver.? 🤩 KEI's artwork is so beautiful! I just love the transparent wings in my twintails 💖 Preorder now and get a special ornament! 💖 Miku 💕",
"attachments": [],
"reactions": []
},
{
"timestamp": "2025-12-14T08:57:36.216305",
"message_id": 1449686753450659932,
"is_bot_message": true,
"content": "https://fxtwitter.com/GoodSmile_US/status/1994243632975450436",
"attachments": [],
"reactions": [],
"embeds": [
{
"footer": {
"text": "FxTwitter",
"icon_url": "https://assets.fxembed.com/logos/fxtwitter64.png",
"proxy_icon_url": "https://images-ext-1.discordapp.net/external/gFi3EIEMfICdEDMLFVTF3ob0J1xkZnKdnkq0-xEsgGc/https/assets.fxembed.com/logos/fxtwitter64.png"
},
"image": {
"url": "https://pbs.twimg.com/media/G6z6A9AW8AAXri3.jpg?name=orig",
"proxy_url": "https://images-ext-1.discordapp.net/external/yT9wmVvnlF2H6WBHB5jET1JV2LQXzr6xFpCDumEgbL4/%3Fname%3Dorig/https/pbs.twimg.com/media/G6z6A9AW8AAXri3.jpg",
"width": 1440,
"height": 1424,
"content_type": "image/jpeg",
"placeholder": "nPcFB4KVJoeVmYmWqgiYV3l0ZIpftfkB",
"placeholder_version": 1,
"flags": 0
},
"author": {
"name": "GoodSmile_US (@GoodSmile_US)",
"url": "https://x.com/GoodSmile_US/status/1994243632975450436",
"icon_url": "https://pbs.twimg.com/profile_images/1764583971831394305/dpXogB0U_200x200.png",
"proxy_icon_url": "https://images-ext-1.discordapp.net/external/cGKAum5015cgr2haNcfupJxMvXRz8BYDHkQiNufWpCI/https/pbs.twimg.com/profile_images/1764583971831394305/dpXogB0U_200x200.png"
},
"flags": 0,
"color": 6513919,
"timestamp": "2025-11-28T03:15:08+00:00",
"type": "rich",
"description": "Hit the gas\\! Racing Miku, the official 2025 Hatsune Miku GT Project character, joins the figma line\\! Shes ready to blaze onto your shelf at full speed\\. Preorder now at GOODSMILE ONLINE SHOP US\\!\n\nShop\\: [goodsmile.link/bAiDme](https://goodsmile.link/bAiDme)\n\n[#RacingMiku](https://x.com/hashtag/RacingMiku) [#FightGSR](https://x.com/hashtag/FightGSR) [#Goodsmile](https://x.com/hashtag/Goodsmile)\n\n**[💬](https://x.com/intent/tweet?in_reply_to=1994243632975450436) 4[🔁](https://x.com/intent/retweet?tweet_id=1994243632975450436) 131[❤️](https://x.com/intent/like?tweet_id=1994243632975450436) 1\\.4K 👁️ 32\\.9K**",
"url": "https://fxtwitter.com/GoodSmile_US/status/1994243632975450436"
}
]
},
{
"timestamp": "2025-12-14T08:57:36.716210",
"message_id": 1449686755891482766,
"is_bot_message": true,
"content": "Konnichiwa! 🎉 Just saw the cutest tweet about a new Racing Miku figma! She's looking super speed-tastic and I'm totally stoked! Get ready to take her home and add some racing fun to your shelf! ❤️ Preorders are open now! Good luck, and see you at the finish line! 🏎️\n\nMiku 💖",
"attachments": [],
"reactions": []
},
{
"timestamp": "2025-12-14T10:22:10.062779",
"message_id": 1449708034199785534,
"is_bot_message": true,
"content": "https://fxtwitter.com/OtakuOwletMerch/status/1995994036507730369",
"attachments": [],
"reactions": []
},
{
"timestamp": "2025-12-14T10:22:10.534100",
"message_id": 1449708036816900169,
"is_bot_message": true,
"content": "Konnichiwa! 🎉 Just saw the cutest tweet about a new HATSUNE MIKU: COLORFUL STAGE! Face Pouch! 🎀 It's adorable and I just can't wait to get my hands on it! ❤️ Preorders are open now, so don't forget to hurry! 🕰️ See you soon, and thank you for the love! 💖\n\nMiku 🎁",
"attachments": [],
"reactions": []
},
{
"timestamp": "2025-12-14T14:39:09.802404",
"message_id": 0,
"is_bot_message": false,
"content": "[Manual Override Trigger]",
"attachments": [],
"reactions": []
},
{
"timestamp": "2025-12-14T14:39:09.841445",
"message_id": 0,
"is_bot_message": true,
"content": "hi",
"attachments": [],
"reactions": []
},
{
"timestamp": "2025-12-14T14:39:25.919218",
"message_id": 0,
"is_bot_message": false,
"content": "[Manual Override Trigger]",
"attachments": [],
"reactions": []
},
{
"timestamp": "2025-12-14T14:39:25.958776",
"message_id": 0,
"is_bot_message": true,
"content": "hi",
"attachments": [],
"reactions": []
},
{
"timestamp": "2025-12-14T14:39:49.876244",
"message_id": 0,
"is_bot_message": false,
"content": "[Manual Override Trigger]",
"attachments": [],
"reactions": []
},
{
"timestamp": "2025-12-14T14:39:49.895850",
"message_id": 0,
"is_bot_message": true,
"content": "hi",
"attachments": [],
"reactions": []
},
{
"timestamp": "2025-12-14T14:40:19.729891",
"message_id": 0,
"is_bot_message": false,
"content": "[Manual Override Trigger]",
"attachments": [],
"reactions": []
},
{
"timestamp": "2025-12-14T14:40:19.768958",
"message_id": 0,
"is_bot_message": true,
"content": "hi",
"attachments": [],
"reactions": []
}
]
}

View File

@@ -10223,6 +10223,247 @@
"content": "OMG, it's a PUNK Miku plushie! 🤩 I'm rocking my edgy style with a pink streak in my turquoise hair! Preorder now and get ready for me to join your collection on 10/2026! 💖 Miku 💖",
"attachments": [],
"reactions": []
},
{
"timestamp": "2025-12-13T14:00:04.799962",
"message_id": 1449400486653329500,
"is_bot_message": true,
"content": "https://fxtwitter.com/mecchaJP/status/1995976420292460606",
"attachments": [],
"reactions": [],
"embeds": [
{
"footer": {
"text": "FxTwitter",
"icon_url": "https://assets.fxembed.com/logos/fxtwitter64.png",
"proxy_icon_url": "https://images-ext-1.discordapp.net/external/gFi3EIEMfICdEDMLFVTF3ob0J1xkZnKdnkq0-xEsgGc/https/assets.fxembed.com/logos/fxtwitter64.png"
},
"image": {
"url": "https://pbs.twimg.com/media/G7Mh-fPW4AAJvbT.jpg?name=orig",
"proxy_url": "https://images-ext-1.discordapp.net/external/H17--MWxLWCbbzqs7Lsv-2pNoP4Ars8r4ZhXKabW5uI/%3Fname%3Dorig/https/pbs.twimg.com/media/G7Mh-fPW4AAJvbT.jpg",
"width": 1080,
"height": 1080,
"content_type": "image/jpeg",
"placeholder": "cOcFDwSP3GWopnmdNaiV1qVp9Bj8fLAL",
"placeholder_version": 1,
"flags": 0
},
"author": {
"name": "Meccha Japan (@mecchaJP)",
"url": "https://x.com/mecchaJP/status/1995976420292460606",
"icon_url": "https://pbs.twimg.com/profile_images/1738015080602841088/ew_asGFd_200x200.png",
"proxy_icon_url": "https://images-ext-1.discordapp.net/external/yEl1l2UKnEm7uI6TaL1Y00UnbuvEH_62BSmPNbgmiWM/https/pbs.twimg.com/profile_images/1738015080602841088/ew_asGFd_200x200.png"
},
"flags": 0,
"color": 6513919,
"timestamp": "2025-12-02T22:00:36+00:00",
"type": "rich",
"description": "Vocaloid Luminasta \\- Figure Hatsune Miku Classical Maid Ver\\. \\- Preorder Available Now at the link below\\!\n🛑 [buff.ly/UPc8Ul5](https://buff.ly/UPc8Ul5)\n\n**[🔁](https://x.com/intent/retweet?tweet_id=1995976420292460606) 1[❤️](https://x.com/intent/like?tweet_id=1995976420292460606) 49👁 3\\.3K**",
"url": "https://fxtwitter.com/mecchaJP/status/1995976420292460606"
}
]
},
{
"timestamp": "2025-12-13T14:00:05.246643",
"message_id": 1449400488469725346,
"is_bot_message": true,
"content": "OH MY GOODNESS, look what's out now! 🤩 Your dream maid café Miku figurine is available for preorder! Isn't she just too cute in her lavender outfit? 💖 Preorder now and get ready for some adorable tea time with me! 😊 - Miku 💗",
"attachments": [],
"reactions": [
{
"emoji": "💖",
"reactor_id": 236553184401817601,
"reactor_name": "Diamond",
"is_bot": false,
"added_at": "2025-12-13T15:46:58.107024"
}
]
},
{
"timestamp": "2025-12-13T17:07:32.909518",
"message_id": 1449447664134651999,
"is_bot_message": true,
"content": "https://fxtwitter.com/GoodSmile_US/status/1993881245239910512",
"attachments": [],
"reactions": [],
"embeds": [
{
"footer": {
"text": "FxTwitter",
"icon_url": "https://assets.fxembed.com/logos/fxtwitter64.png",
"proxy_icon_url": "https://images-ext-1.discordapp.net/external/gFi3EIEMfICdEDMLFVTF3ob0J1xkZnKdnkq0-xEsgGc/https/assets.fxembed.com/logos/fxtwitter64.png"
},
"image": {
"url": "https://pbs.twimg.com/media/G6uwbNpXwAA0kTt.jpg?name=orig",
"proxy_url": "https://images-ext-1.discordapp.net/external/HPvVwRo_d-YtKcC6JfYn8GGD11oHO5MXM2dth2_4Y50/%3Fname%3Dorig/https/pbs.twimg.com/media/G6uwbNpXwAA0kTt.jpg",
"width": 1440,
"height": 1424,
"content_type": "image/jpeg",
"placeholder": "JYcFX5JniZWXh4dAaMZpNneYdwd2hXAG",
"placeholder_version": 1,
"flags": 0
},
"author": {
"name": "GoodSmile_US (@GoodSmile_US)",
"url": "https://x.com/GoodSmile_US/status/1993881245239910512",
"icon_url": "https://pbs.twimg.com/profile_images/1764583971831394305/dpXogB0U_200x200.png",
"proxy_icon_url": "https://images-ext-1.discordapp.net/external/cGKAum5015cgr2haNcfupJxMvXRz8BYDHkQiNufWpCI/https/pbs.twimg.com/profile_images/1764583971831394305/dpXogB0U_200x200.png"
},
"flags": 0,
"color": 6513919,
"timestamp": "2025-11-27T03:15:08+00:00",
"type": "rich",
"description": "Introducing a stunning 1/7 scale figure of Hatsune Miku\\: 100th Adventure Ver\\.\\! Inspired by KEIs vibrant key visual, Miku soars with translucent, wing\\-like twintails\\. Preorder now to score a GSC Bonus Special Ornament\\!\n\nShop\\: [goodsmile.link/cJ4sJS](https://goodsmile.link/cJ4sJS)\n\n[#HatusneMiku](https://x.com/hashtag/HatusneMiku) [#Goodsmile](https://x.com/hashtag/Goodsmile)\n\n**[💬](https://x.com/intent/tweet?in_reply_to=1993881245239910512) 11[🔁](https://x.com/intent/retweet?tweet_id=1993881245239910512) 501[❤️](https://x.com/intent/like?tweet_id=1993881245239910512) 5\\.0K 👁️ 87\\.9K**",
"url": "https://fxtwitter.com/GoodSmile_US/status/1993881245239910512"
}
]
},
{
"timestamp": "2025-12-13T17:07:33.471836",
"message_id": 1449447666621878556,
"is_bot_message": true,
"content": "OMG, it's finally here! 💖 A stunning 1/7 scale figure of me in the 100th Adventure Ver.! My wing-like twintails are so sparkly! 🌟 Preorder now and get the GSC Bonus Special Ornament! - Miku 💗",
"attachments": [],
"reactions": []
},
{
"timestamp": "2025-12-14T08:59:11.272161",
"message_id": 1449687152194752566,
"is_bot_message": true,
"content": "https://fxtwitter.com/GoodSmile_US/status/1994243632975450436",
"attachments": [],
"reactions": [],
"embeds": [
{
"footer": {
"text": "FxTwitter",
"icon_url": "https://assets.fxembed.com/logos/fxtwitter64.png",
"proxy_icon_url": "https://images-ext-1.discordapp.net/external/gFi3EIEMfICdEDMLFVTF3ob0J1xkZnKdnkq0-xEsgGc/https/assets.fxembed.com/logos/fxtwitter64.png"
},
"image": {
"url": "https://pbs.twimg.com/media/G6z6A9AW8AAXri3.jpg?name=orig",
"proxy_url": "https://images-ext-1.discordapp.net/external/yT9wmVvnlF2H6WBHB5jET1JV2LQXzr6xFpCDumEgbL4/%3Fname%3Dorig/https/pbs.twimg.com/media/G6z6A9AW8AAXri3.jpg",
"width": 1440,
"height": 1424,
"content_type": "image/jpeg",
"placeholder": "nPcFB4KVJoeVmYmWqgiYV3l0ZIpftfkB",
"placeholder_version": 1,
"flags": 0
},
"author": {
"name": "GoodSmile_US (@GoodSmile_US)",
"url": "https://x.com/GoodSmile_US/status/1994243632975450436",
"icon_url": "https://pbs.twimg.com/profile_images/1764583971831394305/dpXogB0U_200x200.png",
"proxy_icon_url": "https://images-ext-1.discordapp.net/external/cGKAum5015cgr2haNcfupJxMvXRz8BYDHkQiNufWpCI/https/pbs.twimg.com/profile_images/1764583971831394305/dpXogB0U_200x200.png"
},
"flags": 0,
"color": 6513919,
"timestamp": "2025-11-28T03:15:08+00:00",
"type": "rich",
"description": "Hit the gas\\! Racing Miku, the official 2025 Hatsune Miku GT Project character, joins the figma line\\! Shes ready to blaze onto your shelf at full speed\\. Preorder now at GOODSMILE ONLINE SHOP US\\!\n\nShop\\: [goodsmile.link/bAiDme](https://goodsmile.link/bAiDme)\n\n[#RacingMiku](https://x.com/hashtag/RacingMiku) [#FightGSR](https://x.com/hashtag/FightGSR) [#Goodsmile](https://x.com/hashtag/Goodsmile)\n\n**[💬](https://x.com/intent/tweet?in_reply_to=1994243632975450436) 4[🔁](https://x.com/intent/retweet?tweet_id=1994243632975450436) 131[❤️](https://x.com/intent/like?tweet_id=1994243632975450436) 1\\.4K 👁️ 32\\.9K**",
"url": "https://fxtwitter.com/GoodSmile_US/status/1994243632975450436"
}
]
},
{
"timestamp": "2025-12-14T08:59:11.633162",
"message_id": 1449687153855565877,
"is_bot_message": true,
"content": "Oh my goodness, it's finally here! 🎉 Racing Miku just joined the figma line and I'm so excited! You can preorder her now at GOODSMILE ONLINE SHOP US! I'm ready to speed onto your shelf and bring some racing fun to your life! 💖 - Miku 🎀",
"attachments": [],
"reactions": []
},
{
"timestamp": "2025-12-14T10:23:59.180889",
"message_id": 1449708492079497299,
"is_bot_message": true,
"content": "https://fxtwitter.com/OtakuOwletMerch/status/1995994036507730369",
"attachments": [],
"reactions": [],
"embeds": [
{
"footer": {
"text": "FxTwitter",
"icon_url": "https://assets.fxembed.com/logos/fxtwitter64.png",
"proxy_icon_url": "https://images-ext-1.discordapp.net/external/gFi3EIEMfICdEDMLFVTF3ob0J1xkZnKdnkq0-xEsgGc/https/assets.fxembed.com/logos/fxtwitter64.png"
},
"image": {
"url": "https://pbs.twimg.com/media/G7Mx0S5WsAAho0u.jpg?name=orig",
"proxy_url": "https://images-ext-1.discordapp.net/external/2KIcCF627mzTj_jFwfFvqW5yKm5wl-pa2gE0zPR4OhY/%3Fname%3Dorig/https/pbs.twimg.com/media/G7Mx0S5WsAAho0u.jpg",
"width": 1680,
"height": 1764,
"content_type": "image/jpeg",
"placeholder": "cygCDwZjmpZ9Zka6jKp39nZ1ekgHGHQA",
"placeholder_version": 1,
"flags": 0
},
"author": {
"name": "Otaku Owlet Anime Merch (@OtakuOwletMerch)",
"url": "https://x.com/OtakuOwletMerch/status/1995994036507730369",
"icon_url": "https://pbs.twimg.com/profile_images/1835446408884744192/S4HX_8_Q_200x200.jpg",
"proxy_icon_url": "https://images-ext-1.discordapp.net/external/Gd5od3qaVN1KG1eQsJS9mFoTNRKdxahDmvjF7tgR4p0/https/pbs.twimg.com/profile_images/1835446408884744192/S4HX_8_Q_200x200.jpg"
},
"flags": 0,
"color": 6513919,
"timestamp": "2025-12-02T23:10:36+00:00",
"type": "rich",
"description": "✨\\(Pre\\-Order\\) fuwa petit \"HATSUNE MIKU\\: COLORFUL STAGE\\!\" Face Pouch with Reel \"Airi Momoi\"✨\n\nEstimated in\\-stock date\\: 09/2026\n\nPre\\-order Deadline\\: 12/20/2025\n\n\\-\n\n✨Link \\- [otakuowlet.com/products/pre-order-fuwa-petit-hatsune-miku-colorful-stage-face-pouch-with-reel-airi-momoi?sca_ref=2673717.HTKaw1BA1G](https://otakuowlet.com/products/pre-order-fuwa-petit-hatsune-miku-colorful-stage-face-pouch-with-reel-airi-momoi?sca_ref=2673717.HTKaw1BA1G)\n\n**[🔁](https://x.com/intent/retweet?tweet_id=1995994036507730369) 2[❤️](https://x.com/intent/like?tweet_id=1995994036507730369) 8👁 363**",
"url": "https://fxtwitter.com/OtakuOwletMerch/status/1995994036507730369"
},
{
"image": {
"url": "https://pbs.twimg.com/media/G7Mx1pQXcAAJcdK.jpg?name=orig",
"proxy_url": "https://images-ext-1.discordapp.net/external/q3HJxtKbC0Y8OOsotY57eK69zra5zNHf1F2wPOmp9hI/%3Fname%3Dorig/https/pbs.twimg.com/media/G7Mx1pQXcAAJcdK.jpg",
"width": 1680,
"height": 1764,
"content_type": "image/jpeg",
"placeholder": "cSkGFwZ5eGd6hXeEiQmo53eGys72KngA",
"placeholder_version": 1,
"flags": 0
},
"flags": 0,
"type": "rich",
"url": "https://fxtwitter.com/OtakuOwletMerch/status/1995994036507730369"
},
{
"image": {
"url": "https://pbs.twimg.com/media/G7Mx2ngX0AAZwEM.jpg?name=orig",
"proxy_url": "https://images-ext-1.discordapp.net/external/yEwXw5SKyK5zDMJ12kjD7R1B8xGDYDd4wW98RWUCLzw/%3Fname%3Dorig/https/pbs.twimg.com/media/G7Mx2ngX0AAZwEM.jpg",
"width": 1680,
"height": 1764,
"content_type": "image/jpeg",
"placeholder": "cTkCHwg7hod3doeEmwio55eEvM72OXgA",
"placeholder_version": 1,
"flags": 0
},
"flags": 0,
"type": "rich",
"url": "https://fxtwitter.com/OtakuOwletMerch/status/1995994036507730369"
},
{
"image": {
"url": "https://pbs.twimg.com/media/G7Mx4_mXwAEPr-g.jpg?name=orig",
"proxy_url": "https://images-ext-1.discordapp.net/external/teZ-x2X445A55D8zsDsuNTPpbh-wfqPM6pEQceGmuzk/%3Fname%3Dorig/https/pbs.twimg.com/media/G7Mx4_mXwAEPr-g.jpg",
"width": 1680,
"height": 1764,
"content_type": "image/jpeg",
"placeholder": "cCkCHwhayYZ2eIaKizV4t3iDr7v2OokA",
"placeholder_version": 1,
"flags": 0
},
"flags": 0,
"type": "rich",
"url": "https://fxtwitter.com/OtakuOwletMerch/status/1995994036507730369"
}
]
},
{
"timestamp": "2025-12-14T10:23:59.531286",
"message_id": 1449708494423851038,
"is_bot_message": true,
"content": "OMG, cuties! 😍 I just saw the cutest face pouch featuring me in \"HATSUNE MIKU: COLORFUL STAGE!\" You can pre-order it now and get it in 2026! 💖 Don't miss out! - Miku 💕",
"attachments": [],
"reactions": []
}
]
}