Summary
The following code works in 4.4.6, but I get "application is not responding" when trying it with 4.4.7 and 4.4.8. Using NuGet in Visual Studio.
DiscordClient? client = Discord.GetInstance();
Discord.Commands = client.UseSlashCommands();
foreach (KeyValuePair<ulong, DiscordServerConfig> serverCfg in config.GetDiscordServers()) {
InternalRegisterCommands(config, serverCfg.Value, Discord.Commands);
}
part of InternalRegisterCommands:
commands.RegisterCommands<TestCommands>(server.id);
test command:
public class TestCommands : ApplicationCommandModule {
// command: /ping
[SlashCommand("ping", "Sends a response in chat.")]
[SlashRequirePermissions(Permissions.Administrator)]
public async Task PingCommand(InteractionContext context) {
// create message response
await Response.ReplyToUser(context, "Pong! :ping_pong:");
}
}
What version of the library are you using?
v4.4.6 (Stable)
What .NET version are you using? Make sure to use the latest patch release for your major version.
.NET 8.0
Operating System
Ubuntu 22.04.3 LTS Jammy (arch64/arm)
Reproduction Steps
- create test slashcommand on 4.4.6
- add
[SlashRequirePermissions(Permissions.Administrator)] to it
- test if it works
- change version to 4.4.7 or 4.4.8
- test if it works again
Trace Logs
No response
Exceptions or other error messages
No response
Anything else you'd like to share
No response
Summary
The following code works in 4.4.6, but I get "application is not responding" when trying it with 4.4.7 and 4.4.8. Using NuGet in Visual Studio.
part of
InternalRegisterCommands:test command:
What version of the library are you using?
v4.4.6 (Stable)
What .NET version are you using? Make sure to use the latest patch release for your major version.
.NET 8.0
Operating System
Ubuntu 22.04.3 LTS Jammy (arch64/arm)
Reproduction Steps
[SlashRequirePermissions(Permissions.Administrator)]to itTrace Logs
No response
Exceptions or other error messages
No response
Anything else you'd like to share
No response