Skip to main content

boolean type

This reference documents the Slack types at the platform level. Their availability and structure may differ in each SDK

Type: boolean

PropertyTypeDescription
defaultThe type that is being described. For a boolean it would be true or false.An optional parameter default value.
descriptionstringAn optional parameter description.
examplesAn array of the type being described.An optional list of examples.
hintstringAn optional parameter hint.
titlestringAn optional parameter title.
typestringString that defines the parameter type.

Declare a boolean type:

// ...
"isMember": {
"type": "boolean"
}
// ...
Boolean example

In this example datastore definition, we use a boolean type to capture whether the message author holds membership in our club.

import { DefineDatastore, Schema } from "deno-slack-sdk/mod.ts";

export const MyDatastore = DefineDatastore({
name: "my_datastore",
primary_key: "id",
attributes: {
id: { type: Schema.types.string },
channel: { type: Schema.slack.types.channel_id },
message: { type: Schema.types.string },
author: { type: Schema.slack.types.user_id },
isMember: { type: Schema.types.boolean },
},
});