-
Hello everyone, I’m wondering if there’s a simple way to have the Discord channel hide all of the commands for a Discord bot? It’d be beneficial if people could still type the commands in the text chat and instruct the bot, but have the actual text of the commands be hidden after they’re posted, like an auto-hide feature. This may not be possible and that’s okay. The bot’s responses can be visible obviously, just trying to hide the commands themselves. Let me know - thank you in advance to anyone that writes in. |
Beta Was this translation helpful? Give feedback.
Replies: 9 comments
-
Hey again, in order to “hide” a message containing a command, that message must be deleted. The Here’s an example of how that’d be done with a certain command. I will include comments in the code:
This method should work assuming the I hope this helps! If you have any questions please don’t hesitate to ask! |
Beta Was this translation helpful? Give feedback.
-
Hey man, thanks again for the help. Would you mind pasting this snippet into my template from our last thread so I can save it into my file for a successful upload? This would help me out a lot if the commands were auto-deleted before the bot response is sent. Happy to give you another “solved” marking on this if you could incorporate the snippet into my template. |
Beta Was this translation helpful? Give feedback.
-
No problem! I added the deletion command to the “/hi” command and also made the fixes that @lee-dohm corrected in this topic. Be aware that the
Hope this works out for you. Once again, this may not work depending on whether or not the |
Beta Was this translation helpful? Give feedback.
-
The code uploads successfully, so nothing wrong there, it doesn’t delete the command though prior to sending the bot response. Is there a work-around for this or are we out of luck? |
Beta Was this translation helpful? Give feedback.
-
It seems that the
Hopefully this will work now! |
Beta Was this translation helpful? Give feedback.
-
Ah, no, the command still remains in the chat, it’s not auto-deleting before the bot responds. Any other ideas? If not, no worries, I really appreciate your hard work. |
Beta Was this translation helpful? Give feedback.
-
In your code where it uses
The documentation is very poor for the |
Beta Was this translation helpful? Give feedback.
-
That worked! Fantastic! Thank you! |
Beta Was this translation helpful? Give feedback.
-
No problem! Glad to hear it worked out! |
Beta Was this translation helpful? Give feedback.
In your code where it uses
bot.deleteMessage(evt.d.id)
, replace it with this:The documentation is very poor for the
discord.io
package since it is no longer being developed.