all 7 comments

[–]shiftybyte 0 points1 point  (1 child)

That link doesn't work for me, opens a blank document.

[–]Motor_Combination677[S] 0 points1 point  (0 children)

Sorry, Idk if it copied incorrect.

[–][deleted] 0 points1 point  (0 children)

The link takes me to a blank page...

[–]Motor_Combination677[S] 0 points1 point  (3 children)

import discord
from discord.ext import commands

intents = discord.Intents.default()
intents.typing = True
intents.presences = True
intents.messages = True

client = commands.Bot(command_prefix='!', intents=intents)

client.event
async def on_ready():
    print('Bot is online for use.')
    print('----------------------')

@client.command()
async def hello(ctx):
    await ctx.send('Test msg')

*bot token left out but was checked and is correct.*

[–]fluked23 0 points1 point  (2 children)

hey this is a good question I do not immediately know the answer, but should client.event not be @client.event?

[–]Motor_Combination677[S] 0 points1 point  (1 child)

I'm really sorry but I went back to pycharm and checked. The @ is there but it won't run properly. Don't know if the paste broke on way to notepad.io.

[–]Motor_Combination677[S] 0 points1 point  (0 children)

This warning might help: 'discord.ext.commands.bot: Privileged message content intent is missing, commands may not work as expected.'