Beispiel #1
0
        static void Main(string[] args)
        {
            Console.BackgroundColor = Color.FromArgb(14, 14, 14);
            Console.Clear();
            Watermark();
settoken:
            if (args.Length == 0)
            {
                Console.Write("Token: ");
                token = Console.ReadLine();
            }
            else
            {
                token = args[0];
            }


            client.OnLoggedIn += Client_OnLoggedIn;
            client.CreateCommandHandler("z!");
            try
            {
                client.Login(token);
            }
            catch
            {
                Console.WriteLine("invalid token", Color.Red);
                goto settoken;
            }
            Console.ReadLine();
            Console.ReadLine();
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            DiscordSocketClient client = new DiscordSocketClient();

            client.OnLoggedIn += on_login;

            client.CreateCommandHandler("!");

            client.Login("");

            Thread.Sleep(-1);
        }
Beispiel #3
0
        static void Main(string[] args)
        {
            Console.Write("Token: ");
            string token = Console.ReadLine();

            DiscordSocketClient client = new DiscordSocketClient();

            client.OnLoggedIn += Client_OnLoggedIn;
            client.CreateCommandHandler(";");
            client.Login(token);

            Thread.Sleep(-1);
        }
Beispiel #4
0
        static void Main(string[] args)
        {
            DiscordSocketClient client = new DiscordSocketClient(new DiscordSocketConfig()
            {
                Intents = DiscordGatewayIntent.Guilds | DiscordGatewayIntent.GuildMessages | DiscordGatewayIntent.GuildVoiceStates
            });

            client.OnLoggedIn += Client_OnLoggedIn;
            client.CreateCommandHandler(";");

            Console.Write("Token: ");
            client.Login(Console.ReadLine());

            Thread.Sleep(-1);
        }
Beispiel #5
0
        static void Main(string[] args)
        {
            Sessions = new Dictionary <ulong, MusicSession>();

            Console.Write("Token: ");
            string token = Console.ReadLine();

            DiscordSocketClient client = new DiscordSocketClient();

            client.CreateCommandHandler("m;");
            client.OnLoggedIn += Client_OnLoggedIn;
            client.Login(token);

            Thread.Sleep(-1);
        }
Beispiel #6
0
        static void Main(string[] args)
        {
            Console.Write("Token: ");
            string token = Console.ReadLine();

            DiscordSocketClient client = new DiscordSocketClient(new DiscordSocketConfig()
            {
                VoiceChannelConnectTimeout = 5000, Intents = DiscordGatewayIntent.Guilds | DiscordGatewayIntent.GuildMessages | DiscordGatewayIntent.GuildVoiceStates
            });

            client.CreateCommandHandler(";");
            client.OnLoggedIn           += Client_OnLoggedIn;
            client.OnJoinedVoiceChannel += Client_OnJoinedVoiceChannel;
            client.Login(token);

            Thread.Sleep(-1);
        }
Beispiel #7
0
 private void ConnectToAccount_DoWork(object sender, DoWorkEventArgs e)
 {
     CheckForIllegalCrossThreadCalls = false;
     try
     {
         // Attempts to create a command handler (usually never fails)
         client.CreateCommandHandler(prefix);
         //  Logs to the listbox that its trying to connect to the token
         log("Trying To Connect To The Provided Token");
         client.Login(token);
         // Logs that it connects hence the Try statement, if it fails it will log "Invalid Token"
         log("Connected To Provided Token");
         // Gets the user avatar and sets the picture box in the form as the user avatar
         user_avatar.Load(client.User.Avatar.Url);
         // The rest are pretty self explanatory
         user_name.Text   = client.User.Username;
         user_date.Text   = client.User.CreatedAt.ToString("dd:MM:yyyy");
         user_status.Text = "Connected";
     }
     catch
     {
         log("Invalid Token");
     }
 }