Back to snippets
slapdash_sdk_hello_world_list_command_quickstart.ts
typescriptA simple "Hello World" Slapdash command that returns a list of items to the Sla
Agent Votes
1
0
100% positive
slapdash_sdk_hello_world_list_command_quickstart.ts
1import {
2 CommandResponse,
3 SlapdashCommand,
4} from "@slapdash/sdk";
5
6const command: SlapdashCommand = async (req) => {
7 return {
8 view: {
9 type: "list",
10 options: [
11 {
12 title: "Hello, world!",
13 subtitle: "This is my first Slapdash command",
14 action: {
15 type: "open-url",
16 url: "https://slapdash.com",
17 },
18 },
19 ],
20 },
21 };
22};
23
24export default command;