Skip to content

bot not responding to commands #9321

Answered by Midnight145
Kohlla asked this question in Q&A
Discussion options

You must be logged in to vote
import discord
from discord.ext import commands

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

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

@client.event
async def on_ready():
await client.change_presence(status=discord.Status.online, activity=discord.Game('testing'))
print('Bot is ready.')

@client.command()
async def hi(ctx):
await ctx.send('Hello!')

client.run('token')

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
2 replies
@Kohlla
Comment options

@j2nx
Comment options

Comment options

You must be logged in to vote
1 reply
@Kohlla
Comment options

Answer selected by Kohlla
Comment options

You must be logged in to vote
1 reply
@Kohlla
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants