utility: await getNamesFromString

This commit is contained in:
Cynthia Foxwell 2022-03-29 11:46:40 -06:00
parent 872b379248
commit ff8d811ee3

View file

@ -529,7 +529,7 @@ jumbo.callback = async function (msg, line) {
const name = emojiNames[line] const name = emojiNames[line]
? `\\:${emojiNames[line]}\\:` ? `\\:${emojiNames[line]}\\:`
: getNamesFromString(line)[0][1]; : await getNamesFromString(line)[0][1];
const statusCode = await fetch(url, {method: "HEAD"}).then( const statusCode = await fetch(url, {method: "HEAD"}).then(
(res) => res.status (res) => res.status
@ -583,7 +583,7 @@ charinfo.description = "Get information about a set of characters.";
charinfo.usage = "[characters]"; charinfo.usage = "[characters]";
charinfo.addAlias("char"); charinfo.addAlias("char");
charinfo.callback = async function (msg, line) { charinfo.callback = async function (msg, line) {
const names = getNamesFromString(line); const names = await getNamesFromString(line);
const chars = [...line]; const chars = [...line];
const lines = names const lines = names
.map( .map(