mirror of
https://github.com/TeamOctolings/Octobot.git
synced 2025-04-30 11:09:54 +03:00
Make LogAction return void (#261)
1) the method isn't actually async lulw 2) it always returns success, so might as well just be void reduces complexity by a bit Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
This commit is contained in:
parent
58bd439aa7
commit
d39303560d
6 changed files with 12 additions and 39 deletions
|
@ -196,12 +196,8 @@ public class BanCommandGroup : CommandGroup
|
|||
title, target)
|
||||
.WithColour(ColorsList.Green).Build();
|
||||
|
||||
var logResult = _utility.LogActionAsync(
|
||||
_utility.LogAction(
|
||||
data.Settings, channelId, executor, title, description, target, ColorsList.Red, ct: ct);
|
||||
if (!logResult.IsSuccess)
|
||||
{
|
||||
return Result.FromError(logResult.Error);
|
||||
}
|
||||
|
||||
return await _feedback.SendContextualEmbedResultAsync(embed, ct: ct);
|
||||
}
|
||||
|
@ -287,12 +283,9 @@ public class BanCommandGroup : CommandGroup
|
|||
|
||||
var title = string.Format(Messages.UserUnbanned, target.GetTag());
|
||||
var description = new StringBuilder().AppendBulletPoint(string.Format(Messages.DescriptionActionReason, reason));
|
||||
var logResult = _utility.LogActionAsync(
|
||||
|
||||
_utility.LogAction(
|
||||
data.Settings, channelId, executor, title, description.ToString(), target, ColorsList.Green, ct: ct);
|
||||
if (!logResult.IsSuccess)
|
||||
{
|
||||
return Result.FromError(logResult.Error);
|
||||
}
|
||||
|
||||
return await _feedback.SendContextualEmbedResultAsync(embed, ct: ct);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue