Skip to content

Commit

Permalink
reeee
Browse files Browse the repository at this point in the history
  • Loading branch information
sylveonnotdeko committed Apr 28, 2024
1 parent 6a7801e commit 8a73d63
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
20 changes: 14 additions & 6 deletions src/Mewdeko/Modules/Administration/LogCommands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -156,14 +156,22 @@ public async Task Log(LogType type)
[Cmd, Aliases, RequireContext(ContextType.Guild), UserPerm(GuildPermission.Administrator), Priority(0)]
public async Task Log(LogType type, ITextChannel? channel = null)

Check warning on line 157 in src/Mewdeko/Modules/Administration/LogCommands.cs

View workflow job for this annotation

GitHub Actions / Qodana for .NET

Method with optional or 'params' parameter is hidden by overload

Method with optional parameter is hidden by overload
{
await Service.SetLogChannel(ctx.Guild.Id, channel?.Id ?? 0, type).ConfigureAwait(false);
if (channel is not null)
try
{
await ConfirmLocalizedAsync("logging_event_enabled", type, channel.Id).ConfigureAwait(false);
return;
await Service.SetLogChannel(ctx.Guild.Id, channel?.Id ?? 0, type).ConfigureAwait(false);
if (channel is not null)
{
await ConfirmLocalizedAsync("logging_event_enabled", type, channel.Id).ConfigureAwait(false);
return;
}

await ConfirmLocalizedAsync("logging_event_disabled", type);
}
catch (Exception e)
{
Serilog.Log.Error(e, "There was an issue setting logs");
await ctx.Channel.SendErrorAsync(GetText("command_fatal_error"), Config);
}

await ConfirmLocalizedAsync("logging_event_disabled", type);
}


Expand Down
1 change: 1 addition & 0 deletions src/Mewdeko/data/strings/responses/responses.en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"ban_by_hash_success": "Banned {0} users by hash {1}",
"ban_by_hash_start": "Banning {0} users by hash {1}...",
"ban_by_hash_fail_all": "Failed to ban {0} users by hash {1}",
"command_fatal_error": "This command had a fatal error. Please notify the bot owner or check your logs if you are selfhosting. If neccesary join the support server below.",
"ban_by_hash_fail_some": "Banned {0} users by hash {1}, but failed to ban {2} users. Most likely due to heirarchy issues.",
"ban_by_hash_none": "No users found with hash {0}",
"ban_by_hash_confirm": "Are you sure you want to ban {0} users by hash {1}?",
Expand Down

0 comments on commit 8a73d63

Please sign in to comment.