- 20 Ocak 2023
- 360
- 109
Merhaba Arkadaşlar,
Bugün Sizlerle "Discord Token Checker" Projemi Tanıtacağım.
Bu Kod Yazılım Destek Kulübünce Onaylandı.
Peki Ne İşe Yarar?
Bu Kod Discord Tokenlerinin Doğru Olup Olmadığını Kontrol Eder. Eğer Doğruysa Sitede Kullanıcının Mini Bir Profilini Oluşturur.
Umarım İşinize Yarar.
Kod:
Kod:
<!DOCTYPE html>
<html>
<head>
<title>Discord Token Checker</title>
<style>body {
font-family: Arial, sans-serif;
}
h1 {
text-align: center;
}
form {
margin: 20px auto;
width: 80%;
max-width: 500px;
display: flex;
flex-direction: column;
}
label {
margin-bottom: 10px;
}
input[type="text"] {
padding: 10px;
border: none;
border-radius: 5px;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
margin-bottom: 20px;
}
button[type="submit"] {
background-color: #7289da;
color: white;
padding: 10px 20px;
border: none;
border-radius: 5px;
cursor: pointer;
transition: all 0.3s ease;
}
button[type="submit"]:hover {
background-color: #546ddb;
}
.result-container {
margin-top: 20px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
text-align: center;
padding: 20px;
border-radius: 10px;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}
.result-container img {
width: 100px;
height: 100px;
object-fit: cover;
border-radius: 50%;
margin-bottom: 10px;
}
.result-container .username {
font-size: 20px;
font-weight: bold;
margin-bottom: 10px;
}
.result-container .discriminator {
font-size: 16px;
color: gray;
margin-bottom: 20px;
}
.result-container .badges {
display: flex;
align-items: center;
justify-content: center;
}
.result-container .badge {
width: 30px;
height: 30px;
margin: 0 5px;
}
#error-message {
color: red;
font-weight: bold;
margin-top: 8px;
}
</style>
</head>
<body>
<h1>Discord Token Checker</h1>
<form id="token-form">
<label for="token-input">Token:</label>
<input type="text" id="token-input" name="token" required />
<button type="submit">Check</button>
</form>
<div id="result"></div>
<script>const form = document.getElementById("token-form");
const result = document.getElementById("result");
form.addEventListener("submit", async (event) => {
event.preventDefault();
const token = event.target.token.value;
try {
const response = await fetch(`https://discord.com/api/v9/users/@me`, {
headers: {
Authorization: token,
},
});
if (!response.ok) {
throw new Error(response.statusText);
}
const data = await response.json();
const avatarUrl = `https://cdn.discordapp.com/avatars/${data.id}/${data.avatar}.png`;
const badges = [
{
name: "Discord Employee",
imageUrl:
"https://discord.com/assets/fc0b01fe10a0b8c602fb0106d8189d9b.png",
},
{
name: "Discord Partner",
imageUrl:
"https://discord.com/assets/0b70f03b912eb410c2dd3ebfaf341851.png",
},
{
name: "HypeSquad Events",
imageUrl:
"https://discord.com/assets/7c68e9eabeda96b4ee70b08f42e8a933.png",
},
{
name: "Bug Hunter Level 1",
imageUrl:
"https://discord.com/assets/df7ba0e55d0cf5f5d438dcc29c8da67b.png",
},
{
name: "House Bravery",
imageUrl:
"https://discord.com/assets/6ea22f772c74f56d6087d2e8aa73d8be.png",
},
{
name: "House Balance",
imageUrl:
"https://discord.com/assets/6ea22f772c74f56d6087d2e8aa73d8be.png",
},
{
name: "House Brilliance",
imageUrl:
"https://discord.com/assets/f5ccbecbbe16dc5fbbe326c06ed3ee3f.png",
},
];
let userBadges = "";
badges.forEach((badge) => {
if (data.public_flags & (1 << badges.indexOf(badge))) {
userBadges += `<img src="${badge.imageUrl}" class="badge" alt="${badge.name}" title="${badge.name}"/>`;
}
});
const html = `
<div class="result-container">
<img src="${avatarUrl}" alt="${data.username}'s avatar"/>
<div class="username">${data.username}</div>
<div class="discriminator">#${data.discriminator}</div>
<div class="badges">${userBadges}</div>
</div>
`;
result.innerHTML = html;
} catch (error) {
result.innerHTML = `<p id="error-message">Token Geçersiz Hata Kodu: ${error.message}</p>`;
}
});
</script>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>Discord Token Checker</title>
<style>body {
font-family: Arial, sans-serif;
}
h1 {
text-align: center;
}
form {
margin: 20px auto;
width: 80%;
max-width: 500px;
display: flex;
flex-direction: column;
}
label {
margin-bottom: 10px;
}
input[type="text"] {
padding: 10px;
border: none;
border-radius: 5px;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
margin-bottom: 20px;
}
button[type="submit"] {
background-color: #7289da;
color: white;
padding: 10px 20px;
border: none;
border-radius: 5px;
cursor: pointer;
transition: all 0.3s ease;
}
button[type="submit"]:hover {
background-color: #546ddb;
}
.result-container {
margin-top: 20px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
text-align: center;
padding: 20px;
border-radius: 10px;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}
.result-container img {
width: 100px;
height: 100px;
object-fit: cover;
border-radius: 50%;
margin-bottom: 10px;
}
.result-container .username {
font-size: 20px;
font-weight: bold;
margin-bottom: 10px;
}
.result-container .discriminator {
font-size: 16px;
color: gray;
margin-bottom: 20px;
}
.result-container .badges {
display: flex;
align-items: center;
justify-content: center;
}
.result-container .badge {
width: 30px;
height: 30px;
margin: 0 5px;
}
#error-message {
color: red;
font-weight: bold;
margin-top: 8px;
}
</style>
</head>
<body>
<h1>Discord Token Checker</h1>
<form id="token-form">
<label for="token-input">Token:</label>
<input type="text" id="token-input" name="token" required />
<button type="submit">Check</button>
</form>
<div id="result"></div>
<script>const form = document.getElementById("token-form");
const result = document.getElementById("result");
form.addEventListener("submit", async (event) => {
event.preventDefault();
const token = event.target.token.value;
try {
const response = await fetch(`https://discord.com/api/v9/users/@me`, {
headers: {
Authorization: token,
},
});
if (!response.ok) {
throw new Error(response.statusText);
}
const data = await response.json();
const avatarUrl = `https://cdn.discordapp.com/avatars/${data.id}/${data.avatar}.png`;
const badges = [
{
name: "Discord Employee",
imageUrl:
"https://discord.com/assets/fc0b01fe10a0b8c602fb0106d8189d9b.png",
},
{
name: "Discord Partner",
imageUrl:
"https://discord.com/assets/0b70f03b912eb410c2dd3ebfaf341851.png",
},
{
name: "HypeSquad Events",
imageUrl:
"https://discord.com/assets/7c68e9eabeda96b4ee70b08f42e8a933.png",
},
{
name: "Bug Hunter Level 1",
imageUrl:
"https://discord.com/assets/df7ba0e55d0cf5f5d438dcc29c8da67b.png",
},
{
name: "House Bravery",
imageUrl:
"https://discord.com/assets/6ea22f772c74f56d6087d2e8aa73d8be.png",
},
{
name: "House Balance",
imageUrl:
"https://discord.com/assets/6ea22f772c74f56d6087d2e8aa73d8be.png",
},
{
name: "House Brilliance",
imageUrl:
"https://discord.com/assets/f5ccbecbbe16dc5fbbe326c06ed3ee3f.png",
},
];
let userBadges = "";
badges.forEach((badge) => {
if (data.public_flags & (1 << badges.indexOf(badge))) {
userBadges += `<img src="${badge.imageUrl}" class="badge" alt="${badge.name}" title="${badge.name}"/>`;
}
});
const html = `
<div class="result-container">
<img src="${avatarUrl}" alt="${data.username}'s avatar"/>
<div class="username">${data.username}</div>
<div class="discriminator">#${data.discriminator}</div>
<div class="badges">${userBadges}</div>
</div>
`;
result.innerHTML = html;
} catch (error) {
result.innerHTML = `<p id="error-message">Token Geçersiz Hata Kodu: ${error.message}</p>`;
}
});
</script>
<footer> <p> Yazılım Destek Kulübü </p> </footer>
</body>
</html>