Merge pull request #736 from clawdbot/fix/discord-lint
fix: add discord channel/category actions
This commit is contained in:
@@ -463,9 +463,7 @@ export const discordMessageActions: ProviderMessageActionAdapter = {
|
|||||||
const name = readStringParam(params, "name", { required: true });
|
const name = readStringParam(params, "name", { required: true });
|
||||||
const type = readNumberParam(params, "type", { integer: true });
|
const type = readNumberParam(params, "type", { integer: true });
|
||||||
const parentId =
|
const parentId =
|
||||||
params.parentId === null
|
params.parentId === null ? null : readStringParam(params, "parentId");
|
||||||
? null
|
|
||||||
: readStringParam(params, "parentId");
|
|
||||||
const topic = readStringParam(params, "topic");
|
const topic = readStringParam(params, "topic");
|
||||||
const position = readNumberParam(params, "position", { integer: true });
|
const position = readNumberParam(params, "position", { integer: true });
|
||||||
const nsfw = typeof params.nsfw === "boolean" ? params.nsfw : undefined;
|
const nsfw = typeof params.nsfw === "boolean" ? params.nsfw : undefined;
|
||||||
@@ -492,9 +490,7 @@ export const discordMessageActions: ProviderMessageActionAdapter = {
|
|||||||
const topic = readStringParam(params, "topic");
|
const topic = readStringParam(params, "topic");
|
||||||
const position = readNumberParam(params, "position", { integer: true });
|
const position = readNumberParam(params, "position", { integer: true });
|
||||||
const parentId =
|
const parentId =
|
||||||
params.parentId === null
|
params.parentId === null ? null : readStringParam(params, "parentId");
|
||||||
? null
|
|
||||||
: readStringParam(params, "parentId");
|
|
||||||
const nsfw = typeof params.nsfw === "boolean" ? params.nsfw : undefined;
|
const nsfw = typeof params.nsfw === "boolean" ? params.nsfw : undefined;
|
||||||
const rateLimitPerUser = readNumberParam(params, "rateLimitPerUser", {
|
const rateLimitPerUser = readNumberParam(params, "rateLimitPerUser", {
|
||||||
integer: true,
|
integer: true,
|
||||||
@@ -530,9 +526,7 @@ export const discordMessageActions: ProviderMessageActionAdapter = {
|
|||||||
required: true,
|
required: true,
|
||||||
});
|
});
|
||||||
const parentId =
|
const parentId =
|
||||||
params.parentId === null
|
params.parentId === null ? null : readStringParam(params, "parentId");
|
||||||
? null
|
|
||||||
: readStringParam(params, "parentId");
|
|
||||||
const position = readNumberParam(params, "position", { integer: true });
|
const position = readNumberParam(params, "position", { integer: true });
|
||||||
return await handleDiscordAction(
|
return await handleDiscordAction(
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -504,6 +504,13 @@ export type ProviderMessageActionName =
|
|||||||
| "role-remove"
|
| "role-remove"
|
||||||
| "channel-info"
|
| "channel-info"
|
||||||
| "channel-list"
|
| "channel-list"
|
||||||
|
| "channel-create"
|
||||||
|
| "channel-edit"
|
||||||
|
| "channel-delete"
|
||||||
|
| "channel-move"
|
||||||
|
| "category-create"
|
||||||
|
| "category-edit"
|
||||||
|
| "category-delete"
|
||||||
| "voice-status"
|
| "voice-status"
|
||||||
| "event-list"
|
| "event-list"
|
||||||
| "event-create"
|
| "event-create"
|
||||||
|
|||||||
Reference in New Issue
Block a user