Skip to content

Commit

Permalink
update interactions sample app
Browse files Browse the repository at this point in the history
  • Loading branch information
Cenngo committed Nov 27, 2021
1 parent e05a0c4 commit 6ac8cd0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions samples/04_interactions_framework/CommandHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,6 @@ private async Task HandleInteraction (SocketInteraction arg)

// If a Slash Command execution fails it is most likely that the original interaction acknowledgement will persist. It is a good idea to delete the original
// response, or at least let the user know that something went wrong during the command execution.
if(arg.Type == InteractionType.ApplicationCommand)
await arg.GetOriginalResponseAsync().ContinueWith(async (msg) => await msg.Result.DeleteAsync());
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion samples/04_interactions_framework/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ static ServiceProvider ConfigureServices ( IConfiguration configuration )
return new ServiceCollection()
.AddSingleton(configuration)
.AddSingleton<DiscordSocketClient>()
.AddSingleton(x => new InteractionService(x.GetRequiredService<DiscordSocketClient>()))
.AddSingleton<InteractionService>()
.AddSingleton<CommandHandler>()
.BuildServiceProvider();
}
Expand Down

0 comments on commit 6ac8cd0

Please sign in to comment.