Esempio n. 1
0
        static async Task MainAsync(string[] args)
        {
            await EBotCredentials.Load();

            EBotClient client = new EBotClient(EBotCredentials.TOKEN_MAIN, "_");

            await client.ConnectAsync();

            await Task.Delay(-1);
        }
Esempio n. 2
0
        public static async Task Load()
        {
            using (StreamReader reader = File.OpenText("External/credentials.json"))
            {
                string json = await reader.ReadToEndAsync();

                EBotCredentials credentials = JsonConvert.DeserializeObject <EBotCredentials>(json);

                TOKEN_DEV      = credentials.TokenDev;
                TOKEN_MAIN     = credentials.TokenMain;
                TWITCH_URL     = credentials.TwitchURL;
                BOT_ID_MAIN    = credentials.BotIDMain;
                BOT_ID_DEV     = credentials.BotIDDev;
                OWNER_ID       = credentials.OwnerID;
                GOOGLE_API_KEY = credentials.GoogleAPIKey;
            }
        }