fix alias system

This commit is contained in:
Ean Milligan 2025-07-13 04:42:47 -04:00
parent b055e0174d
commit 7301df4d9d
2 changed files with 4 additions and 3 deletions

View File

@ -192,7 +192,7 @@ If you are trying to update an existing alias, but forgot the name, please run t
.slice(openIdx + 1, closeIdx) .slice(openIdx + 1, closeIdx)
.join('') .join('')
.split(/(y\d+(\.\d*)?)/g) .split(/(y\d+(\.\d*)?)/g)
.filter((y) => y.startsWith('y')); .filter((y) => y && y.startsWith('y'));
for (const yVar of possibleYVars) { for (const yVar of possibleYVars) {
if (yVar.includes('.')) { if (yVar.includes('.')) {
newMsg newMsg
@ -224,6 +224,7 @@ If you are trying to update an existing alias, but forgot the name, please run t
openIdx = testCmdConf.indexOf(config.prefix, closeIdx); openIdx = testCmdConf.indexOf(config.prefix, closeIdx);
} }
} catch (e) { } catch (e) {
const err = e as Error;
newMsg newMsg
.edit({ .edit({
embeds: [ embeds: [
@ -238,7 +239,7 @@ If you are trying to update an existing alias, but forgot the name, please run t
}, },
{ {
name: 'Raw Error:', name: 'Raw Error:',
value: `\`${JSON.stringify(e)}\``, value: `${err.name}: ${err.message}`,
}, },
], ],
footer: { footer: {

View File

@ -63,7 +63,7 @@ export const run = async (message: DiscordenoMessage, guildMode: boolean, comman
} }
const details = query.shift(); const details = query.shift();
if (!query.length || !details) { if (!details) {
message message
.send({ .send({
embeds: [ embeds: [