Table of Contents

Class CustomSticker

Namespace
Discord.Rest
Assembly
Discord.Net.Rest.dll

Represents a Rest-based custom sticker within a guild.

public class CustomSticker : Sticker, IEntity<ulong>, ICustomSticker, ISticker, IStickerItem
Inheritance
CustomSticker
Implements
Inherited Members

Properties

AuthorId

Gets the users id who uploaded the sticker.

public ulong? AuthorId { get; }

Property Value

ulong?

Remarks

In order to get the author id, the bot needs the MANAGE_EMOJIS_AND_STICKERS permission.

Guild

Gets the guild that this custom sticker is in.

public RestGuild Guild { get; }

Property Value

RestGuild

Remarks

Note: This property can be null if the sticker wasn't fetched from a guild.

Methods

DeleteAsync(RequestOptions)

Deletes the current sticker.

public Task DeleteAsync(RequestOptions options = null)

Parameters

options RequestOptions

The options to be used when sending the request.

Returns

Task

A task that represents the asynchronous deletion operation.

ModifyAsync(Action<StickerProperties>, RequestOptions)

Modifies this sticker.

public Task ModifyAsync(Action<StickerProperties> func, RequestOptions options = null)

Parameters

func Action<StickerProperties>

A delegate containing the properties to modify the sticker with.

options RequestOptions

The options to be used when sending the request.

Returns

Task

A task that represents the asynchronous modification operation.

Examples

The following example replaces the name of the sticker with kekw.

await sticker.ModifyAsync(x => x.Name = "kekw");

Remarks

This method modifies this sticker with the specified properties. To see an example of this method and what properties are available, please refer to StickerProperties.

The bot needs the MANAGE_EMOJIS_AND_STICKERS permission within the guild in order to modify stickers.