Table of Contents

Method ModifyStickerAsync

Namespace
DisCatSharp.Entities
Assembly
DisCatSharp.dll

ModifyStickerAsync(ulong, Optional<string>, Optional<string>, Optional<DiscordEmoji>, string?, CancellationToken)

Modifies a sticker

public Task<DiscordSticker> ModifyStickerAsync(ulong sticker, Optional<string> name, Optional<string> description, Optional<DiscordEmoji> emoji, string? reason = null, CancellationToken cancellationToken = default)

Parameters

sticker ulong

The id of the sticker to modify

name Optional<string>

The name of the sticker

description Optional<string>

The description of the sticker

emoji Optional<DiscordEmoji>

The emoji to associate with this sticker.

reason string

Audit log reason

cancellationToken CancellationToken

A token to cancel the request.

Returns

Task<DiscordSticker>

A sticker object

Exceptions

UnauthorizedException

Thrown when the sticker could not be found.

UnauthorizedException

Thrown when the client does not have the ManageGuildExpressions permission.

ServerErrorException

Thrown when Discord is unable to process the request.

ArgumentException

Sticker does not belong to a guild.

ModifyStickerAsync(DiscordSticker, Optional<string>, Optional<string>, Optional<DiscordEmoji>, string?, CancellationToken)

Modifies a sticker

public Task<DiscordSticker> ModifyStickerAsync(DiscordSticker sticker, Optional<string> name, Optional<string> description, Optional<DiscordEmoji> emoji, string? reason = null, CancellationToken cancellationToken = default)

Parameters

sticker DiscordSticker

The sticker to modify

name Optional<string>

The name of the sticker

description Optional<string>

The description of the sticker

emoji Optional<DiscordEmoji>

The emoji to associate with this sticker.

reason string

Audit log reason

cancellationToken CancellationToken

A token to cancel the request.

Returns

Task<DiscordSticker>

A sticker object

Exceptions

UnauthorizedException

Thrown when the sticker could not be found.

UnauthorizedException

Thrown when the client does not have the ManageGuildExpressions permission.

ServerErrorException

Thrown when Discord is unable to process the request.

ArgumentException

Sticker does not belong to a guild.