LTurret / ArisaMatsuda

A discord bot for private server management.
MIT License
0 stars 0 forks source link

Remove message embed automatically #10

Closed LTurret closed 7 months ago

LTurret commented 7 months ago

When detect new message contain twitter link, the bot remove base message's embed by itself. The folloing JS script is a request for remove embed using PATCH method, by replace <message_id>, <channel_id> and <yours_secret> this should be possible implemented.

fetch("https://discord.com/api/v9/channels/<channel_id>/messages/<message_id>", {
  "headers": {
    "accept": "*/*",
    "authorization": <yours_secret>,
    "content-type": "application/json",
  },
  "body": "{\"flags\":4}",
  "method": "PATCH",
});
LTurret commented 7 months ago

https://github.com/LTurret/ArisaMatsuda/commit/ac4b2f35e14944ed42a27db2340c98f584b6998d