@@ -9,9 +9,7 @@ export function registerMessageDiscordAdminCommands(message: Command, helpers: M
99 . withMessageBase (
1010 role . command ( "info" ) . description ( "List roles" ) . requiredOption ( "--guild-id <id>" , "Guild id" ) ,
1111 )
12- . action ( async ( opts ) => {
13- await helpers . runMessageAction ( "role-info" , opts ) ;
14- } ) ;
12+ . action ( ( opts ) => helpers . runMessageAction ( "role-info" , opts ) ) ;
1513
1614 helpers
1715 . withMessageBase (
@@ -22,9 +20,7 @@ export function registerMessageDiscordAdminCommands(message: Command, helpers: M
2220 . requiredOption ( "--user-id <id>" , "User id" )
2321 . requiredOption ( "--role-id <id>" , "Role id" ) ,
2422 )
25- . action ( async ( opts ) => {
26- await helpers . runMessageAction ( "role-add" , opts ) ;
27- } ) ;
23+ . action ( ( opts ) => helpers . runMessageAction ( "role-add" , opts ) ) ;
2824
2925 helpers
3026 . withMessageBase (
@@ -35,18 +31,14 @@ export function registerMessageDiscordAdminCommands(message: Command, helpers: M
3531 . requiredOption ( "--user-id <id>" , "User id" )
3632 . requiredOption ( "--role-id <id>" , "Role id" ) ,
3733 )
38- . action ( async ( opts ) => {
39- await helpers . runMessageAction ( "role-remove" , opts ) ;
40- } ) ;
34+ . action ( ( opts ) => helpers . runMessageAction ( "role-remove" , opts ) ) ;
4135
4236 const channel = message . command ( "channel" ) . description ( "Channel actions" ) ;
4337 helpers
4438 . withMessageBase (
4539 helpers . withRequiredMessageTarget ( channel . command ( "info" ) . description ( "Fetch channel info" ) ) ,
4640 )
47- . action ( async ( opts ) => {
48- await helpers . runMessageAction ( "channel-info" , opts ) ;
49- } ) ;
41+ . action ( ( opts ) => helpers . runMessageAction ( "channel-info" , opts ) ) ;
5042
5143 helpers
5244 . withMessageBase (
@@ -55,9 +47,7 @@ export function registerMessageDiscordAdminCommands(message: Command, helpers: M
5547 . description ( "List channels" )
5648 . requiredOption ( "--guild-id <id>" , "Guild id" ) ,
5749 )
58- . action ( async ( opts ) => {
59- await helpers . runMessageAction ( "channel-list" , opts ) ;
60- } ) ;
50+ . action ( ( opts ) => helpers . runMessageAction ( "channel-list" , opts ) ) ;
6151
6252 const member = message . command ( "member" ) . description ( "Member actions" ) ;
6353 helpers
@@ -68,9 +58,7 @@ export function registerMessageDiscordAdminCommands(message: Command, helpers: M
6858 . requiredOption ( "--user-id <id>" , "User id" ) ,
6959 )
7060 . option ( "--guild-id <id>" , "Guild id (Discord)" )
71- . action ( async ( opts ) => {
72- await helpers . runMessageAction ( "member-info" , opts ) ;
73- } ) ;
61+ . action ( ( opts ) => helpers . runMessageAction ( "member-info" , opts ) ) ;
7462
7563 const voice = message . command ( "voice" ) . description ( "Voice actions" ) ;
7664 helpers
@@ -81,9 +69,7 @@ export function registerMessageDiscordAdminCommands(message: Command, helpers: M
8169 . requiredOption ( "--guild-id <id>" , "Guild id" )
8270 . requiredOption ( "--user-id <id>" , "User id" ) ,
8371 )
84- . action ( async ( opts ) => {
85- await helpers . runMessageAction ( "voice-status" , opts ) ;
86- } ) ;
72+ . action ( ( opts ) => helpers . runMessageAction ( "voice-status" , opts ) ) ;
8773
8874 const event = message . command ( "event" ) . description ( "Event actions" ) ;
8975 helpers
@@ -93,9 +79,7 @@ export function registerMessageDiscordAdminCommands(message: Command, helpers: M
9379 . description ( "List scheduled events" )
9480 . requiredOption ( "--guild-id <id>" , "Guild id" ) ,
9581 )
96- . action ( async ( opts ) => {
97- await helpers . runMessageAction ( "event-list" , opts ) ;
98- } ) ;
82+ . action ( ( opts ) => helpers . runMessageAction ( "event-list" , opts ) ) ;
9983
10084 helpers
10185 . withMessageBase (
@@ -112,9 +96,7 @@ export function registerMessageDiscordAdminCommands(message: Command, helpers: M
11296 . option ( "--location <text>" , "Event location" )
11397 . option ( "--event-type <stage|external|voice>" , "Event type" )
11498 . option ( "--image <url>" , "Cover image URL or local file path" )
115- . action ( async ( opts ) => {
116- await helpers . runMessageAction ( "event-create" , opts ) ;
117- } ) ;
99+ . action ( ( opts ) => helpers . runMessageAction ( "event-create" , opts ) ) ;
118100
119101 helpers
120102 . withMessageBase (
@@ -127,9 +109,7 @@ export function registerMessageDiscordAdminCommands(message: Command, helpers: M
127109 . option ( "--duration-min <n>" , "Timeout duration minutes" )
128110 . option ( "--until <iso>" , "Timeout until" )
129111 . option ( "--reason <text>" , "Moderation reason" )
130- . action ( async ( opts ) => {
131- await helpers . runMessageAction ( "timeout" , opts ) ;
132- } ) ;
112+ . action ( ( opts ) => helpers . runMessageAction ( "timeout" , opts ) ) ;
133113
134114 helpers
135115 . withMessageBase (
@@ -140,9 +120,7 @@ export function registerMessageDiscordAdminCommands(message: Command, helpers: M
140120 . requiredOption ( "--user-id <id>" , "User id" ) ,
141121 )
142122 . option ( "--reason <text>" , "Moderation reason" )
143- . action ( async ( opts ) => {
144- await helpers . runMessageAction ( "kick" , opts ) ;
145- } ) ;
123+ . action ( ( opts ) => helpers . runMessageAction ( "kick" , opts ) ) ;
146124
147125 helpers
148126 . withMessageBase (
@@ -154,7 +132,5 @@ export function registerMessageDiscordAdminCommands(message: Command, helpers: M
154132 )
155133 . option ( "--reason <text>" , "Moderation reason" )
156134 . option ( "--delete-days <n>" , "Ban delete message days" )
157- . action ( async ( opts ) => {
158- await helpers . runMessageAction ( "ban" , opts ) ;
159- } ) ;
135+ . action ( ( opts ) => helpers . runMessageAction ( "ban" , opts ) ) ;
160136}
0 commit comments