[Feature] Text-In-Stage support & missing IVoiceChannel properties (#2610)
* initial commit * add a check for voice/stage channels in `PinAsync` * moar refactoring * Update IStageChannel.cs * forgot about mocked. again.
This commit is contained in:
@@ -212,6 +212,8 @@ namespace Discord.Rest
|
||||
public static async Task PinAsync(IMessage msg, BaseDiscordClient client,
|
||||
RequestOptions options)
|
||||
{
|
||||
if (msg.Channel is IVoiceChannel)
|
||||
throw new NotSupportedException("Pinned messages are not supported in text-in-voice channels.");
|
||||
await client.ApiClient.AddPinAsync(msg.Channel.Id, msg.Id, options).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user