How to Redeem Nitro Gifts Automatically With Discord.Py (Self-Bot)

Is there any way to redeem Nitro gifts automatically with discord.py (self-bot)?

Yes, it's very possible and quite easy to do so, as the other people have already mentioned. This can get your account disabled so do it at your own risk.
So, let's get into it;
Making one with python is a stupid idea because most nitro "snipers" have to be fast, since there could always be competition. I recommend getting into node js and making a self-bot with that or a nitrosniper etc. Node JS if by far the fastest if you have a method for client injection, but let's be real. I'll write some python pseudo code for you, it should be quite easy to understand:

import discord
import requests
import json

token = 'token'

client = discord.Client()

@client.event
async def on_ready():
print('Online')

@client.event
async def on_message(message):
if message.content.startwith("discord.gift/" + 13):
"""
make it store the code after the discord.gift/ part, but note most
gifts come in the https://discord.gift/ format, you should either use
regex for this opertaion or just set two variables so if the message
content includes https and discord.gift it stores it as a different
variable.
"""
redeemheaders = {
'Authorization': token, #dont replace this.
'content-type': 'application/json',
'payment_source_id': 'null'
}
r = requests.post('https://ptb.discordapp.com/api/v6/entitlements/gift-codes/'+ codevariable + '/redeem', headers=redeemheaders)
r = r.text.json()
print(r)


client.run(token, bot=False)

Is there a way for a discord bot to check if a discord nitro gift code is valid?

You cant check and if you could you would be breaking discord tos



Related Topics



Leave a reply



Submit