Interface ICustomSticker
Represents a custom sticker within a guild.
Inherited Members
Namespace: Discord
Assembly: Discord.Net.Core.dll
Syntax
public interface ICustomSticker : ISticker, IStickerItem
Properties
| Improve this Doc View SourceAuthorId
Gets the users id who uploaded the sticker.
Declaration
ulong? AuthorId { get; }
Property Value
Type | Description |
---|---|
Nullable<UInt64> |
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.
Declaration
IGuild Guild { get; }
Property Value
Type | Description |
---|---|
IGuild |
Methods
| Improve this Doc View SourceDeleteAsync(RequestOptions)
Deletes the current sticker.
Declaration
Task DeleteAsync(RequestOptions options = null)
Parameters
Type | Name | Description |
---|---|---|
RequestOptions | options | The options to be used when sending the request. |
Returns
Type | Description |
---|---|
Task | A task that represents the asynchronous deletion operation. |
ModifyAsync(Action<StickerProperties>, RequestOptions)
Modifies this sticker.
Declaration
Task ModifyAsync(Action<StickerProperties> func, RequestOptions options = null)
Parameters
Type | Name | Description |
---|---|---|
Action<StickerProperties> | func | A delegate containing the properties to modify the sticker with. |
RequestOptions | options | The options to be used when sending the request. |
Returns
Type | Description |
---|---|
Task | A task that represents the asynchronous modification operation. |
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.
Examples
The following example replaces the name of the sticker with kekw
.
await sticker.ModifyAsync(x => x.Name = "kekw");