Page 1 of 1

Not display command in chat

Posted: Sun Sep 23, 2018 6:14 pm
by botmaster
I'm trying to use a SayCommand or similar without having the actual command display in chat so when a user type for example "!test" the callback runs but you don't see in chat the test: "!test". That's the way it worked in EventScripts but with Source.Python I can't find a way to stop it.
Anyone knows if it's possible?

Re: Not display command in chat

Posted: Sun Sep 23, 2018 6:23 pm
by satoon101

Syntax: Select all

from commands import CommandReturn
from commands.say import SayCommand

@SayCommand('!test')
def _test_command(command, index, team_only):
# stop command from showing in chat
return CommandReturn.BLOCK

Re: Not display command in chat

Posted: Sun Sep 23, 2018 6:48 pm
by botmaster
Thx a lot! Will try and report