Commit be345c45 authored by Chunchi Che's avatar Chunchi Che

fix announce

parent fa612074
...@@ -38,14 +38,15 @@ export default async (announce: MsgAnnounce) => { ...@@ -38,14 +38,15 @@ export default async (announce: MsgAnnounce) => {
} }
case MsgAnnounce.AnnounceType.Card: { case MsgAnnounce.AnnounceType.Card: {
announceModal.title = fetchStrings("!system", 564); announceModal.title = fetchStrings("!system", 564);
announceModal.options = await Promise.all( for (const option of announce.options) {
announce.options.map(async (option) => ({ const meta = await fetchCard(option.code);
info: await fetchCard(option.code).then( if (meta.text.name) {
(meta) => meta.text.name ?? "[?]" announceModal.options.push({
), info: meta.text.name,
response: option.response, response: option.response,
})) });
); }
}
announceModal.isOpen = true; announceModal.isOpen = true;
break; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment