私は現在、ロールプレイバー用の不協和音ボットを書いています。私はそれを教えてくれるときにバーを閉鎖する(つまり、投稿のアクセス権を私だけに制限する)ようにします。Discordチャットボットのチャンネルの投稿権限を変更する
は、ここでは、コードです:
const Discord = require("discord.js");
const bot = new Discord.Client();
bot.on("message", (message) => {
switch (message.content) {
case "Close down the bar for me":
if (message.author.discriminator ==) { // this isn't a typo i just haven't put it in for posting
message.postMessage("*Ushers people out, closes the cabinets, changes sign to closed, checks for stragglers, locks the doors, shuts the metal barriers, gets on motorbike and rides home*");
}
}
});
bot.login(''); // the token is meant to be here, I'm just not putting it on the internet!
はノー投稿にデフォルトのチャットの権限を変更するmessage.postMessage後に何を置くべきですか?
あなたは何をしたいのですか、あなたは何を得ていますか? – abdulbarik
私が言ったように、私はチャットの許可を変更して誰もそれに投稿することができないようにしたい。私はどこから始めるべきか分からないので、何の誤りもありません。 – tomtomy8
あなたは 'channel.sendMessage'を意味しませんか? – Wright