This repository has been archived by the owner on May 7, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 100
/
index.js
54 lines (45 loc) · 1.79 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
//Dependencies
const Discord = require("discord.js-selfbot-v11")
const Request = require("request")
const Chalk = require("chalk")
//Variables
const Self_Args = process.argv.slice(2)
const User = new Discord.Client()
//Main
if(Self_Args.length == 0){
console.log(`node index.js <discord_token>
Example: node index.js MYsEcReTtOkEn`)
process.exit()
}
if (!/(mfa\.[a-z0-9_-]{20,})|([a-z0-9_-]{23,28}\.[a-z0-9_-]{6,7}\.[a-z0-9_-]{27})/i.test(Self_Args[0])) {
console.log(Chalk.red("You provided an invalid Discord token"));
process.exit();
}
User.on("ready", ()=>{
console.log(Chalk.greenBright(`Discord nitro sniper is running.`))
})
User.on("message", (message)=>{
if(message.content.indexOf("discord.gift") != -1 || message.content.indexOf(".com/gift") != -1){
try{
const code = message.content.split("/")[message.content.split("/").length-1]
Request.get(`https://discordapp.com/api/v6/entitlements/gift-codes/${code}/redeem`, {
headers: {
"Authorization": Self_Args[0]
}
}, function(err, res, body){
if(err){
console.log(Chalk.red(`Unable to redeem nitro code:${Chalk.white} ${code}`))
return
}
if(body.indexOf("redeemed already") != -1){
console.log(Chalk.red(`Nitro code:${Chalk.white} ${code} ${Chalk.red}is already redeemed.`))
}else if(body.indexOf("nitro") != -1){
console.log(Chalk.greenBright(`Nitro code:${Chalk.white} ${code} ${Chalk.greenBright}claimed.`))
}else{
console.log(Chalk.red(`Unknown nitro code:${Chalk.white} ${code}.`))
}
})
}catch{}
}
})
User.login(Self_Args[0])