Table of Contents

Class SocketCustomSticker

Namespace
Discord.WebSocket
Assembly
Discord.Net.WebSocket.dll

Represents a custom sticker within a guild received over the gateway.

public class SocketCustomSticker : SocketSticker, IEntity<ulong>, ICustomSticker, ISticker, IStickerItem
Inheritance
SocketCustomSticker
Implements
Inherited Members

Properties

Author

Gets the user that uploaded the guild sticker.

public SocketGuildUser Author { get; }

Property Value

SocketGuildUser

Remarks

note

This may return null in the WebSocket implementation due to incomplete user collection in large guilds, or the bot doesn't have the MANAGE_EMOJIS_AND_STICKERS permission.

AuthorId

public ulong? AuthorId { get; set; }

Property Value

ulong?

Guild

Gets the guild the sticker was created in.

public SocketGuild Guild { get; }

Property Value

SocketGuild

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.