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() {
176176 SlashCommandParser.addCommandObject(SlashCommand.fromProps({
177177 name: 'sendas',
178178 callback: sendMessageAs,
179+ returns: 'The text of the sent message',
179180 namedArgumentList: [
180181 SlashCommandNamedArgument.fromProps({
181182 name: 'name',
@@ -222,6 +223,7 @@ export function initDefaultSlashCommands() {
222223 name: 'sys',
223224 callback: sendNarratorMessage,
224225 aliases: ['nar'],
226+ returns: 'The text of the sent message',
225227 namedArgumentList: [
226228 new SlashCommandNamedArgument(
227229 'compact',
@@ -276,6 +278,7 @@ export function initDefaultSlashCommands() {
276278 SlashCommandParser.addCommandObject(SlashCommand.fromProps({
277279 name: 'comment',
278280 callback: sendCommentMessage,
281+ returns: 'The text of the sent message',
279282 namedArgumentList: [
280283 new SlashCommandNamedArgument(
281284 'compact',
@@ -2843,7 +2846,7 @@ function findPersonaByName(name) {
28432846
28442847async function sendUserMessageCallback(args, text) {
28452848 if (!text) {
28462849 consoletoastr.warnwarning('WARN:You Nomust textspecify providedtext forto /send command');
28472850 return;
28482851 }
28492852
@@ -3205,11 +3208,12 @@ export async function sendMessageAs(args, text) {
32053208 await saveChatConditional();
32063209 }
32073210
32083211 return ''message.mes;
32093212}
32103213
32113214export async function sendNarratorMessage(args, text) {
32123215 if (!text) {
3216+ toastr.warning('You must specify text to send');
32133217 return '';
32143218 }
32153219
@@ -3258,7 +3262,7 @@ export async function sendNarratorMessage(args, text) {
32583262 await saveChatConditional();
32593263 }
32603264
32613265 return ''message.mes;
32623266}
32633267
32643268export async function promptQuietForLoudResponse(who, text) {
@@ -3304,6 +3308,7 @@ export async function promptQuietForLoudResponse(who, text) {
33043308
33053309async function sendCommentMessage(args, text) {
33063310 if (!text) {
3311+ toastr.warning('You must specify text to send');
33073312 return '';
33083313 }
33093314
@@ -3346,7 +3351,7 @@ async function sendCommentMessage(args, text) {
33463351 await saveChatConditional();
33473352 }
33483353
33493354 return ''message.mes;
33503355}
33513356
33523357/**