@@ -29,10 +29,12 @@ export const DiscordBlock: BlockConfig<DiscordResponse> = {
2929 { label : 'Get User Information' , id : 'discord_get_user' } ,
3030 { label : 'Edit Message' , id : 'discord_edit_message' } ,
3131 { label : 'Delete Message' , id : 'discord_delete_message' } ,
32+ { label : 'Bulk Delete Messages' , id : 'discord_bulk_delete_messages' } ,
3233 { label : 'Add Reaction' , id : 'discord_add_reaction' } ,
3334 { label : 'Remove Reaction' , id : 'discord_remove_reaction' } ,
3435 { label : 'Pin Message' , id : 'discord_pin_message' } ,
3536 { label : 'Unpin Message' , id : 'discord_unpin_message' } ,
37+ { label : 'Get Pinned Messages' , id : 'discord_get_pinned_messages' } ,
3638 { label : 'Create Thread' , id : 'discord_create_thread' } ,
3739 { label : 'Join Thread' , id : 'discord_join_thread' } ,
3840 { label : 'Leave Thread' , id : 'discord_leave_thread' } ,
@@ -41,11 +43,13 @@ export const DiscordBlock: BlockConfig<DiscordResponse> = {
4143 { label : 'Update Channel' , id : 'discord_update_channel' } ,
4244 { label : 'Delete Channel' , id : 'discord_delete_channel' } ,
4345 { label : 'Get Channel' , id : 'discord_get_channel' } ,
46+ { label : 'List Channels' , id : 'discord_list_channels' } ,
4447 { label : 'Create Role' , id : 'discord_create_role' } ,
4548 { label : 'Update Role' , id : 'discord_update_role' } ,
4649 { label : 'Delete Role' , id : 'discord_delete_role' } ,
4750 { label : 'Assign Role' , id : 'discord_assign_role' } ,
4851 { label : 'Remove Role' , id : 'discord_remove_role' } ,
52+ { label : 'List Roles' , id : 'discord_list_roles' } ,
4953 { label : 'Kick Member' , id : 'discord_kick_member' } ,
5054 { label : 'Ban Member' , id : 'discord_ban_member' } ,
5155 { label : 'Unban Member' , id : 'discord_unban_member' } ,
@@ -92,10 +96,12 @@ export const DiscordBlock: BlockConfig<DiscordResponse> = {
9296 'discord_get_messages' ,
9397 'discord_edit_message' ,
9498 'discord_delete_message' ,
99+ 'discord_bulk_delete_messages' ,
95100 'discord_add_reaction' ,
96101 'discord_remove_reaction' ,
97102 'discord_pin_message' ,
98103 'discord_unpin_message' ,
104+ 'discord_get_pinned_messages' ,
99105 'discord_create_thread' ,
100106 'discord_update_channel' ,
101107 'discord_delete_channel' ,
@@ -121,10 +127,35 @@ export const DiscordBlock: BlockConfig<DiscordResponse> = {
121127 'discord_remove_reaction' ,
122128 'discord_pin_message' ,
123129 'discord_unpin_message' ,
124- 'discord_create_thread' ,
125130 ] ,
126131 } ,
127132 } ,
133+ // Message ID (optional) - for creating a thread from an existing message
134+ {
135+ id : 'messageId' ,
136+ title : 'Message ID' ,
137+ type : 'short-input' ,
138+ placeholder : 'Enter message ID (leave empty for a standalone thread)' ,
139+ condition : {
140+ field : 'operation' ,
141+ value : [ 'discord_create_thread' ] ,
142+ } ,
143+ } ,
144+ // Message IDs - for bulk delete
145+ {
146+ id : 'messageIds' ,
147+ title : 'Message IDs' ,
148+ type : 'long-input' ,
149+ placeholder : 'Comma-separated message IDs to delete (2-100)' ,
150+ required : true ,
151+ condition : { field : 'operation' , value : 'discord_bulk_delete_messages' } ,
152+ wandConfig : {
153+ enabled : true ,
154+ prompt :
155+ 'Generate a comma-separated list of Discord message IDs (2-100 numeric snowflake IDs) based on the context: {context}. Return ONLY the comma-separated list - no explanations, no extra text.' ,
156+ placeholder : 'Describe which messages to delete' ,
157+ } ,
158+ } ,
128159 // Content - for send/edit message
129160 {
130161 id : 'content' ,
@@ -133,32 +164,44 @@ export const DiscordBlock: BlockConfig<DiscordResponse> = {
133164 placeholder : 'Enter message content...' ,
134165 condition : {
135166 field : 'operation' ,
136- value : [ 'discord_send_message' , 'discord_edit_message' , 'discord_execute_webhook' ] ,
167+ value : [ 'discord_send_message' , 'discord_edit_message' ] ,
168+ } ,
169+ } ,
170+ // Content (required) - for executing a webhook
171+ {
172+ id : 'content' ,
173+ title : 'Message Content' ,
174+ type : 'long-input' ,
175+ placeholder : 'Enter message content...' ,
176+ required : true ,
177+ condition : {
178+ field : 'operation' ,
179+ value : [ 'discord_execute_webhook' ] ,
137180 } ,
138181 } ,
139182 // Emoji - for reaction operations
140183 {
141184 id : 'emoji' ,
142185 title : 'Emoji' ,
143186 type : 'short-input' ,
144- placeholder : 'Enter emoji (e.g., 👍 or custom:123456789 )' ,
187+ placeholder : 'Enter emoji (e.g., 👍 or emoji_name:123456789012345678 for custom emoji )' ,
145188 required : true ,
146189 condition : {
147190 field : 'operation' ,
148191 value : [ 'discord_add_reaction' , 'discord_remove_reaction' ] ,
149192 } ,
150193 } ,
151- // User ID - for user/member operations
194+ // User ID (required) - for user/member operations
152195 {
153196 id : 'userId' ,
154197 title : 'User ID' ,
155198 type : 'short-input' ,
156199 placeholder : 'Enter Discord user ID' ,
200+ required : true ,
157201 condition : {
158202 field : 'operation' ,
159203 value : [
160204 'discord_get_user' ,
161- 'discord_remove_reaction' ,
162205 'discord_assign_role' ,
163206 'discord_remove_role' ,
164207 'discord_kick_member' ,
@@ -169,6 +212,17 @@ export const DiscordBlock: BlockConfig<DiscordResponse> = {
169212 ] ,
170213 } ,
171214 } ,
215+ // User ID (optional) - to remove a specific user's reaction
216+ {
217+ id : 'userId' ,
218+ title : 'User ID' ,
219+ type : 'short-input' ,
220+ placeholder : 'Enter Discord user ID (leave empty to remove your own reaction)' ,
221+ condition : {
222+ field : 'operation' ,
223+ value : [ 'discord_remove_reaction' ] ,
224+ } ,
225+ } ,
172226 // Thread ID - for thread operations
173227 {
174228 id : 'threadId' ,
@@ -346,6 +400,22 @@ export const DiscordBlock: BlockConfig<DiscordResponse> = {
346400 value : [ 'discord_create_thread' ] ,
347401 } ,
348402 } ,
403+ // Thread Visibility (for create_thread, standalone threads only)
404+ {
405+ id : 'threadVisibility' ,
406+ title : 'Thread Visibility' ,
407+ type : 'dropdown' ,
408+ options : [
409+ { label : 'Public - visible to everyone in the channel' , id : 'public' } ,
410+ { label : 'Private - invite-only' , id : 'private' } ,
411+ ] ,
412+ value : ( ) => 'public' ,
413+ mode : 'advanced' ,
414+ condition : {
415+ field : 'operation' ,
416+ value : [ 'discord_create_thread' ] ,
417+ } ,
418+ } ,
349419 // Channel Type (for create_channel)
350420 {
351421 id : 'channelType' ,
@@ -354,6 +424,7 @@ export const DiscordBlock: BlockConfig<DiscordResponse> = {
354424 options : [
355425 { label : 'Text Channel' , id : '0' } ,
356426 { label : 'Voice Channel' , id : '2' } ,
427+ { label : 'Category' , id : '4' } ,
357428 { label : 'Announcement Channel' , id : '5' } ,
358429 { label : 'Stage Channel' , id : '13' } ,
359430 { label : 'Forum Channel' , id : '15' } ,
@@ -537,10 +608,12 @@ export const DiscordBlock: BlockConfig<DiscordResponse> = {
537608 'discord_get_user' ,
538609 'discord_edit_message' ,
539610 'discord_delete_message' ,
611+ 'discord_bulk_delete_messages' ,
540612 'discord_add_reaction' ,
541613 'discord_remove_reaction' ,
542614 'discord_pin_message' ,
543615 'discord_unpin_message' ,
616+ 'discord_get_pinned_messages' ,
544617 'discord_create_thread' ,
545618 'discord_join_thread' ,
546619 'discord_leave_thread' ,
@@ -549,11 +622,13 @@ export const DiscordBlock: BlockConfig<DiscordResponse> = {
549622 'discord_update_channel' ,
550623 'discord_delete_channel' ,
551624 'discord_get_channel' ,
625+ 'discord_list_channels' ,
552626 'discord_create_role' ,
553627 'discord_update_role' ,
554628 'discord_delete_role' ,
555629 'discord_assign_role' ,
556630 'discord_remove_role' ,
631+ 'discord_list_roles' ,
557632 'discord_kick_member' ,
558633 'discord_ban_member' ,
559634 'discord_unban_member' ,
@@ -612,6 +687,17 @@ export const DiscordBlock: BlockConfig<DiscordResponse> = {
612687 channelId : params . channelId ,
613688 messageId : params . messageId ,
614689 }
690+ case 'discord_bulk_delete_messages' :
691+ return {
692+ ...commonParams ,
693+ channelId : params . channelId ,
694+ messageIds : String ( params . messageIds || '' )
695+ . split ( ',' )
696+ . map ( ( id : string ) => id . trim ( ) )
697+ . filter ( Boolean ) ,
698+ }
699+ case 'discord_get_pinned_messages' :
700+ return { ...commonParams , channelId : params . channelId }
615701 case 'discord_add_reaction' :
616702 case 'discord_remove_reaction' :
617703 return {
@@ -637,6 +723,9 @@ export const DiscordBlock: BlockConfig<DiscordResponse> = {
637723 ...( params . autoArchiveDuration && {
638724 autoArchiveDuration : Number ( params . autoArchiveDuration ) ,
639725 } ) ,
726+ ...( params . threadVisibility !== undefined && {
727+ isPublic : params . threadVisibility !== 'private' ,
728+ } ) ,
640729 }
641730 case 'discord_join_thread' :
642731 case 'discord_leave_thread' :
@@ -665,6 +754,8 @@ export const DiscordBlock: BlockConfig<DiscordResponse> = {
665754 case 'discord_delete_channel' :
666755 case 'discord_get_channel' :
667756 return { ...commonParams , channelId : params . channelId }
757+ case 'discord_list_channels' :
758+ return commonParams
668759 case 'discord_create_role' :
669760 return {
670761 ...commonParams ,
@@ -695,6 +786,8 @@ export const DiscordBlock: BlockConfig<DiscordResponse> = {
695786 userId : params . userId ,
696787 roleId : params . roleId ,
697788 }
789+ case 'discord_list_roles' :
790+ return commonParams
698791 case 'discord_kick_member' :
699792 case 'discord_unban_member' :
700793 return {
@@ -708,7 +801,7 @@ export const DiscordBlock: BlockConfig<DiscordResponse> = {
708801 userId : params . userId ,
709802 ...( params . reason && { reason : params . reason } ) ,
710803 ...( params . deleteMessageDays && {
711- deleteMessageDays : Number ( params . deleteMessageDays ) ,
804+ deleteMessageSeconds : Number ( params . deleteMessageDays ) * 86400 ,
712805 } ) ,
713806 }
714807 case 'discord_get_member' :
@@ -761,6 +854,10 @@ export const DiscordBlock: BlockConfig<DiscordResponse> = {
761854 serverId : { type : 'string' , description : 'Discord server identifier' } ,
762855 channelId : { type : 'string' , description : 'Discord channel identifier' } ,
763856 messageId : { type : 'string' , description : 'Discord message identifier' } ,
857+ messageIds : {
858+ type : 'string' ,
859+ description : 'Comma-separated message IDs to bulk delete (2-100)' ,
860+ } ,
764861 threadId : { type : 'string' , description : 'Discord thread identifier' } ,
765862 userId : { type : 'string' , description : 'Discord user identifier' } ,
766863 roleId : { type : 'string' , description : 'Discord role identifier' } ,
@@ -778,6 +875,10 @@ export const DiscordBlock: BlockConfig<DiscordResponse> = {
778875 files : { type : 'array' , description : 'Files to attach (canonical param)' } ,
779876 limit : { type : 'number' , description : 'Message limit' } ,
780877 autoArchiveDuration : { type : 'number' , description : 'Thread auto-archive duration in minutes' } ,
878+ threadVisibility : {
879+ type : 'string' ,
880+ description : 'Visibility for a new standalone thread (public/private)' ,
881+ } ,
781882 channelType : { type : 'number' , description : 'Discord channel type (0=text, 2=voice, etc.)' } ,
782883 parentId : { type : 'string' , description : 'Parent category ID for channel' } ,
783884 hoist : { type : 'boolean' , description : 'Whether to display role members separately' } ,
0 commit comments