import discordwebhook from "https://deno.land/x/discordwebhook/mod.ts";
type DiscordWebhook = {
webhook_url: string;
};
export async function main(
discord_webhook: DiscordWebhook,
messageId: string,
newMessageContent: string,
) {
const webhook = new discordwebhook(discord_webhook.webhook_url);
const ret = await webhook.editMessage(messageId, newMessageContent);
return ret;
}
Submitted by admin 500 days ago
import discordwebhook from "https://deno.land/x/discordwebhook/mod.ts";
import type { Resource } from "https://deno.land/x/windmill/mod.ts";
export async function main(
discord_webhook: Resource<"discord_webhook">,
messageId: string,
newMessageContent: string,
) {
const webhook = new discordwebhook(discord_webhook.webhook_url);
const ret = await webhook.editMessage(messageId, newMessageContent);
return ret;
}
Submitted by lplit 850 days ago