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 91 Answer
Reset to default 2As of v2.0 (Aug 18, 2022) self-bots are no longer supported by discord.py. They are also against Discord's Terms of Service.