Class SocketCustomSticker
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
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
Guild
Gets the guild the sticker was created in.
public SocketGuild Guild { get; }
Property Value
Methods
DeleteAsync(RequestOptions)
Deletes the current sticker.
public Task DeleteAsync(RequestOptions options = null)
Parameters
options
RequestOptionsThe 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
RequestOptionsThe 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.