Exemplo n.º 1
0
 /// <inheritdoc />
 public Task DeleteEmoteAsync(IGuildEmote emote, RequestOptions options = null)
 => RestGuild.DeleteEmoteAsync(emote.Unabstract(), options);
Exemplo n.º 2
0
 /// <inheritdoc />
 public async Task <IGuildEmote> ModifyEmoteAsync(IGuildEmote emote, Action <EmoteProperties> func, RequestOptions options = null)
 => (await RestGuild.ModifyEmoteAsync(emote.Unabstract(), func, options))
 .Abstract();
Exemplo n.º 3
0
 /// <summary>
 /// Extracts the existing <see cref="GuildEmote"/> from an abstracted <see cref="IGuildEmote"/> value.
 /// </summary>
 /// <param name="guildEmote">The <see cref="IGuildEmote"/> abstraction whose abstracted object is to be extracted.</param>
 /// <exception cref="ArgumentNullException">Throws for <paramref name="guildEmote"/>.</exception>
 /// <returns>The <see cref="GuildEmote"/> being abstracted by <paramref name="guildEmote"/>.</returns>
 internal static GuildEmote Unabstract(this IGuildEmote guildEmote)
 => guildEmote switch
 {
     null
     => throw new ArgumentNullException(nameof(guildEmote)),