Intent code problem

Hello, i am having a problem with this type of error, and i cannot figure out why it wasnt working. Its completely working on the other replit project, but in here it wasnt. I copied everything on that project, but why? whats the issue?

Hi @OreoNM!

Is it possible we could see your full code and possibly a link to your Repl?

(If your bot’s token is stored openly, I would highly recommend quickly switching to the usage of environment variables or your token could be stolen by malicious users.)

1 Like

Like @bobastley said, we’d need your your full code or the link to your Repl to help you better, but I believe this works?:

import discord

bot = commands.Bot(command_prefix=prefix, intents=discord.Intents.default())

Edit your question and use the Preformatted Text (</>) to include all of your code inside of it. Also, what @QwertyQwerty88 said should fix your problem.


Packages that are used in the replit
discord, discord webhook, flask, numpy, colorama, urllib3, replit

This is a self bot only for educational purposes, and i know that this is again’st the discord TOS. But please help me to fix this messed up code.

**Here's the full code**:

import discord
from discord.ext import commands
import colorama
from colorama import Fore
import asyncio
from webserver import keep_alive
from discord_webhook import DiscordEmbed, DiscordWebhook
import os


prefix = ">"

# use .env feature to hide your token

token = os.getenv("Token")

pslink = os.getenv("Link")

bot = commands.Bot(command_prefix=prefix,

async def start(ctx):
  await ctx.message.delete()
  global dmcs
  dmcs = True
  while dmcs:
    async with ctx.typing():
      await asyncio.sleep(10)
      await ctx.send(pslink)
      print(f"{Fore.RED}Sent a link!")
      webhook = DiscordWebhook(url="")

      embed = DiscordEmbed(
    title="Notification!", description="The private server link has been delivered!", color="03b2f8"
      embed.set_footer(text="Executed by <@test>")
      response = webhook.execute()
      await asyncio.sleep(300)

async def stop(ctx):
  await ctx.message.delete()
  await ctx.send('Has been disabled!')
  global dmcs
  dmcs = False
async def on_ready():
  activity = discord.Game(name="Test's Running..", type=4)
  await bot.change_presence(, activity=activity)
  print(f'''{Fore.GREEN}Test Is Prepared!'''), bot=False)

Use this:

It will generate this → ``` automatically, just put your code inside.

Its now edited, try to backread it again, hehe.

Great Job!

As I said before, what Qwerty said should fix your problem.

Could you send me the fixed version of it so i can just plug it in on my replit?

You just have to change


prefix = ">"


bot = commands.Bot(command_prefix=">", intents=discord.Intents.all())

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.