最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - How to send a message without replying to a slash-command? - Stack Overflow

programmeradmin5浏览0评论

I'm having trouble finding a way to hide the mand message above a bot's "interaction.reply()" message. I just want the message to be public (not ephemeral), without it being a reply to a mand or getting an error message. Thank you in advance.

I'm having trouble finding a way to hide the mand message above a bot's "interaction.reply()" message. I just want the message to be public (not ephemeral), without it being a reply to a mand or getting an error message. Thank you in advance.

Share Improve this question edited Nov 28, 2021 at 6:54 BlockNoir asked Nov 27, 2021 at 0:03 BlockNoirBlockNoir 1111 silver badge6 bronze badges 5
  • What do you mean by mand message? Can you elaborate? – skara9 Commented Nov 27, 2021 at 0:08
  • Have you tried interaction.channel.send() – Elitezen Commented Nov 27, 2021 at 1:09
  • @Elitezen Yes that kinda works, but I get an error message saying: "This interaction failed". – BlockNoir Commented Nov 27, 2021 at 8:21
  • The interaction must be replied to, else that will happen – Elitezen Commented Nov 27, 2021 at 12:59
  • Then is there anyway to hide it? – BlockNoir Commented Nov 27, 2021 at 13:45
Add a ment  | 

2 Answers 2

Reset to default 5

My problem has been resolved with this:

interaction.deferReply();
interaction.deleteReply();
interaction.channel.send("dummy message");

I really don't understand what you meant by that but this might be what you were looking for

You need to reply then delete it

interaction.reply({ content: 'dummy message', fetchReply: true })
  .then((message) => message.delete())
  .catch(console.error);
发布评论

评论列表(0)

  1. 暂无评论