Delete Message

Deletes a message

Usage #

// Import the typed helper
import { deleteMessage } from "@hotglue/sdk/slack";
const result = await client.execute({
...deleteMessage({
channel: string,
ts: string,
}),
userId: "user_123",
});
// result is typed as DeleteMessageOutput
const result = await client.execute({
integration: "slack",
tool: "delete_message",
userId: "user_123",
input: {
channel: string,
ts: string,
},
});
// The agent will automatically use this tool when needed
const agent = new Agent({
tools: () => hotglueTools({
integrations: ["slack"],
userId: "user_123",
}),
});
await agent.generate("run the Delete Message tool");

Required Permissions #

chat:write

Input Schema #

channel string required

Channel containing the message

ts string required

Timestamp of the message to delete

Output Schema #

ok bool required
channel string
ts string

This tool calls: #

POST https://slack.com/api/chat.delete