This commit adds GET /channels/{id}/pins to the ApiClient, and adds GetPinnedMessagesAsync to IMessageChannel. This method is only implemented on the REST entities, and the WebSocket entities do not include an override to retrieve pinned messages from cache.
Resolves#159.
The previous bug was that SocketSelfUser did not inherit from ISelfUser, so DiscordSocketClient.GetCurrentUserAsync was not returning a SocketSelfUser, despite the underlying type being that. This caused ModifyStatusAsync to throw the NotSupportedException that existed on the REST SelfUser.
Cached Channels keep a local cache of the members of that channel. This commit adds a synchronus method to access the cached user stores.
It also fixes a bug where the GetUser extension would return an IGroupUser by soft-casting to IGroupUser, which would always return null. ISocketUser does not share an inheritance with IGroupUser, so I now return IUser instead.
Previously, if a user autoloaded commands more than once, commands that were already in the command map would be readded.
If the module list already contains a module with the same type as the module being loaded, it will not load the new instance of this module.
For users importing `Discord.WebSocket.Extensions`, there are now non-async extensions for GetUser.
These methods point to the appropriate method on the respective SocketgChannel.
Instead of implicitly soft-casting IGuild to SocketGuild, I added a method to soft-cast IGuild to SocketGuild, and throw an InvalidOp if it came up null for some reason.
GetUsers was changed from an IEnumerable to an IReadOnlyCollection to allow quick ".Count"-ing on the collection.
For users importing `Discord.WebSocket.Extensions`, there are now non-async extensions for Get(Type)Channel(s) and Get(Current)User(s).
These methods point to the appropriate method or member on SocketGuild.
Resolves#153
This is a breaking change!
With the introduction of Vanity URLs and the shortening of Invite URLs, the API appears to have removed the "xkcdpass" field of the Invite.
Since this functionality was removed from the Discord API and thus obsolete, it has been removed from the Invite models.