Implemented emoji endpoints (#835)

* Implemented emoji endpoints.

* Fixed: now using API entities for REST client.

* Removed emoji listing endpoint, as per @foxbot's request.
This commit is contained in:
Mateusz Brawański
2017-11-20 21:02:42 +01:00
committed by Christopher F
parent cf8de42b62
commit b4bf046ad4
8 changed files with 154 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
using System.Collections.Generic;
namespace Discord
{
public class EmoteProperties
{
public Optional<string> Name { get; set; }
public Optional<IEnumerable<IRole>> Roles { get; set; }
}
}

View File

@@ -117,5 +117,14 @@ namespace Discord
Task DownloadUsersAsync();
/// <summary> Removes all users from this guild if they have not logged on in a provided number of days or, if simulate is true, returns the number of users that would be removed. </summary>
Task<int> PruneUsersAsync(int days = 30, bool simulate = false, RequestOptions options = null);
/// <summary> Gets a specific emote from this guild. </summary>
Task<GuildEmote> GetEmoteAsync(ulong id, RequestOptions options = null);
/// <summary> Creates a new emote in this guild. </summary>
Task<GuildEmote> CreateEmoteAsync(string name, Image image, Optional<IEnumerable<IRole>> roles = default(Optional<IEnumerable<IRole>>), RequestOptions options = null);
/// <summary> Modifies an existing emote in this guild. </summary>
Task<GuildEmote> ModifyEmoteAsync(GuildEmote emote, Action<EmoteProperties> func, RequestOptions options = null);
/// <summary> Deletes an existing emote from this guild. </summary>
Task DeleteEmoteAsync(GuildEmote emote, RequestOptions options = null);
}
}