アットウィキロゴ

関数一覧

Discord.Client()

botのフックっぽい。
とりあえず載せておきます。間違っていたら指摘・修正いただけると幸いです。
botがログイン
client.on("ready", () => {
 // This event will run if the bot starts, and logs in, successfully.
 console.log(`Bot has started, with ${client.users.size} users, in ${client.channels.size} channels of ${client.guilds.size} guilds.`); 
 // Example of changing the bot's playing game to something useful. `client.user` is what the
 // docs refer to as the "ClientUser".
 client.user.setActivity(`Serving ${client.guilds.size} servers`);
});
引数 意味
ready BOTの起動に反応
guildCreate ギルド(サーバー)作成に反応
guildDelete ギルド(サーバー)削除に反応
message 全てのメッセージ(DM含む)に反応
最終更新:2018年07月19日 07:06