/massrole

Add/Remove role(s) from all members of a guild

circle-info

This endpoint will require a POST request.

circle-exclamation

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*)

triangle-exclamation

Examples:

circle-info

Data API version required. Must replace <version> with either release or beta.

chevron-rightBot Designer for Discordhashtag

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]
chevron-rightDiscord.jshashtag

Example usage of /guild/massrole endpoint using Discord.js

Possible Responses (Codes)

chevron-rightCode 200hashtag

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.

chevron-rightCode 400hashtag

An error occurred that stopped execution.

chevron-rightCode 401hashtag

Invalid bot token was provided.

chevron-rightCode 404hashtag

Guild was not found via DAPI

Last updated