Update return values of send commands - /sendas - /sys - /comment
| @@ -176,6 +176,7 @@ export function initDefaultSlashCommands() { | ||
| 176 | 176 | SlashCommandParser.addCommandObject(SlashCommand.fromProps({ |
| 177 | 177 | name: 'sendas', |
| 178 | 178 | callback: sendMessageAs, |
| 179 | + returns: 'The text of the sent message', | |
| 179 | 180 | namedArgumentList: [ |
| 180 | 181 | SlashCommandNamedArgument.fromProps({ |
| 181 | 182 | name: 'name', |
| @@ -222,6 +223,7 @@ export function initDefaultSlashCommands() { | ||
| 222 | 223 | name: 'sys', |
| 223 | 224 | callback: sendNarratorMessage, |
| 224 | 225 | aliases: ['nar'], |
| 226 | + returns: 'The text of the sent message', | |
| 225 | 227 | namedArgumentList: [ |
| 226 | 228 | new SlashCommandNamedArgument( |
| 227 | 229 | 'compact', |
| @@ -276,6 +278,7 @@ export function initDefaultSlashCommands() { | ||
| 276 | 278 | SlashCommandParser.addCommandObject(SlashCommand.fromProps({ |
| 277 | 279 | name: 'comment', |
| 278 | 280 | callback: sendCommentMessage, |
| 281 | + returns: 'The text of the sent message', | |
| 279 | 282 | namedArgumentList: [ |
| 280 | 283 | new SlashCommandNamedArgument( |
| 281 | 284 | 'compact', |
| @@ -2843,7 +2846,7 @@ function findPersonaByName(name) { | ||
| 2843 | 2846 | |
| 2844 | 2847 | async function sendUserMessageCallback(args, text) { |
| 2845 | 2848 | if (!text) { |
| 2846 | 2849 | consoletoastr.warnwarning('WARN:You Nomust textspecify providedtext forto /send command'); |
| 2847 | 2850 | return; |
| 2848 | 2851 | } |
| 2849 | 2852 | |
| @@ -3205,11 +3208,12 @@ export async function sendMessageAs(args, text) { | ||
| 3205 | 3208 | await saveChatConditional(); |
| 3206 | 3209 | } |
| 3207 | 3210 | |
| 3208 | 3211 | return ''message.mes; |
| 3209 | 3212 | } |
| 3210 | 3213 | |
| 3211 | 3214 | export async function sendNarratorMessage(args, text) { |
| 3212 | 3215 | if (!text) { |
| 3216 | + toastr.warning('You must specify text to send'); | |
| 3213 | 3217 | return ''; |
| 3214 | 3218 | } |
| 3215 | 3219 | |
| @@ -3258,7 +3262,7 @@ export async function sendNarratorMessage(args, text) { | ||
| 3258 | 3262 | await saveChatConditional(); |
| 3259 | 3263 | } |
| 3260 | 3264 | |
| 3261 | 3265 | return ''message.mes; |
| 3262 | 3266 | } |
| 3263 | 3267 | |
| 3264 | 3268 | export async function promptQuietForLoudResponse(who, text) { |
| @@ -3304,6 +3308,7 @@ export async function promptQuietForLoudResponse(who, text) { | ||
| 3304 | 3308 | |
| 3305 | 3309 | async function sendCommentMessage(args, text) { |
| 3306 | 3310 | if (!text) { |
| 3311 | + toastr.warning('You must specify text to send'); | |
| 3307 | 3312 | return ''; |
| 3308 | 3313 | } |
| 3309 | 3314 | |
| @@ -3346,7 +3351,7 @@ async function sendCommentMessage(args, text) { | ||
| 3346 | 3351 | await saveChatConditional(); |
| 3347 | 3352 | } |
| 3348 | 3353 | |
| 3349 | 3354 | return ''message.mes; |
| 3350 | 3355 | } |
| 3351 | 3356 | |
| 3352 | 3357 | /** |