/// <summary> /// Creates an emoji /// </summary> /// <param name="properties">Options for creating the emoji</param> public DiscordEmoji CreateEmoji(EmojiProperties properties) { return(CreateEmojiAsync(properties).GetAwaiter().GetResult()); }
/// <summary> /// Creates an emoji /// </summary> /// <param name="properties">Options for creating the emoji</param> public Emoji CreateEmoji(EmojiProperties properties) { return(Client.CreateGuildEmoji(Id, properties)); }
public async Task <DiscordEmoji> CreateEmojiAsync(EmojiProperties properties) { return(await Client.CreateEmojiAsync(Id, properties)); }
/// <summary> /// Creates an emoji /// </summary> /// <param name="guildId">ID of the guild</param> /// <param name="properties">Options for creating the emoji</param> /// <returns>The created <see cref="Emoji"/></returns> public static Emoji CreateGuildEmoji(this DiscordClient client, ulong guildId, EmojiProperties properties) { Emoji emoji = client.HttpClient.Post($"/guilds/{guildId}/emojis", JsonConvert.SerializeObject(properties)).Deserialize <Emoji>().SetClient(client); emoji.GuildId = guildId; return(emoji); }
/// <summary> /// Creates an emoji /// </summary> /// <param name="guildId">ID of the guild</param> /// <param name="properties">Options for creating the emoji</param> /// <returns>The created <see cref="DiscordEmoji"/></returns> public static DiscordEmoji CreateEmoji(this DiscordClient client, ulong guildId, EmojiProperties properties) { DiscordEmoji emoji = client.HttpClient.Post($"/guilds/{guildId}/emojis", properties).Deserialize <DiscordEmoji>().SetClient(client); emoji.GuildId = guildId; return(emoji); }
/// <summary> /// Creates an emoji /// </summary> /// <param name="properties">Options for creating the emoji</param> public DiscordEmoji CreateEmoji(EmojiProperties properties) { return(Client.CreateEmoji(Id, properties)); }
public static async Task <DiscordEmoji> CreateEmojiAsync(this DiscordClient client, ulong guildId, EmojiProperties properties) { DiscordEmoji emoji = (await client.HttpClient.PostAsync($"/guilds/{guildId}/emojis", properties)).Deserialize <DiscordEmoji>().SetClient(client); emoji.GuildId = guildId; return(emoji); }
/// <summary> /// Creates an emoji /// </summary> /// <param name="guildId">ID of the guild</param> /// <param name="properties">Options for creating the emoji</param> /// <returns>The created <see cref="DiscordEmoji"/></returns> public static DiscordEmoji CreateEmoji(this DiscordClient client, ulong guildId, EmojiProperties properties) { return(client.CreateEmojiAsync(guildId, properties).GetAwaiter().GetResult()); }