© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•2y ago•
3 replies
Wagi

✅ GetGlobalApplicationCommandsAsync exception

The code in question
IReadOnlyCollection<SocketApplicationCommand> commands = await this.m_Discord.GetClient().GetGlobalApplicationCommandsAsync();
foreach (SocketApplicationCommand command in commands)
{
    await command.DeleteAsync();
}
IReadOnlyCollection<SocketApplicationCommand> commands = await this.m_Discord.GetClient().GetGlobalApplicationCommandsAsync();
foreach (SocketApplicationCommand command in commands)
{
    await command.DeleteAsync();
}

See picture for the error.

What am I doing wrong ?
image.png
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

✅ Exception handling..
C#CC# / help
17mo ago
✅ Exception handling
C#CC# / help
17mo ago
Uncaught exception
C#CC# / help
2y ago
Array exception
C#CC# / help
3y ago