Fired on the main thread for every DiSky error that no 'try' block caught: a failed Discord request, a missing permission, a refused builder, an effect used in the wrong event. An error raised inside a 'try' block goes to its 'catch' and never reaches this event. Cancel the event to keep DiSky from printing the error to the console; cancel it before any 'wait' or Discord effect, the console decision is taken as soon as the trigger pauses. 'event-bot' is set when the error comes from a trigger of a DiSky event, and is empty otherwise (a request queued without a trigger behind it does not know its bot), so a 'seen by' filter only matches the errors whose bot is known. An error raised by this event's own trigger is printed and does not fire the event again.
Fetches messages from the history of a channel. 'last X messages of a channel' returns the most recent ones, newest first. 'X messages before a message' returns the ones sent before it, closest (newest) first; 'X messages after a message' the ones sent after it, closest (oldest) first. The reference message itself is never included.
Any amount works: above 100, the history is fetched page by page (one request per 100 messages). Fewer messages come back when the channel does not have that many. The amount must be at least 1.
The bot needs the View Channel and Read Message History permissions. This asks Discord, so it needs 'await'.
Helpful?
expressionlist of Permissionsince 5.0.0-b1
[the] discord permissions of %member/role% in [the][channel]%guildchannel%
The effective permissions of a member or a role in one channel: its guild-wide permissions, with the channel's overrides applied (@everyone first, then the roles, then the member's own override). An administrator, and the guild owner, have every permission everywhere.
In a thread, the overrides of the parent channel apply.
Read-only; change the allowed or denied discord permissions of the channel instead.
Helpful?
expressionlist of Permissionsince 5.0.0-b1
[the] (:allowed|:denied) discord permissions of %member/role% in [the][channel]%guildchannel%
The permissions a channel explicitly allows or denies to one member or role (its permission override). Empty when the channel has no override for it; anything neither allowed nor denied is inherited from the guild-wide permissions.
Add, remove and set change the override on Discord, creating it if needed. Adding to the allowed permissions also takes them out of the denied ones (a permission cannot be both), and the other way around. Removing only clears them from the list you name: removing from the allowed permissions does not deny them, it makes them inherited again. Reset (or delete) removes the whole override, allowed and denied together.
In a thread, the override is the parent channel's: changing it changes the parent channel.
The bot needs the 'manage permissions' permission in the channel (or 'manage roles' guild-wide), and can only allow or deny permissions it has itself. Under 'await' the change waits for Discord.
An emoji from its name, its unicode character or the id of a custom one (an emote). Several texts give several emojis.
Each text is resolved in this order: a custom emoji id or its '<:name:id>' / '<a:name:id>' form, a unicode emoji ('😂'), then a name. With a guild, a name first looks for a custom emoji of that guild (case-insensitive), then for a Discord shortcode ('joy' or ':joy:', skin tones as 'thumbsup_tone2'). Without a guild, the shortcode comes first, then the custom emojis every loaded bot can see.
It reads the cache. With 'await', an id or a name missing from the cache is also looked up on Discord: in the guild when one is given, else among the bot's application emojis.
A text that matches nothing is a readable error and is skipped. Name the guild when two guilds may hold a custom emoji with the same name.
The member a user is in a guild: the same person, with the guild-side data (nickname, roles, join date...). Returns nothing when the user is not in that guild.
It reads the member cache, which depends on the bot's member cache policy. With 'await', a member missing from the cache is fetched from Discord, and a user who is not in the guild is a readable error.
The effective guild-wide permissions of the member: every permission given by its roles and by @everyone, or all of them for the owner and for an administrator. Channel overrides are not included; use the discord permissions of the member in a channel for that.
Read-only: a member gets its permissions from its roles, so change the roles or the role permissions instead.
The guild-wide permissions of the role, the ones set in the role settings of the guild (channel overrides are not included; see the allowed and denied discord permissions in a channel).
Set, add and remove change the role on Discord. Setting it to nothing (or deleting it) leaves the role with no permission at all; reset is not supported, since a role has no default to go back to.
The bot needs the 'manage roles' permission, a role below its own highest role, and every permission it gives: Discord refuses to grant a permission the bot does not have itself.
[a] new emote builder named %string% with [the] image %string/fileupload% in [the][guild]%guild%
Creates an emote builder. The image is an http(s) URL, a local file path or a file upload; it must be a PNG, JPEG, GIF or WEBP of 256 KB at most (a GIF makes an animated emote).
The name is 2 to 32 letters, digits or underscores. The bot needs the Create Expressions permission.
Saves a message attachment to a file on the server, waiting until the download is complete.
A path ending with '/' or '\', or naming an existing folder, is a folder: the file is saved in it under the attachment's file name. Any other path is the file itself. Missing folders are created, and an existing file is overwritten.
A relative path starts from the server's root folder (where the server jar is).
Every embed of the message being built, in display order (10 at most, Discord's limit).
Setting it replaces the embeds the builder already carries, adding appends to them and deleting removes them all. Each embed is snapshotted when it is set or added: editing it afterwards changes nothing. Embeds have no id, so removing a single one is not supported: set the list again.
The list cannot be read back from a builder; read 'embeds of' the sent message instead.
The description of the sticker being built: empty (the default) or 2 to 100 characters.
change modesset
Helpful?
propertylist of Textsince 5.0.0-b1
[the] sticker tags of %stickerbuilder%
%stickerbuilder%'s sticker tags
The tags of the sticker being built: the words or emojis Discord suggests it for. At least one is required, 200 characters at most once joined, and a tag cannot contain a comma.
[a] new sticker builder named %string% with [the] (image|file) %string/fileupload% in [the][guild]%guild%
Creates a sticker builder. The file is an http(s) URL, a local file path or a file upload: a PNG, APNG, GIF or Lottie JSON of 512 KB at most, ideally 320x320 pixels (Lottie stickers are reserved to verified and partnered servers).
The name is 2 to 30 characters. Add at least one tag before building it. The bot needs the Create Expressions permission.