Skip to content

Commit dbf547c

Browse files
committed
chore: prettier
1 parent 1c86a96 commit dbf547c

2 files changed

Lines changed: 8 additions & 26 deletions

File tree

apps/website/docs/guide/05-official-plugins/10-commandkit-workflow.mdx

Lines changed: 7 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
22
title: '@commandkit/workflow'
3-
description:
4-
Learn how to use the @commandkit/workflow plugin to build durable,
3+
description: Learn how to use the @commandkit/workflow plugin to build durable,
54
long-running workflows with CommandKit.
65
---
76

@@ -164,10 +163,7 @@ import { sendWelcomeMessage } from './steps/send-welcome-message';
164163
import { assignRole } from './steps/assign-role';
165164
import { sendFollowUpMessage } from './steps/send-follow-up-message';
166165

167-
export async function userOnboardingWorkflow(
168-
userId: string,
169-
guildId: string,
170-
) {
166+
export async function userOnboardingWorkflow(userId: string, guildId: string) {
171167
'use workflow';
172168

173169
await sendWelcomeMessage(userId, guildId);
@@ -188,10 +184,7 @@ export async function userOnboardingWorkflow(
188184
import { FatalError } from 'workflow';
189185
import { useClient } from 'commandkit/hooks';
190186

191-
export async function sendWelcomeMessage(
192-
userId: string,
193-
guildId: string,
194-
) {
187+
export async function sendWelcomeMessage(userId: string, guildId: string) {
195188
'use step';
196189

197190
const client = useClient<true>();
@@ -251,10 +244,7 @@ import {
251244
logMemberJoin,
252245
} from './steps';
253246

254-
export async function memberSetupWorkflow(
255-
userId: string,
256-
guildId: string,
257-
) {
247+
export async function memberSetupWorkflow(userId: string, guildId: string) {
258248
'use workflow';
259249

260250
const [roles, channel, log] = await Promise.all([
@@ -276,10 +266,7 @@ Step functions have full access to CommandKit hooks:
276266
```ts
277267
import { useClient, useCommandKit } from 'commandkit/hooks';
278268

279-
export async function updateMemberStats(
280-
userId: string,
281-
guildId: string,
282-
) {
269+
export async function updateMemberStats(userId: string, guildId: string) {
283270
'use step';
284271

285272
const client = useClient<true>();
@@ -353,14 +340,9 @@ export async function sendModerationAction(
353340

354341
try {
355342
if (action === 'warn') {
356-
await member.send(
357-
'You have been warned for violating server rules.',
358-
);
343+
await member.send('You have been warned for violating server rules.');
359344
} else if (action === 'mute') {
360-
await member.timeout(
361-
60 * 60 * 1000,
362-
'Violation of server rules',
363-
);
345+
await member.timeout(60 * 60 * 1000, 'Violation of server rules');
364346
} else if (action === 'kick') {
365347
await member.kick('Violation of server rules');
366348
}

packages/workflow/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,4 @@
5252
"@workflow/rollup": "catalog:workflow",
5353
"hono": "^4.10.4"
5454
}
55-
}
55+
}

0 commit comments

Comments
 (0)