1
0
Fork 0
mirror of https://github.com/diamondburned/arikawa.git synced 2024-10-02 07:18:49 +00:00

API: replace use of whitelist with more inclusive synonyms

This commit is contained in:
mavolin 2020-11-03 18:13:56 +01:00 committed by diamondburned
parent 0d219428a0
commit 5716c78d97
2 changed files with 11 additions and 10 deletions

View file

@ -35,7 +35,7 @@ type CreateEmojiData struct {
Name string `json:"name"`
// Image is the the 128x128 emoji image.
Image Image `json:"image"`
// Roles are the roles for which this emoji will be whitelisted.
// Roles are the roles that can use the emoji.
Roles *[]discord.RoleID `json:"roles,omitempty"`
}
@ -63,7 +63,7 @@ func (c *Client) CreateEmoji(guildID discord.GuildID, data CreateEmojiData) (*di
type ModifyEmojiData struct {
// Name is the name of the emoji.
Name string `json:"name,omitempty"`
// Roles are the roles to which this emoji will be whitelisted.
// Roles are the roles that can use the emoji.
Roles *[]discord.RoleID `json:"roles,omitempty"`
}

View file

@ -14,15 +14,14 @@ import (
const AttachmentSpoilerPrefix = "SPOILER_"
// AllowedMentions is a whitelist of mentions for a message.
// https://discordapp.com/developers/docs/resources/channel#allowed-mentions-object
// AllowedMentions is a allowlist of mentions for a message.
//
// Whitelists
// Allowlists
//
// Roles and Users are slices that act as whitelists for IDs that are allowed to
// be mentioned. For example, if only 1 ID is provided in Users, then only that
// ID will be parsed in the message. No other IDs will be. The same example also
// applies for roles.
// Roles and Users are slices that act as allowlists for IDs that are allowed
// to be mentioned. For example, if only 1 ID is provided in Users, then only
// that ID will be parsed in the message. No other IDs will be. The same
// example also applies for roles.
//
// If Parse is an empty slice and both Users and Roles are empty slices, then no
// mentions will be parsed.
@ -33,7 +32,9 @@ const AttachmentSpoilerPrefix = "SPOILER_"
// Likewise, if the Roles slice is not empty, then Parse must not have
// AllowRoleMention. This is because everything provided in Parse will make
// Discord parse it completely, meaning they would be mutually exclusive with
// whitelist slices, Roles and Users.
// Roles and Users.
//
// https://discordapp.com/developers/docs/resources/channel#allowed-mentions-object
type AllowedMentions struct {
// Parse is an array of allowed mention types to parse from the content.
Parse []AllowedMentionType `json:"parse"`