0
Edit message
One script reply has been approved by the moderators Verified
Created by lplit 850 days ago Viewed 9288 times
0
Submitted by lplit Deno
Verified 850 days ago
1
import discordwebhook from "https://deno.land/x/discordwebhook/mod.ts";
2

3
type DiscordWebhook = {
4
  webhook_url: string;
5
};
6
export async function main(
7
  discord_webhook: DiscordWebhook,
8
  messageId: string,
9
  newMessageContent: string,
10
) {
11
  const webhook = new discordwebhook(discord_webhook.webhook_url);
12
  const ret = await webhook.editMessage(messageId, newMessageContent);
13
  return ret;
14
}
15