forked from TeamInklings/Octobot
Fix inspection warnings (#208)
Signed-off-by: neroduckale <100025711+neroduckale@users.noreply.github.com>
This commit is contained in:
parent
4c50bdaff7
commit
bcd1db8c8e
6 changed files with 22 additions and 25 deletions
|
@ -39,7 +39,7 @@ public sealed class GuildDataService : IHostedService
|
|||
SaveAsync(CancellationToken.None).GetAwaiter().GetResult();
|
||||
}
|
||||
|
||||
public async Task SaveAsync(CancellationToken ct)
|
||||
public Task SaveAsync(CancellationToken ct)
|
||||
{
|
||||
var tasks = new List<Task>();
|
||||
var datas = _datas.Values.ToArray();
|
||||
|
@ -53,7 +53,7 @@ public sealed class GuildDataService : IHostedService
|
|||
SerializeObjectSafelyAsync(memberData, $"{data.MemberDataPath}/{memberData.Id}.json", ct)));
|
||||
}
|
||||
|
||||
await Task.WhenAll(tasks);
|
||||
return Task.WhenAll(tasks);
|
||||
}
|
||||
|
||||
private static async Task SerializeObjectSafelyAsync<T>(T obj, string path, CancellationToken ct)
|
||||
|
|
|
@ -26,10 +26,7 @@ public sealed class SongUpdateService : BackgroundService
|
|||
("Squid Sisters", "Ink Me Up", new TimeSpan(0, 2, 13))
|
||||
};
|
||||
|
||||
private readonly List<Activity> _activityList = new(1)
|
||||
{
|
||||
new Activity("with Remora.Discord", ActivityType.Game)
|
||||
};
|
||||
private readonly List<Activity> _activityList = [new Activity("with Remora.Discord", ActivityType.Game)];
|
||||
|
||||
private readonly DiscordGatewayClient _client;
|
||||
private readonly GuildDataService _guildData;
|
||||
|
|
Reference in a new issue