internal static CustomSticker Create(BaseDiscordClient client, Model model, ulong guildId, ulong?authorId = null) { var entity = new CustomSticker(client, model.Id, guildId, authorId); entity.Update(model); return(entity); }
/// <summary> /// Resolves this sticker item by fetching the <see cref="Sticker"/> from the API. /// </summary> /// <returns> /// A task representing the download operation, the result of the task is a sticker object. /// </returns> public async Task <Sticker> ResolveStickerAsync() { var model = await Discord.ApiClient.GetStickerAsync(Id); return(model.GuildId.IsSpecified ? CustomSticker.Create(Discord, model, model.GuildId.Value, model.User.IsSpecified ? model.User.Value.Id : null) : Sticker.Create(Discord, model)); }