Back to APIs list

Discord API examples & templates

Use these vals as a playground to view and fork Discord API examples and templates on Val Town. Run any example below or find templates that can be used as a pre-built solution.
willthereader avatar
willthereader
Jumpchain_Website
HTTP
Forked from willthereader/homepage
0
stevekrouse avatar
stevekrouse
newValTownSignUp
Script
⚠️ Deprecated - the new version of this val can be found here: @stevekrouse/handleDiscordNewUser
0
chen avatar
chen
twitterAlert
Cron
Forked from geoffreylitt/twitterDailyDigest
0
roadlabs avatar
roadlabs
keenScarletWoodpecker
HTTP
Forked from steveruizok/tldraw_computer_example
0
stevekrouse avatar
stevekrouse
newThankYouEmailVersion
HTTP
Forked from stevekrouse/newStripeSubscriber
0
stevekrouse avatar
stevekrouse
templateTwitterAlert
Cron
Forked from valdottown/templateTwitterAlert
0
ben5mills5 avatar
ben5mills5
twitterAlert
Cron
Forked from valdottown/templateTwitterAlert
0
steveruizok avatar
steveruizok
tldraw_computer_example
HTTP
tldraw computer custom endpoint example This val is an example custom endpoint for tldraw computer 's data component. Usage To use this val with tldraw.computer, follow these steps: Fork this Val. Click the Copy endpoint button on your new Val. Open a project on tldraw.computer Create a Data component in your tldraw computer project In the Source dropdown, select Custom and the POST method Paste the endpoint into Data component's the HTTP Endpoint input. Run the component. To see the output, connect the Data component to a Text component. How it works In tldraw computer, you can configure a Data component to use a custom HTTP endpoint as its data source. You can also configure the request method, either GET or POST. If a Data component's request method is POST, then when the component next updates, it will send a POST request to the endpoint. The request's body will contain an array of the Data objects that the component had received as inputs. If the request method if GET, then the component will only make the requestβ€”its body will be empty. In both cases, the component will expect back a response that includes an array of Data objects these objects will be passed along as the data component's outputs. The endpoint (your forked version of this Val) can do whatever it likes between the request and response, but the response must include data in the correct format. If the format is wrong, the computer app will create a text data object instead that includes the response as plain text. Support If you're running into any difficulties, check out the #tldraw-computer channel on the tldraw discord.
3
rodrigotello avatar
rodrigotello
valTownInspoList
Script
Val Town inspiration & use cases list List [as object] used in Val Town's use cases and inspiration. Check it out at in /examples/use-cases and /docs/tutorial/4
1
ryan_alive avatar
ryan_alive
stirringVioletHookworm
Cron
Forked from ryan_alive/twitterAlert
0
valdottown avatar
valdottown
templateHackerNewsAlert
Cron
Hacker News Keyword Alerts [TEMPLATE] Get notifications when specific keywords appear in Hacker News posts. This template will help you: Search Hacker News for specific keywords. Send notifications to your preferred platform (Discord, Slack, email, etc.), the default in this template is Discord. Example This val tracks mentions of "Val Town" on Hacker News and sends updates to a Discord webhook. Set Up 1. Fork this Val To start using this template, fork this val by clicking the fork button at the top-right corner of the page. 2. View Source Code The CODE box shows you the the full source code of this val, you may need to scroll down to see it. 3. Customize Keyword In the CODE box below, update the terms or phrases you want to track: query: '"val town" || "val.town"' 5. Set Up Your Notification Method This template uses a Discord webhook for notifications. You can update this to your preferred platform: Create a Discord webhook following this guide . Save your webhook URL in your Val Town environment variables: Key: mentionsDiscord Value: Your Discord webhook URL. Notifications will be sent using this function: await discordWebhook({ url: Deno.env.get("mentionsDiscord"), content, }); To switch to another platform (e.g., Slack, email, or custom webhooks), replace the discordWebhook call with the appropriate integration ((e.g., @std/email , Slack , or anywhere else ) πŸŽ‰ Congrats! You now have a val running that ensures you never miss another Hacker News mention. πŸŽ‰
0
mwsz avatar
mwsz
twitterAlert
Cron
Forked from stevekrouse/twitterAlert
0
kylem avatar
kylem
starlightFaker
HTTP
Forked from kylem/loremIpsumMarkdownGenerator
0
faekiva avatar
faekiva
rssToBsky
Cron
Forked from stevekrouse/pollRSSFeeds
0
daniellevine avatar
daniellevine
twitterAlert
Cron
Forked from stevekrouse/twitterAlert
0
charmaine avatar
charmaine
newUserWelcomeEmail
HTTP
Forked from stevekrouse/newUserWelcomeEmail
0
…
10
…
Next