429 Too Many Requests (error code: 0): selfbots are against Discord's terms of service

Why this error No discord.py-self in the replit?

Because… As the error says, selfbots are against Discord’s ToS.

3 Likes

Because you’re on Replit, they check the requests and decline any request that includes ‘Authorization’ or ‘Bearer’ in the headers (which the library uses). This is done to ensure they are not affiliated with those services.

(async() => {
  var Fetched = await (require("node-fetch")("https://discord.com", {
    headers: {
      Authorization: "Test", 
      // This is the reason you get "selfbots are against Discord's terms of service"
      // Bearer: "" 
      // ^ will do the same as 'Authorization'
    },
  }))

  console.log(await Fetched.text()) // selfbots are against Discord's terms of service
})()