Remove variable usage of 'at' arg in send commands

38792d071b580fba06c446c0b962b59f42e60a0d

Wolfsblvt <wolfsblvt@gmx.de>

1 files changed, +12 -12Ignore whitespace
public/scripts/slash-commands.js+12 -12
@@ -178,8 +178,8 @@ SlashCommandParser.addCommandObject(SlashCommand.fromProps({
178178 SlashCommandNamedArgument.fromProps({
179179 name: 'at',
180180 description: 'position to insert the message',
181181 typeList: [ARGUMENT_TYPE.NUMBER, ARGUMENT_TYPE.VARIABLE_NAME],
182182 enumProvider: commonEnumProviders.messages({ allowIdAfter: true, allowVars: true }),
183183 }),
184184 ],
185185 unnamedArgumentList: [
@@ -221,8 +221,8 @@ SlashCommandParser.addCommandObject(SlashCommand.fromProps({
221221 SlashCommandNamedArgument.fromProps({
222222 name: 'at',
223223 description: 'position to insert the message',
224224 typeList: [ARGUMENT_TYPE.NUMBER, ARGUMENT_TYPE.VARIABLE_NAME],
225225 enumProvider: commonEnumProviders.messages({ allowIdAfter: true, allowVars: true }),
226226 }),
227227 ],
228228 unnamedArgumentList: [
@@ -275,8 +275,8 @@ SlashCommandParser.addCommandObject(SlashCommand.fromProps({
275275 SlashCommandNamedArgument.fromProps({
276276 name: 'at',
277277 description: 'position to insert the message',
278278 typeList: [ARGUMENT_TYPE.NUMBER, ARGUMENT_TYPE.VARIABLE_NAME],
279279 enumProvider: commonEnumProviders.messages({ allowIdAfter: true, allowVars: true }),
280280 }),
281281 ],
282282 unnamedArgumentList: [
@@ -460,8 +460,8 @@ SlashCommandParser.addCommandObject(SlashCommand.fromProps({
460460 SlashCommandNamedArgument.fromProps({
461461 name: 'at',
462462 description: 'position to insert the message',
463463 typeList: [ARGUMENT_TYPE.NUMBER, ARGUMENT_TYPE.VARIABLE_NAME],
464464 enumProvider: commonEnumProviders.messages({ allowIdAfter: true, allowVars: true }),
465465 }),
466466 SlashCommandNamedArgument.fromProps({
467467 name: 'name',
@@ -2428,7 +2428,7 @@ async function sendUserMessageCallback(args, text) {
24282428 text = text.trim();
24292429 const compact = isTrueBoolean(args?.compact);
24302430 const bias = extractMessageBias(text);
24312431 const insertAt = Number(resolveVariable(args?.at));
24322432
24332433 if ('name' in args) {
24342434 const name = args.name || '';
@@ -2737,7 +2737,7 @@ export async function sendMessageAs(args, text) {
27372737 },
27382738 }];
27392739
27402740 const insertAt = Number(resolveVariable(args.at));
27412741
27422742 if (!isNaN(insertAt) && insertAt >= 0 && insertAt <= chat.length) {
27432743 chat.splice(insertAt, 0, message);
@@ -2784,7 +2784,7 @@ export async function sendNarratorMessage(args, text) {
27842784 },
27852785 };
27862786
27872787 const insertAt = Number(resolveVariable(args.at));
27882788
27892789 if (!isNaN(insertAt) && insertAt >= 0 && insertAt <= chat.length) {
27902790 chat.splice(insertAt, 0, message);
@@ -2866,7 +2866,7 @@ async function sendCommentMessage(args, text) {
28662866 },
28672867 };
28682868
28692869 const insertAt = Number(resolveVariable(args.at));
28702870
28712871 if (!isNaN(insertAt) && insertAt >= 0 && insertAt <= chat.length) {
28722872 chat.splice(insertAt, 0, message);