Ejemplo n.º 1
0
        public async void AddServer(Discord.Server server)
        {
            ulong  serverid   = server.Id;
            ulong  ownerid    = server.Owner.Id;
            string servername = server.Name;
            string key        = new StringBuilder().CreateToken();

            new ServerRepo(new ServerContext()).AddServer(serverid, ownerid, servername, key);
            Console.WriteLine(servername + " has added AtlasBot to their server");
            new Log(BotUser, commands).AdminLog(servername + " has added the bot. Owner: " + server.Owner.ToString());
            new Log(BotUser, commands).DMBort(servername + ": " + server.Owner.ToString() + " Key: " + key);
            await server.Owner.SendMessage(Eng_Default.VerifyServer());

            new SettingsRepo(new SettingsContext()).CreateSettings(serverid);
        }