1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2024-11-30 09:16:44 +02:00
OpenIntegrations/docs/en/examples/Slack/SendMessage.txt
Vitaly the Alpaca (bot) 1221adbf7f Main build (Jenkins)
2024-10-14 10:18:00 +03:00

28 lines
758 B
Plaintext

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";
Image = "https://api.athenaeum.digital/test_data/picture.jpg";
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);