I was wondering wether there is currently a way to acces the Security actions for a Guild via a bot, preferably through discordjs. I did not find any mention in the documentation though. Is there any way to change them?
The reason why I want to access them is to permanently pause DMs on a Guild, instead of just the 24 hour of blocking provided by Discord.
The API for Security Actions has not yet been published on Discord's API docs. You can find the documentation for the endpoint here:
Modifies the incident actions of the guild. Returns a 200 with the Incidents Data object for the guild. Requires the MANAGE_GUILD
permission.
This API has been added to discord.js in PR #10727 and is expected to release in discord.js v15. If you need this feature ASAP, you can install the main
or feat/incident-actions
. Then, you can use Guild.setIncidentActions
and have a cron job push the dmsDisabledUntil
24 hours forward every day.