最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

python - Discord.py selfbot keeps giving me the error - Stack Overflow

programmeradmin4浏览0评论

I'm currently trying to make a discord selfbot using discord.py, but when I ran it once to refer to the one I made before, suddenly the code that was working fine before got an intents error. So I set the intents to default() and ran it again, and even if I put in the correct token, I got an error saying Improper Token. Is this a discord.py version issue? I tried updating pip and discord.py to the latest version, but to no avail.

Translated with Dee** (free version) -- im using a translator rn

this is the code: (ignore the korean)

import discord
import requests
from datetime import datetime
import time
import json
import utils

with open('./settings.json') as f:
    settings = json.load(f)

TOKEN = settings["TOKEN"] #str
URL = settings["URL"] #str
TARGET = settings["TARGET"] #list
PREFIX = settings["PREFIX"] #str

intents = discord.Intents.all()
client = discord.Client(command_prefix=PREFIX, self_bot=True, intents=intents)

@client.event
async def on_ready():
    utils.log(f'{client.user} : 성공적으로 로그인했습니다.', 'success')
    utils.line()
    utils.log('서버 목록', 'info')
    for index, guild in enumerate(client.guilds):
        utils.log(f'{index}번째 서버: {guild.name}', 'info', 3)
    utils.line()

try:
    client.run(TOKEN)
except Exception as e:
    utils.log(f'{e}', 'error')
    utils.line()

I tried upgrading pip and updating discord.py

I'm currently trying to make a discord selfbot using discord.py, but when I ran it once to refer to the one I made before, suddenly the code that was working fine before got an intents error. So I set the intents to default() and ran it again, and even if I put in the correct token, I got an error saying Improper Token. Is this a discord.py version issue? I tried updating pip and discord.py to the latest version, but to no avail.

Translated with Dee** (free version) -- im using a translator rn

this is the code: (ignore the korean)

import discord
import requests
from datetime import datetime
import time
import json
import utils

with open('./settings.json') as f:
    settings = json.load(f)

TOKEN = settings["TOKEN"] #str
URL = settings["URL"] #str
TARGET = settings["TARGET"] #list
PREFIX = settings["PREFIX"] #str

intents = discord.Intents.all()
client = discord.Client(command_prefix=PREFIX, self_bot=True, intents=intents)

@client.event
async def on_ready():
    utils.log(f'{client.user} : 성공적으로 로그인했습니다.', 'success')
    utils.line()
    utils.log('서버 목록', 'info')
    for index, guild in enumerate(client.guilds):
        utils.log(f'{index}번째 서버: {guild.name}', 'info', 3)
    utils.line()

try:
    client.run(TOKEN)
except Exception as e:
    utils.log(f'{e}', 'error')
    utils.line()

I tried upgrading pip and updating discord.py

Share Improve this question asked Jan 18 at 4:25 RUMINRUMIN 9
Add a comment  | 

1 Answer 1

Reset to default 2

As of v2.0 (Aug 18, 2022) self-bots are no longer supported by discord.py. They are also against Discord's Terms of Service.

发布评论

评论列表(0)

  1. 暂无评论