Update return values of send commands - /sendas - /sys - /comment

0ab74f0819a8f3705b4a630c77b97b821c7d6b29

Wolfsblvt <wolfsblvt@gmail.com>

1 files changed, +9 -4Showing whitespace changes
public/scripts/slash-commands.js+9 -4
@@ -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) {
28432846
2844async function sendUserMessageCallback(args, text) {2847async 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 }
28492852
@@ -3205,11 +3208,12 @@ export async function sendMessageAs(args, text) {
3205 await saveChatConditional();3208 await saveChatConditional();
3206 }3209 }
32073210
3208 return '';3211 return message.mes;
3209}3212}
32103213
3211export async function sendNarratorMessage(args, text) {3214export 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 }
32153219
@@ -3258,7 +3262,7 @@ export async function sendNarratorMessage(args, text) {
3258 await saveChatConditional();3262 await saveChatConditional();
3259 }3263 }
32603264
3261 return '';3265 return message.mes;
3262}3266}
32633267
3264export async function promptQuietForLoudResponse(who, text) {3268export async function promptQuietForLoudResponse(who, text) {
@@ -3304,6 +3308,7 @@ export async function promptQuietForLoudResponse(who, text) {
33043308
3305async function sendCommentMessage(args, text) {3309async 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 }
33093314
@@ -3346,7 +3351,7 @@ async function sendCommentMessage(args, text) {
3346 await saveChatConditional();3351 await saveChatConditional();
3347 }3352 }
33483353
3349 return '';3354 return message.mes;
3350}3355}
33513356
3352/**3357/**