diff --git a/src/Kook.Net.Core/Entities/Messages/Cards/Modules/ModuleBuilder.cs b/src/Kook.Net.Core/Entities/Messages/Cards/Modules/ModuleBuilder.cs index 41a8ba65..bc549697 100644 --- a/src/Kook.Net.Core/Entities/Messages/Cards/Modules/ModuleBuilder.cs +++ b/src/Kook.Net.Core/Entities/Messages/Cards/Modules/ModuleBuilder.cs @@ -369,12 +369,12 @@ public SectionModuleBuilder WithMode(SectionAccessoryMode mode) /// A representing the built section module object. /// /// - /// The was positioned to the left of the , + /// The was not positioned to the right of the , /// which is not allowed. /// public SectionModule Build() { - if (Mode == SectionAccessoryMode.Left && Accessory is ButtonElementBuilder) + if (Mode != SectionAccessoryMode.Right && Accessory is ButtonElementBuilder) throw new InvalidOperationException("Button must be placed on the right"); return new SectionModule(Mode, Text?.Build(), Accessory?.Build());