mirror of
https://github.com/TeamOctolings/Octobot.git
synced 2025-04-20 00:43: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;
|
Messages.Culture = cfg.Culture;
|
||||||
|
|
||||||
var existingBanResult = await _guildApi.GetGuildBanAsync(guildId.Value, target.ID, CancellationToken);
|
var existingBanResult = await _guildApi.GetGuildBanAsync(guildId.Value, target.ID, CancellationToken);
|
||||||
if (!existingBanResult.IsDefined()) {
|
if (!existingBanResult.IsDefined(out _)) {
|
||||||
return (Result)await _feedbackService.SendContextualEmbedAsync(
|
var embed = new EmbedBuilder().WithSmallTitle(Messages.UserNotBanned, currentUser)
|
||||||
new Embed(
|
.WithColour(ColorsList.Red).Build();
|
||||||
Title: Messages.UserNotBanned,
|
|
||||||
Colour: ColorsList.Red
|
|
||||||
),
|
|
||||||
ct: CancellationToken);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
if (!embed.IsDefined(out var alreadyBuilt))
|
||||||
|
return Result.FromError(embed);
|
||||||
|
|
||||||
|
return (Result)await _feedbackService.SendContextualEmbedAsync(alreadyBuilt, ct: CancellationToken);
|
||||||
|
}
|
||||||
|
|
||||||
Result<Embed> responseEmbed;
|
Result<Embed> responseEmbed;
|
||||||
|
|
||||||
|
|
|
@ -493,6 +493,6 @@
|
||||||
<value>Этот пользователь уже забанен!</value>
|
<value>Этот пользователь уже забанен!</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="UserUnbanned" xml:space="preserve">
|
<data name="UserUnbanned" xml:space="preserve">
|
||||||
<value>{0} был(-а) забанен(-а)</value>
|
<value>{0} был(-а) разбанен(-а)</value>
|
||||||
</data>
|
</data>
|
||||||
</root>
|
</root>
|
||||||
|
|
Loading…
Add table
Reference in a new issue