C
C#9mo ago
Wagi

✅ GetGlobalApplicationCommandsAsync exception

The code in question
c#
IReadOnlyCollection<SocketApplicationCommand> commands = await this.m_Discord.GetClient().GetGlobalApplicationCommandsAsync();
foreach (SocketApplicationCommand command in commands)
{
await command.DeleteAsync();
}
c#
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 ?
No description
2 Replies
Unknown User
Unknown User9mo ago
Message Not Public
Sign In & Join Server To View
Wagi
WagiOP9mo ago
Nevermind, the bot was still connecting when this was attempted. I thought await would before DiscordSocketClient.StartAsync() did wait until the bot was connected.
Want results from more Discord servers?
Add your server