devzat icon indicating copy to clipboard operation
devzat copied to clipboard

Made commands harder to trigger.

Open Arkaeriit opened this issue 3 years ago • 6 comments

Commands that are only a normal English word are harder to trigger in order not to trash unwillingly the chat in a normal conversation.

Arkaeriit avatar Mar 21 '22 11:03 Arkaeriit

This is a really good idea

quackduck avatar Mar 21 '22 14:03 quackduck

Maybe we should consider adding a noArgs flag to the command struct, since this may be enabled for a lot of commands.

Edit: or perhaps a maxArgs number limit!

quackduck avatar Mar 21 '22 19:03 quackduck

Maybe we should consider adding a noArgs flag to the command struct, since this may be enabled for a lot of commands.

Edit: or perhaps a maxArgs number limit!

Where would you want to add that definition? In the list of commands?

Arkaeriit avatar Mar 28 '22 08:03 Arkaeriit

Where would you want to add that definition? In the list of commands?

Yeah, like a new field in cmd that gets defined for each command in the slices.

quackduck avatar Mar 28 '22 15:03 quackduck

What do you think?

quackduck avatar Apr 07 '22 18:04 quackduck

Where would you want to add that definition? In the list of commands?

Yeah, like a new field in cmd that gets defined for each command in the slices.

Sorry for forgetting to reply. I did something similar in the branch please_gocyclio but you didn't like it. Are you sure we should set it up for this issue?

Arkaeriit avatar Sep 19 '22 13:09 Arkaeriit

Yes

quackduck avatar Sep 23 '22 02:09 quackduck

Turns out we don't need a new field in that struct. The argsInfo fields already tells if we need arguments or not.

Arkaeriit avatar Sep 23 '22 08:09 Arkaeriit

I'm not sure of this approach because a lot of commands check for when they don't receive any arguments.

quackduck avatar Sep 29 '22 19:09 quackduck

What do you mean?

Arkaeriit avatar Sep 30 '22 08:09 Arkaeriit

Nothing I misinterpreted the code

quackduck avatar Sep 30 '22 14:09 quackduck