📅  最后修改于: 2022-03-11 15:03:22.749000             🧑  作者: Mango
client.on("message", async message => {
if (message.author.bot) return;
if (message.webhookID) return;
if (!message.content.startsWith(prefix)) return;
let command = message.content.split(" ")[0];
command = command.slice(prefix.length);
let args = message.content.split(" ").slice(1);
if (command == "ÙÙÙÙ") {
const avatar = message.author.avatarURL()
let args = message.content.split(" ").slice(1);
const webhooks = await message.channel.fetchWebhooks();
const webhook = webhooks.first();
if (!webhook) {
webhook = await message.channel.createWebhook(`Islam webhook`, {
avatar: client.user.displayAvatarURL()
});
}
try {
await webhook.send(args.join(""), {
username: message.author.username,
avatarURL: avatar,}
);} catch (error) {console.error('Error trying to send: ', error);}}
});