11---
22title : ' @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';
164163import { assignRole } from ' ./steps/assign-role' ;
165164import { 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(
188184import { FatalError } from ' workflow' ;
189185import { 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
277267import { 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 }
0 commit comments