1
0
Fork 1
mirror of https://github.com/TeamOctolings/Octobot.git synced 2025-04-30 02:59:54 +03:00

Minor changes

Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
This commit is contained in:
Octol1ttle 2023-06-10 20:14:02 +05:00
parent bef48237a9
commit 1cd309e498
Signed by: Octol1ttle
GPG key ID: B77C34313AEE1FFF
3 changed files with 6 additions and 7 deletions

View file

@ -19,7 +19,7 @@ using Remora.Results;
namespace Boyfriend.Commands;
public class BanCommand : CommandGroup {
public class BanCommandGroup : CommandGroup {
private readonly IDiscordRestChannelAPI _channelApi;
private readonly ICommandContext _context;
private readonly GuildDataService _dataService;
@ -28,7 +28,7 @@ public class BanCommand : CommandGroup {
private readonly IDiscordRestUserAPI _userApi;
private readonly UtilityService _utility;
public BanCommand(
public BanCommandGroup(
ICommandContext context, IDiscordRestChannelAPI channelApi, GuildDataService dataService,
FeedbackService feedbackService, IDiscordRestGuildAPI guildApi, IDiscordRestUserAPI userApi,
UtilityService utility) {
@ -62,7 +62,7 @@ public class BanCommand : CommandGroup {
Messages.Culture = cfg.Culture;
var existingBanResult = await _guildApi.GetGuildBanAsync(guildId.Value, target.ID, CancellationToken);
if (existingBanResult.IsDefined(out _)) {
if (existingBanResult.IsDefined()) {
var embed = new EmbedBuilder().WithSmallTitle(Messages.UserAlreadyBanned, currentUser)
.WithColour(ColorsList.Red).Build();
@ -148,7 +148,7 @@ public class BanCommand : CommandGroup {
Messages.Culture = cfg.Culture;
var existingBanResult = await _guildApi.GetGuildBanAsync(guildId.Value, target.ID, CancellationToken);
if (!existingBanResult.IsDefined(out _)) {
if (!existingBanResult.IsDefined()) {
var embed = new EmbedBuilder().WithSmallTitle(Messages.UserNotBanned, currentUser)
.WithColour(ColorsList.Red).Build();