Forum > Coding >

[HELP] How do i get a discord ID with c#?

Posts: 17

Threads: 2

Joined: Feb, 2021

Reputation: 0

Posted

I'm trying to make a blacklist system where, when you first run the application it gets your discord id and puts it in a file and then compares it to a pastebin or something. Now i dont know how to make it get ur discord id. I need some help.

  • 0

yes :nod:

Posts: 1167

Threads: 72

Joined: Oct, 2019

Reputation: 89

Replied

What Your Doing Is Simple But I Won't Spoonfeed And I'm On Phone Also

  • 0

Added

@Astronemi Discord Token Works Its Basically Self Botting Which Is The Issue I'll Write Some Example Code Below

using System.Net;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;

private string UserInfo(string Token) 
{
   using (var Client = new WebClient())
   {
       Client.Headers.Add("Authorization", Token);
       var Json = JsonConvert.DeserializeObject<JToken>(Client.DownloadString("https://discord.com/api/v9/users/@me"); /* Need Newtonsoft.Json Package */
       
       return Json["id"]?.ToString();
   }
}

Actually This Example Code Should Actually Do The Job But Wouldn't Recommend Using Since Considered Self Botting And That Can Get You Banned

I Actually Still Have A Class I Called DiscordManager That Would Do This Exact Purpose But It Also Handled The Rest Such As Retrieving And Validating Tokens Getting And Returning The Content Such As Username, Pfp Hash, Id, And Discrim

  • 0

Added

@draxer Also You Can Literally Just Manually Blacklist People By Copying Their Id By Right Clicking Their Discord Account And Clicking Copy ID

  • 0

Posts: 17

Threads: 2

Joined: Feb, 2021

Reputation: 0

Replied

@ImmuneLion318 Ye, that's how I choose who to blacklist, But how is the program going to know what your id is? 

  • 0

yes :nod:

Posts: 114

Threads: 26

Joined: Dec, 2019

Reputation: 3

Replied

@Laxion

He could have a try statement to grab discord id and if it doesent work just try HWID blacklist

  • 0

Know c# and trying to expand my knowledge in it.

Rep Goal [1,2,3,4,5,6,7,8,9,10]Rickrolled Talan2016 : https://cdn.discordapp.com/attachments/852018376368979974/852033650593497128/unknown.png

Posts: 1658

Threads: 10

Joined: Sep, 2020

Reputation: 59

Replied

@Beastsploits 😐😐😐😐😐😐

Content length must be 10-5000 chars

  • 0

Discord : Doctor Doom#0550

Posts: 114

Threads: 26

Joined: Dec, 2019

Reputation: 3

Replied

@Laxion Yup I understand, Idk I thought It would be more safer I guess since you could just spoof your hwid

  • 0

Know c# and trying to expand my knowledge in it.

Rep Goal [1,2,3,4,5,6,7,8,9,10]Rickrolled Talan2016 : https://cdn.discordapp.com/attachments/852018376368979974/852033650593497128/unknown.png

Users viewing this thread:

( Members: 0, Guests: 1, Total: 1 )