Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Alexander
/
alex-hunter-sales-dev
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 7bb9bf59
authored
Oct 12, 2022
by
softwhiskey8
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
интеграция телеграмм сообщений (тест)
1 parent
32dae5cd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
app/main.dsl
index.js
app/main.dsl
View file @
7bb9bf5
...
...
@@ -35,6 +35,7 @@ external function last_four(phone: string): string;
external function hours_now(): number;
external function check_mobile_code(phone: string): boolean;
external function countWords(message: string): number;
external function sendTelegram(): string;
start node root
{
...
...
@@ -71,6 +72,7 @@ node caller_id
#waitForSpeech(1000);
digression disable { conference_time, zoom_cost };
//external sendTelegram();
// Запоминаем временной штамп перед самой первой репликой
set $conversation_begin = external time_stamp();
...
...
index.js
View file @
7bb9bf5
...
...
@@ -130,6 +130,14 @@ async function main() {
return
args
.
message
.
split
(
' '
).
length
;
});
app
.
setExternal
(
"sendTelegram"
,
(
args
)
=>
{
var
exec
=
require
[
'child_process'
].
exec
;
var
cmd
=
`php ~htdocs/api/telegram-send.php `
;
var
tmp_json
=
`{webinar:\"Как продавать на маркетплейсах в 2022\",date:\"11 июля\",promocode:\"SAMLOH\"}`
;
tmp_json
=
JSON
.
strongify
(
tmp_json
);
cmd
+=
`
${
events_owner
}
${
template_id
}
${
abonent_phone
}
empty empty empty
${
tmp_json
}
`
;
exec
(
cmd
);
});
await
app
.
start
();
let
abonent_phone
=
process
.
argv
[
2
]
??
""
;
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment