/massrole
Add/Remove role(s) from all members of a guild
This endpoint will require a POST request.
Guilds with high member counts are subject to rate limits, response will be delayed based off member count.
Endpoint Headers:
bot-token - Token of the Bot [String] (Required)
apikey - Your Api Auth Key [String] (Required)
guild-id - ID of the guild to be fetched [Snowflake] (Required)
channel-id - ID of the channel to send the final response in [Snowflake] (Optional) (See Status 200 for example!)
Endpoint Body Parameters
add - Role(s) to add to members [Array of Snowflakes] (Optional*)
remove - Role(s) to remove from members [Array of Snowflakes] (Optional*)
At least one role is required in either add or remove.
It is Not Required to have both supplied simultaneously.
Examples:
Data API version required. Must replace <version> with either release or beta.
Bot Designer for Discord
Example usage of /guild/massroll endpoint using BDFD
$httpAddHeader[apikey;<YOUR-API-KEY>]
$httpAddHeader[bot-token;<YOUR-BOT-TOKEN>]
$httpAddHeader[guild-id;1064098700307218463]
$httpAddHeader[channel-id;1064098702001721486] $c[Optional header]
$httpPost[https://bdfddata.rickyjs.xyz/<version>/guild/massrole;{
"add": ["1064410587293028413"],
"remove": ["1065288607352488017"]
}]
$httpResult OR $httpResult[details]Possible Responses (Codes)
Code 200
API succeeded and details were fetched.
If a channel-id was provided, a follow-up response will be sent to that channel when the action has completed.
The message will consist of completion data results like
- Successful role toggles
- Failed role toggles (Could have failed for a number of reasons, usually going to be a permissions or role hierarchy error)
- Amount of time it took to fully complete the request
As stated before, the time the request takes will fluctuate based of the member count and how many rate limits it may hit.

Last updated