We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bcfd65e commit 8fdb767Copy full SHA for 8fdb767
1 file changed
exemplos/BotTerminal.sh
@@ -20,14 +20,11 @@ ShellBot.username
20
# argumentos posicionais é possível criar comandos/argumentos para adequação
21
# da sintaxe, podendo ser distribuida em regras e tratamentos distintos.
22
#
23
-# Comandos: /who, /date, /df e /du
+# Comandos: /who, /date, /df e /du (regex)
24
ShellBot.setMessageRules --name 'terminal_comandos' \
25
--chat_type private \
26
--entitie_type bot_command \
27
- --command '/who' \
28
- --command '/date' \
29
- --command '/df' \
30
- --command '/du' \
+ --text '^/(who|date|df|du)[ ]+' \
31
--exec '${1#/} ${*:2}' # Remove a barra inicial do argumento posicional '$1' (bot comando) transformando-o
32
# em um comando de shell válido e passa os argumentos posicionais subsequentes.
33
0 commit comments