Esempio n. 1
0
        public async void Init()
        {
            _discordConfig = JsonConvert.DeserializeObject <DiscordConfig>(Utils.FileHandler.Read("_discordConfig.json"));
            Client         = new DiscordSocketClient();

            Client.Log             += DiscordLog;
            Client.MessageReceived += MessageReceived;
            Client.Ready           += ClientReady;
            IsReady = false;

            await Client.LoginAsync(TokenType.Bot, _discordConfig.Token);

            await Client.StartAsync();
        }
Esempio n. 2
0
        public async void Init()
        {
            _discordConfig = JsonConvert.DeserializeObject <DiscordConfig>(Utils.FileHandler.Read("_discordConfig.json"));
            Client         = new DiscordSocketClient();

            Client.Log             += DiscordLog;
            Client.MessageReceived += MessageReceived;
            Client.Ready           += ClientReady;
            IsReady = false;
            _gen    = new Random();
            _buffer = new StringBuilder();
            _game   = new GameController(this, _gen);

            await Client.LoginAsync(TokenType.Bot, _discordConfig.Token);

            await Client.StartAsync();
        }