stevekrouse
mayor of val town
Likes
452
sendDiscordMessage
@ktodaz
Script
Send Chunked Discord Message This function is used to send a message to a Discord webhook. If the message exceeds the maximum character limit (2000 characters), it will be divided into chunks and sent as multiple messages. Parameters message (string): The message to be sent to the Discord webhook. Return Value This function does not return any value. Example Usage: const message = "This is a long message that needs to be sent to Discord. It may exceed the character limit, so it will be divided into smaller chunks.";
await @ktodaz.sendDiscordMessage(message); In the above example, the sendDiscordMessage function is used to send the message to the Discord webhook. If the message exceeds 2000 characters, it will be split into smaller chunks and sent as separate messages. Required Secrets: Ensure you have added the secret for discord_webhook in your val.town secrets settings (Profile -> Secrets)
glifJson
@jamiedubs
HTTP (deprecated)
fetches a simplified version of a Glif response object; I use this in other glifs with the WebFetcher block use like:
https://jamiedubs-glifjson.web.val.run/?id=clgh1vxtu0011mo081dplq3xs to fetch only the raw glif JSON, specify ?data=1 :
https://jamiedubs-glifjson.web.val.run/?id=clgh1vxtu0011mo081dplq3xs&data=1 to fetch a list of recently featured glifs try @jamiedubs/glifs #glif #glifs