有没有什么办法可以用 discord.py(self-bot)自动兑换 Nitro 礼物?
Is there any way to redeem Nitro gifts automatically with discord.py (self-bot)?
我需要知道如何自动领取 Discord Nitro。
import discord
token = 'mytoken'
client = discord.Client()
@client.event
async def on_ready():
print("Logged In!")
@client.event
async def on_message(message):
if message.content.startwith("discord.gift/" + 13):
#example to claim if there are option
else:
print("Invalid Code!")
client.run(token, bot=False)
有知道的请帮帮我
这不是 Discord 的 API 公开的内容。
此外,user accounts are forbidden now 上的自助机器人可能会导致您的帐户被终止,尤其是出于此类目的。
是的,正如其他人已经提到的那样,这样做非常有可能也很容易。这可能会导致您的帐户被禁用,因此请您自担风险。
那么,让我们开始吧;
用 python 制作一个是一个愚蠢的想法,因为大多数硝基 "snipers" 必须很快,因为总是存在竞争。我建议进入 node js 并用它或 nitrosniper 等制作一个自我机器人。如果你有客户端注入的方法,Node JS 是迄今为止最快的,但让我们成为现实。我给你写一些python伪代码,应该很容易理解:
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)
我需要知道如何自动领取 Discord Nitro。
import discord
token = 'mytoken'
client = discord.Client()
@client.event
async def on_ready():
print("Logged In!")
@client.event
async def on_message(message):
if message.content.startwith("discord.gift/" + 13):
#example to claim if there are option
else:
print("Invalid Code!")
client.run(token, bot=False)
有知道的请帮帮我
这不是 Discord 的 API 公开的内容。
此外,user accounts are forbidden now 上的自助机器人可能会导致您的帐户被终止,尤其是出于此类目的。
是的,正如其他人已经提到的那样,这样做非常有可能也很容易。这可能会导致您的帐户被禁用,因此请您自担风险。 那么,让我们开始吧; 用 python 制作一个是一个愚蠢的想法,因为大多数硝基 "snipers" 必须很快,因为总是存在竞争。我建议进入 node js 并用它或 nitrosniper 等制作一个自我机器人。如果你有客户端注入的方法,Node JS 是迄今为止最快的,但让我们成为现实。我给你写一些python伪代码,应该很容易理解:
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)