utility.charinfo: fix empty line message hopefully
This commit is contained in:
parent
5cdefd4ab6
commit
8f89815106
1 changed files with 9 additions and 5 deletions
|
@ -1665,12 +1665,16 @@ charinfo.helpText = "Get information about a set of characters.";
|
|||
charinfo.usage = "[characters]";
|
||||
charinfo.addAlias("char");
|
||||
charinfo.callback = async function (msg, line) {
|
||||
if (!line || (line == "" && msg.messageReference?.messageID)) {
|
||||
const reply = await msg.channel.getMessage(msg.messageReference.messageID);
|
||||
if (!line || line == "") {
|
||||
if (msg.messageReference?.messageID) {
|
||||
const reply = await msg.channel.getMessage(
|
||||
msg.messageReference.messageID
|
||||
);
|
||||
line = reply.content;
|
||||
} else {
|
||||
return "Arguments or reply required.";
|
||||
}
|
||||
}
|
||||
|
||||
if (!line || line == "") return "Arguments required.";
|
||||
|
||||
const names = await getNamesFromString(line);
|
||||
const chars = [...line];
|
||||
|
|
Loading…
Reference in a new issue