#bot isn't sending anything at all

1 messages · Page 1 of 1 (latest)

gray nacelle
#

i am sure this is just some sort of syntax error that i'm glancing over somehow, but my bot isn't sending any messages when i use a command. it does send "Ready!" to my terminal and is active in the server, it just doesn't do anything when i type $test whatever. my actual bot is more complex than this and was working previously so i'm perplexed that the most basic version isn't working now

import discord

from discord.ext import commands
#defines command as $
bot = commands.Bot(command_prefix='$')


#discord bot token
TOKEN = [place where i put the token]

#discord client instance
client = discord.Client()

#when bot boots up, print "Ready!" to the command line
@bot.event
async def on_ready():
        print("Ready!")
  
@bot.command()
async def test(ctx, arg):
    ctx.send(arg)

bot.run(TOKEN)```
vivid hazelBOT
#

As of Pycord Beta 5, Discord API v10 requires message content intent to receive message content. This affects the traditional commands. Not enabling this intent will result in the messages' content, embeds, and components being empty.

You will need to enable the intent on the developer portal, as well as in your code:

intents = discord.Intents.default()
intents.message_content = True
bot = discord.Bot(intents=intents)

Docs: https://docs.pycord.dev/en/master/api.html#discord.Intents.message_content

gray nacelle
#

thank you!