[Fix] InteractionService.AddModulesXAsync command duplication (#2867)

This commit is contained in:
Mihail Gribkov
2024-02-27 14:14:59 +03:00
committed by GitHub
parent 955fae01a0
commit 2787db3eaa

View File

@@ -519,7 +519,7 @@ namespace Discord.Interactions
{
EnsureClientReady();
var props = modules.SelectMany(x => x.ToApplicationCommandProps(true)).ToList();
var props = modules.SelectMany(x => x.ToApplicationCommandProps(true)).Distinct().ToList();
if (!deleteMissing)
{
@@ -543,7 +543,7 @@ namespace Discord.Interactions
{
EnsureClientReady();
var props = modules.SelectMany(x => x.ToApplicationCommandProps(true)).ToList();
var props = modules.SelectMany(x => x.ToApplicationCommandProps(true)).Distinct().ToList();
if (!deleteMissing)
{