コード例 #1
0
ファイル: Program.cs プロジェクト: ohkriss/Anarchy
        static void Main(string[] args)
        {
            Console.WriteLine("Loading puppeteer...");
            DiscordPuppeteer.Start();

            Console.Write("Guild invite: ");
            Invite = (GuildInvite) new DiscordClient().GetInvite(Console.ReadLine());

            Console.Write("Audio file path: ");
            AudioPath = Console.ReadLine();

            string[] tokens = File.ReadAllLines("Tokens.txt");

            Console.WriteLine($"Logging into {tokens.Length} accounts");

            foreach (var token in tokens)
            {
                var client = new DiscordSocketClient(new DiscordSocketConfig()
                {
                    VoiceChannelConnectTimeout = 5000
                });
                client.OnLoggedIn           += Client_OnLoggedIn;
                client.OnJoinedVoiceChannel += Client_OnJoinedVoiceChannel;
                client.OnLeftVoiceChannel   += Client_OnLeftVoiceChannel;
                client.OnJoinedGuild        += Client_OnJoinedGuild;
                client.Login(token);
            }

            Thread.Sleep(-1);
        }