1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-01-10 04:18:47 +02:00
OpenIntegrations/docs/en/examples/Slack/SendMessage.txt
Vitaly the Alpaca (bot) 2741c109d2 Main build (Jenkins)
2024-10-06 21:51:35 +03:00

28 lines
761 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://openyellow.neocities.org/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);