mirror of
https://github.com/TeamOctolings/Octobot.git
synced 2025-04-19 16:33:36 +03:00
some fixes
This commit is contained in:
parent
6fa189fba9
commit
bef48237a9
2 changed files with 9 additions and 9 deletions
|
@ -148,15 +148,15 @@ public class BanCommand : CommandGroup {
|
|||
Messages.Culture = cfg.Culture;
|
||||
|
||||
var existingBanResult = await _guildApi.GetGuildBanAsync(guildId.Value, target.ID, CancellationToken);
|
||||
if (!existingBanResult.IsDefined()) {
|
||||
return (Result)await _feedbackService.SendContextualEmbedAsync(
|
||||
new Embed(
|
||||
Title: Messages.UserNotBanned,
|
||||
Colour: ColorsList.Red
|
||||
),
|
||||
ct: CancellationToken);
|
||||
}
|
||||
if (!existingBanResult.IsDefined(out _)) {
|
||||
var embed = new EmbedBuilder().WithSmallTitle(Messages.UserNotBanned, currentUser)
|
||||
.WithColour(ColorsList.Red).Build();
|
||||
|
||||
if (!embed.IsDefined(out var alreadyBuilt))
|
||||
return Result.FromError(embed);
|
||||
|
||||
return (Result)await _feedbackService.SendContextualEmbedAsync(alreadyBuilt, ct: CancellationToken);
|
||||
}
|
||||
|
||||
Result<Embed> responseEmbed;
|
||||
|
||||
|
|
|
@ -493,6 +493,6 @@
|
|||
<value>Этот пользователь уже забанен!</value>
|
||||
</data>
|
||||
<data name="UserUnbanned" xml:space="preserve">
|
||||
<value>{0} был(-а) забанен(-а)</value>
|
||||
<value>{0} был(-а) разбанен(-а)</value>
|
||||
</data>
|
||||
</root>
|
||||
|
|
Loading…
Add table
Reference in a new issue