Remove support for TokenType.User (#958)
* Set usage of TokenType.User as an error rather than a warning. * Remove commented sections and #pragma's Additionally, changes use of ReadMessages to ViewChannel since that Obsolete was also suppressed by the pragma
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
#pragma warning disable CS0618
|
||||
using Discord.Audio;
|
||||
using Discord.Rest;
|
||||
using System;
|
||||
@@ -64,7 +63,7 @@ namespace Discord.WebSocket
|
||||
public Task DownloaderPromise => _downloaderPromise.Task;
|
||||
public IAudioClient AudioClient => _audioClient;
|
||||
public SocketTextChannel DefaultChannel => TextChannels
|
||||
.Where(c => CurrentUser.GetPermissions(c).ReadMessages)
|
||||
.Where(c => CurrentUser.GetPermissions(c).ViewChannel)
|
||||
.OrderBy(c => c.Position)
|
||||
.FirstOrDefault();
|
||||
public SocketVoiceChannel AFKChannel
|
||||
@@ -192,12 +191,9 @@ namespace Discord.WebSocket
|
||||
|
||||
_syncPromise = new TaskCompletionSource<bool>();
|
||||
_downloaderPromise = new TaskCompletionSource<bool>();
|
||||
if (Discord.ApiClient.AuthTokenType != TokenType.User)
|
||||
{
|
||||
var _ = _syncPromise.TrySetResultAsync(true);
|
||||
/*if (!model.Large)
|
||||
_ = _downloaderPromise.TrySetResultAsync(true);*/
|
||||
}
|
||||
var _ = _syncPromise.TrySetResultAsync(true);
|
||||
/*if (!model.Large)
|
||||
_ = _downloaderPromise.TrySetResultAsync(true);*/
|
||||
}
|
||||
internal void Update(ClientState state, Model model)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user