incident-actions
Does discord.js already include the function to enable the incident-actions like "Disable PM for 24h"?
If yes, can some provide me how it works? 🙂
![No description](https://cdn.answeroverflow.com/1219187680886394890/Screenshot_20240318-014812.png)
16 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!yea it's possible
currently discord.js doesn't have a method for those endpoint, you can call
<Client>.rest.put("/guilds/{guildId}/incident-actions", { body });
for now
* Note: the endpoint only available for community-enabled server
trueThanks, so it's like my attached screenshot 😄
i didn't know i can call rest directly, thanks for that!
So if I want to block PM for 24h, it should look like this?
you forgot to close the endpoint string, but yeah, try it and see if it works or not
you're right
I would let this post open, that maybe it can be updated when discord.js has integrated this feature? 🙂
still wrong btw
yeah
I was happy that automod is already documented
but was still a pain to create the commands to create ones 😄
what 😦
this is.. invalid endpoint
do i need to close it after ..-actions?
yeah, and you should just pass
{ body }
as the second paramdamn, thanks 😄
np
like this?