discord-net/Discord.Net

How to restrict text command processing in ModuleBase<SocketCommandContext>?

panthernet opened this issue · 0 comments

Currently I have two methods in CommandModule

        [Command("int")]
        [RequireContext(ContextType.DM)]
        public async Task IntCommandAsync() { }
        
        [Command("int")]
        [RequireContext(ContextType.DM)]
        public async Task IntCommandAsync([Remainder]string command) { }

When I send !int xxx command the second method is fired then the first one. How to correctly setup command pipe to only execute one method when command is sent with params?

I were using similar approach with the older lib version and it worked as intended. I see a single call in CommandHandlingService so it is obviously being called twice somewhere later. Probably during the await _commands.ExecuteAsync(context, argPos, _services);