const Discord = require("discord.js");
const key = require("../key");
const botAllCommandRegister = require("./botAllCommandRegister");

const state = {
  commands: new Set()
};

const client = new Discord.Client();
client.on("ready", () => {
  console.log("I am ready!");
});

client.on("message", message => {
  for (const cmd of state.commands) {
    if (cmd.test(message.content, message)) {
      cmd.run(message, client);
    }
  }
});

client.on("guildMemberAdd", member => {
  const channel = member.guild.channels.find("name", "member-log");
  if (!channel) return;
  channel.send(`Welcome to the server, ${member}`);
});

botAllCommandRegister(state, client);
client.login(key);

@@ -232,24 +232,55 @@
 y%22, () =%3E %7B%0A
+  client.user.setGame(%22%D0%91%D0%BE%D1%82%D0%B0%22);%0A
   console.lo
@@ -656,16 +656,85 @@
 );%0A%7D);%0A%0A
+process.on(%22exit%22, () =%3E %7B%0A  client.user.setGame(%22%D0%9E%D0%B1%D0%BD%D0%BE%D0%B2%D0%BB%D1%8F%D1%8E%D1%81%D1%8C%22);%0A%7D);%0A%0A
 botAllCo

add update status