2024-09-29 12:34:39 +03:00
|
|
|
Token = "xoxb-6965308400114-696804637...";
|
|
|
|
Channel = "C06UFNUTKUL";
|
|
|
|
|
|
|
|
// Text
|
|
|
|
|
|
|
|
Text = "TestMessage1";
|
|
|
|
Result = OPI_Slack.SendMessage(Token, Channel, Text);
|
|
|
|
|
|
|
|
// With attachments (picture block in the example)
|
|
|
|
|
|
|
|
Text = "Message with picture";
|
2024-10-05 11:21:35 +03:00
|
|
|
Image = "https://openyellow.neocities.org/test_data/picture.jpg";
|
2024-09-29 12:34:39 +03:00
|
|
|
BlockArray = New Array;
|
|
|
|
|
|
|
|
Block = OPI_Slack.GenerateImageBlock(Image, "Image");
|
|
|
|
BlockArray.Add(Block);
|
|
|
|
|
|
|
|
Result = OPI_Slack.SendMessage(Token, Channel, Text, , BlockArray);
|
|
|
|
|
|
|
|
// Sheduled
|
|
|
|
|
|
|
|
Text = "Sheduled message";
|
|
|
|
Hour = 3600;
|
|
|
|
Day = 24;
|
|
|
|
|
|
|
|
SendingDate = OPI_Tools.GetCurrentDate() + (Day * Hour);
|
|
|
|
Result = OPI_Slack.SendMessage(Token, Channel, Text, SendingDate);
|