mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-11 09:48:26 -04:00
Changed all == null to is null and all !(* == null) to * is not null
This commit is contained in:
@@ -64,7 +64,7 @@ namespace NadekoBot.Modules.Music.Resolvers
|
||||
yield break;
|
||||
|
||||
var firstData = await ResolveByQueryAsync(firstFile);
|
||||
if (!(firstData is null))
|
||||
if (firstData is not null)
|
||||
yield return firstData;
|
||||
|
||||
var fileChunks = files.Skip(1).Chunk(10);
|
||||
|
@@ -81,7 +81,7 @@ namespace NadekoBot.Modules.Music.Resolvers
|
||||
public async Task<ITrackInfo?> ResolveByQueryAsync(string query)
|
||||
{
|
||||
var cached = await _trackCacher.GetCachedDataByQueryAsync(query, MusicPlatform.SoundCloud);
|
||||
if (!(cached is null))
|
||||
if (cached is not null)
|
||||
return CachableDataToTrackInfo(cached);
|
||||
|
||||
var svideo = !IsSoundCloudLink(query)
|
||||
|
@@ -199,7 +199,7 @@
|
||||
// //Log.Information("Buffered. Getting audio client...");
|
||||
// var ac = await GetAudioClient().ConfigureAwait(false);
|
||||
// Log.Information("Got Audio client");
|
||||
// if (ac == null)
|
||||
// if (ac is null)
|
||||
// {
|
||||
// Log.Information("Can't join");
|
||||
// await Task.Delay(900, cancelToken).ConfigureAwait(false);
|
||||
@@ -371,7 +371,7 @@
|
||||
//
|
||||
// private async Task<IAudioClient> GetAudioClient(bool reconnect = false)
|
||||
// {
|
||||
// if (_audioClient == null ||
|
||||
// if (_audioClient is null ||
|
||||
// _audioClient.ConnectionState != ConnectionState.Connected ||
|
||||
// reconnect ||
|
||||
// newVoiceChannel)
|
||||
@@ -529,7 +529,7 @@
|
||||
// {
|
||||
// lock (locker)
|
||||
// {
|
||||
// if (PauseTaskSource == null)
|
||||
// if (PauseTaskSource is null)
|
||||
// PauseTaskSource = new TaskCompletionSource<bool>();
|
||||
// else
|
||||
// {
|
||||
|
@@ -86,7 +86,7 @@
|
||||
// if (MaxQueueSize != 0 && Songs.Count >= MaxQueueSize)
|
||||
// throw new QueueFullException();
|
||||
// var curSong = Current.Song;
|
||||
// if (curSong == null)
|
||||
// if (curSong is null)
|
||||
// {
|
||||
// Songs.AddLast(song);
|
||||
// return Songs.Count;
|
||||
|
Reference in New Issue
Block a user