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