literal string for webhookinfo, also inside of an embed, better way to format the icon instead of clicking now.

This commit is contained in:
byron 2024-03-13 12:47:22 -04:00 committed by GitHub
parent f2b22bc349
commit 0fd7a59d8a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -73,18 +73,22 @@ export default definePlugin({
.then(response => { .then(response => {
WMLogger.info(JSON.stringify(response)); WMLogger.info(JSON.stringify(response));
sendBotMessage(ctx.channel.id, { sendBotMessage(ctx.channel.id, {
content: "# Webhook Information: \n" + embeds: [
"Webhook Username: " + response.name + "\n " + {
"Webhook ID: " + response.id + "\n " + author: {
"Webhook Token: " + response.token + "\n " + icon_url: `https://cdn.discordapp.com/avatars/${response.id}/${response.avatar}.png`,
"Channel ID: " + response.channel_id + "\n " + },
"Server ID: " + response.guild_id + "\n " +
"Webhook Profile Picture: " + "[Click Me](https://cdn.discordapp.com/avatars/" + response.id + "/" + response.avatar + ".png)" + "\n " +
"Webhook Type: " + response.type + "\n \n" +
"# Webhook Creator Information: \n " + content: `# Webhook Information: \n
"Creator UserID: " + response.user.id + "\n " + Webhook Username: ${response.name}
"Creator Username: " + "<@" + response.user.id + ">" + "\n " Webhook ID: ${response.id}
Webhook Token: ${response.token}
Webhook Type: ${response.type}
Channel ID: ${response.channel_id}
Server ID: ${response.guild_id}
"Creator Profile: <@${response.user.id}>`
}]
}); });
}); });
} }
@ -114,7 +118,7 @@ export default definePlugin({
}, },
{ {
name: "rawjson", name: "rawjson",
description: "Send as a raw JSON", description: "Send message as raw JSON",
type: ApplicationCommandOptionType.BOOLEAN, type: ApplicationCommandOptionType.BOOLEAN,
required: false required: false
} }
@ -147,4 +151,4 @@ export default definePlugin({
} }
} }
] ]
}); });;;;;