mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-11 01:38:27 -04:00
dev: fixed build warnings
This commit is contained in:
@@ -8,8 +8,6 @@ public class GrpcApiService : INService, IReadyExecutor
|
||||
{
|
||||
private Server? _app;
|
||||
|
||||
private static readonly bool _isEnabled = true;
|
||||
|
||||
private readonly DiscordSocketClient _client;
|
||||
private readonly OtherSvc _other;
|
||||
private readonly ExprsSvc _exprs;
|
||||
@@ -30,11 +28,11 @@ public class GrpcApiService : INService, IReadyExecutor
|
||||
_creds = creds;
|
||||
}
|
||||
|
||||
public async Task OnReadyAsync()
|
||||
public Task OnReadyAsync()
|
||||
{
|
||||
var creds = _creds.GetCreds();
|
||||
if (creds.GrpcApi is null || creds.GrpcApi.Enabled)
|
||||
return;
|
||||
return Task.CompletedTask;
|
||||
|
||||
try
|
||||
{
|
||||
@@ -65,5 +63,7 @@ public class GrpcApiService : INService, IReadyExecutor
|
||||
{
|
||||
_app?.ShutdownAsync().GetAwaiter().GetResult();
|
||||
}
|
||||
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
}
|
@@ -14,6 +14,7 @@ public class DownloadTracker : INService
|
||||
public async Task EnsureUsersDownloadedAsync(IGuild guild)
|
||||
{
|
||||
#if GLOBAL_NADEKO
|
||||
await Task.CompletedTask;
|
||||
return;
|
||||
#endif
|
||||
await _downloadUsersSemaphore.WaitAsync();
|
||||
|
@@ -70,9 +70,10 @@ public sealed partial class ReplacementPatternStore
|
||||
Register("%user.id%", static (IUser user) => user.Id.ToString());
|
||||
Register("%user.created_time%", static (IUser user) => user.CreatedAt.ToString("HH:mm"));
|
||||
Register("%user.created_date%", static (IUser user) => user.CreatedAt.ToString("dd.MM.yyyy"));
|
||||
Register("%user.joined_time%", static (IGuildUser user) => user.JoinedAt?.ToString("HH:mm"));
|
||||
Register("%user.joined_date%", static (IGuildUser user) => user.JoinedAt?.ToString("dd.MM.yyyy"));
|
||||
|
||||
Register("%user.joined_time%", static (IGuildUser user) => user.JoinedAt?.ToString("HH:mm") ?? "??:??");
|
||||
Register("%user.joined_date%",
|
||||
static (IGuildUser user) => user.JoinedAt?.ToString("dd.MM.yyyy") ?? "??.??.????");
|
||||
|
||||
Register("%user%",
|
||||
static (IUser[] users) => string.Join(" ", users.Select(user => user.Mention)));
|
||||
Register("%user.mention%",
|
||||
|
@@ -8,7 +8,6 @@ namespace NadekoBot.Services;
|
||||
public class YtdlOperation
|
||||
{
|
||||
private readonly string _baseArgString;
|
||||
private readonly bool _isYtDlp;
|
||||
|
||||
public YtdlOperation(string baseArgString)
|
||||
{
|
||||
|
Reference in New Issue
Block a user