[英]discord.js bot problem: how can replace owner's id with roles collection
i was trying to create a warning about pinging staff, my current code is:我试图创建一个关于 ping 员工的警告,我当前的代码是:
const ownerId = "ID";
client.on("message", async message => {
if (message.author.bot) return false;
if (message.mentions.has(ownerId)) {
await message.delete();
message.reply(`dont ping it!`);
};
});
client.login(process.env.DISCORD_AUTH_TOKEN);
i was trying to create a warning about pinging staff, my current code is:我试图创建一个关于 ping 员工的警告,我当前的代码是:
const ownerId = "ID";
client.on("message", async message => {
if (message.author.bot) return false;
if (message.mentions.has(ownerId)) {
await message.delete();
message.reply(`dont ping it!`);
};
});
client.login(process.env.DISCORD_AUTH_TOKEN);
i was trying to create a warning about pinging staff, my current code is:我试图创建一个关于 ping 员工的警告,我当前的代码是:
const ownerId = "ID";
client.on("message", async message => {
if (message.author.bot) return false;
if (message.mentions.has(ownerId)) {
await message.delete();
message.reply(`dont ping it!`);
};
});
client.login(process.env.DISCORD_AUTH_TOKEN);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.