mirror of
https://github.com/TeamOctolings/Octobot.git
synced 2025-04-19 16:33:36 +03:00
Minor changes
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
This commit is contained in:
parent
bef48237a9
commit
1cd309e498
3 changed files with 6 additions and 7 deletions
|
@ -31,7 +31,7 @@ public class Boyfriend {
|
|||
var services = host.Services;
|
||||
|
||||
var slashService = services.GetRequiredService<SlashService>();
|
||||
_ = await slashService.UpdateSlashCommandsAsync();
|
||||
await slashService.UpdateSlashCommandsAsync();
|
||||
|
||||
await host.RunAsync();
|
||||
}
|
||||
|
@ -75,7 +75,7 @@ public class Boyfriend {
|
|||
.AddSingleton<GuildDataService>()
|
||||
.AddSingleton<UtilityService>()
|
||||
.AddCommandTree()
|
||||
.WithCommandGroup<BanCommand>();
|
||||
.WithCommandGroup<BanCommandGroup>();
|
||||
var responderTypes = typeof(Boyfriend).Assembly
|
||||
.GetExportedTypes()
|
||||
.Where(t => t.IsResponder());
|
||||
|
|
|
@ -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();
|
||||
|
|
@ -14,7 +14,6 @@ public class GuildConfiguration {
|
|||
{ "mctaylors-ru", new CultureInfo("tt-RU") }
|
||||
};
|
||||
|
||||
public string Prefix { get; set; } = "!";
|
||||
public string Language { get; set; } = "en";
|
||||
public string WelcomeMessage { get; set; } = "default";
|
||||
public bool ReceiveStartupMessages { get; set; }
|
||||
|
|
Loading…
Add table
Reference in a new issue