I want to set-up a command where the person can type /say hello and the bot will respond with a message but this isn’t working?
@sayhi.tree.command(name="chicken hello")
async def sayhi(interaction: discord.Interaction):
await interaction.response.send_message(f'Hi {interaction.user.mention}! Would you like a drink?', ephemeral=True)
It has a problem with the fact I’ve got a space between “chicken” and “hello” but I don’t want just “chicken” because I’d like to create other responses it could do like /chicken goodbye
I’m not sure if this is related, but Discord commands cannot have spaces in them, so instead, your code snippet would be:
@sayhi.tree.command(name="chicken-hello")
async def sayhi(interaction: discord.Interaction):
await interaction.response.send_message(f'Hi {interaction.user.mention}! Would you like a drink?', ephemeral=True)