Reputation: 43
But when i try to do ctx.reply("replied")
it is seen by everyone how to do it like the above image?
Upvotes: 0
Views: 1743
Reputation: 59
I suggest you to use pycord
so you can easily create slash command and ephemeral
pip install pycord
pip uninstall discord.py
import discord
from discord.ext import commands
intents = discord.Intents().all()
bot = commands.Bot(intents=intents)
@bot.slash_command()
async def mycommand(ctx):
await ctx.reply("hello i'm an hidded message",ephemeral=True)
bot.run("your bot token")
Upvotes: 0
Reputation: 2917
You can send ephemeral messages only as response to interaction (slash command or component like button or select). If you want to create a slash commands you need to use discord.py forks or extension for it:
Or new APIs for python:
Upvotes: 3