diff --git a/CommandsSlash.cs b/CommandsSlash.cs index def5d80..2465b9b 100644 --- a/CommandsSlash.cs +++ b/CommandsSlash.cs @@ -89,7 +89,7 @@ internal class CommandsSlash : CommandsCommon { private async Task DiscordClient_SlashCommandExecuted(SocketSlashCommand arg) { SocketGuildChannel? rptChannel = arg.Channel as SocketGuildChannel; var rptId = rptChannel?.Guild.Id ?? arg.User.Id; - Program.Log("Command executed", $"/{arg.CommandName} by {arg.User} { (rptChannel != null ? "in guild" : "with ID") } {rptId}"); + Program.Log("Command executed", $"/{arg.CommandName} by {arg.User} in { (rptChannel != null ? "guild" : "DM. User") } ID {rptId}"); CommandResponder responder = arg.Data.Name switch { "help" => CmdHelp, @@ -109,14 +109,7 @@ internal class CommandsSlash : CommandsCommon { } private async Task UnknownCommandHandler(SocketSlashCommand arg) { - string place; - // Unknown command - set up a report - if (arg.Channel is SocketGuildChannel gch) { - place = $"Guild {gch.Guild.Id}"; - } else { - place = "Global command"; - } - Program.Log("Command invoked", $"/{arg.Data.Name} is an unknown command! Executed at: {place}"); + Program.Log("Command invoked", $"/{arg.Data.Name} is an unknown command!"); await arg.RespondAsync("Oops, that command isn't supposed to be there... Please try something else.", ephemeral: true).ConfigureAwait(false); } diff --git a/WorldTime.cs b/WorldTime.cs index b09703b..5fc8eec 100644 --- a/WorldTime.cs +++ b/WorldTime.cs @@ -148,7 +148,7 @@ internal class WorldTime : IDisposable { return Task.CompletedTask; } - private Task DiscordClient_ShardReady(DiscordSocketClient arg) => arg.SetGameAsync(CommandsText.CommandPrefix + "help"); + private Task DiscordClient_ShardReady(DiscordSocketClient arg) => arg.SetGameAsync("/help"); /// /// Non-specific handler for incoming events. diff --git a/WorldTime.csproj b/WorldTime.csproj index dd69993..b9e6c50 100644 --- a/WorldTime.csproj +++ b/WorldTime.csproj @@ -5,15 +5,15 @@ net6.0 enable enable - 2.1.0 + 2.1.1 NoiTheCat - + - +