Showing
59 changed files
with
35 additions
and
3 deletions
... | @@ -116,7 +116,7 @@ async function recommendMeta(replyToken) { | ... | @@ -116,7 +116,7 @@ async function recommendMeta(replyToken) { |
116 | sql = 'SELECT `alias` FROM character_aliases WHERE character_id=? AND is_name=1'; | 116 | sql = 'SELECT `alias` FROM character_aliases WHERE character_id=? AND is_name=1'; |
117 | for(let i = 1; i <= 8; i++) { | 117 | for(let i = 1; i <= 8; i++) { |
118 | [results] = await pool.query(sql, [row[`character_${i}`]]); | 118 | [results] = await pool.query(sql, [row[`character_${i}`]]); |
119 | - chars.push(results[0].alias); | 119 | + chars.push({id: row[`character_${i}`], name: results[0].alias}); |
120 | } | 120 | } |
121 | 121 | ||
122 | let traitCnt = new Map(); | 122 | let traitCnt = new Map(); |
... | @@ -153,8 +153,40 @@ async function recommendMeta(replyToken) { | ... | @@ -153,8 +153,40 @@ async function recommendMeta(replyToken) { |
153 | 153 | ||
154 | [results] = await pool.query('SELECT `name` FROM traits WHERE `id`=?', [row.chosen]); | 154 | [results] = await pool.query('SELECT `name` FROM traits WHERE `id`=?', [row.chosen]); |
155 | messages.push({ | 155 | messages.push({ |
156 | - type: 'text', | 156 | + type: 'flex', |
157 | - text: traits.join(', ') + '\n' + chars.join(', ') + '\n' + '선택받은 자: ' + results[0].name | 157 | + altText: traits.join(', ') + '\n' + chars.join(', ') + '\n' + '선택받은 자: ' + results[0].name, |
158 | + contents: { | ||
159 | + type: 'bubble', | ||
160 | + size: 'giga', | ||
161 | + body: { | ||
162 | + type: 'box', | ||
163 | + layout: 'vertical', | ||
164 | + contents: [ | ||
165 | + {type: 'text', text: '시너지'}, | ||
166 | + { | ||
167 | + type: 'text', | ||
168 | + text: traits.join(', '), | ||
169 | + wrap: true | ||
170 | + /*layout: 'horizontal', | ||
171 | + contents: traits.map(e => ({ | ||
172 | + type: 'text', | ||
173 | + text: e | ||
174 | + }))*/ | ||
175 | + }, | ||
176 | + {type: 'text', text: '캐릭터'}, | ||
177 | + { | ||
178 | + type: 'box', | ||
179 | + layout: 'horizontal', | ||
180 | + contents: chars.map(e => ({ | ||
181 | + type: 'image', | ||
182 | + url: `https://jongro3.ga/images/champions/${e.id}.png`, | ||
183 | + size: 'xxs' | ||
184 | + })) | ||
185 | + }, | ||
186 | + {type: 'text', text: chars.map(e => e.name).join(', '), wrap: true}, | ||
187 | + ] | ||
188 | + } | ||
189 | + } | ||
158 | }); | 190 | }); |
159 | } | 191 | } |
160 | 192 | ... | ... |
images/champions/TFT4_Aatrox.png
0 → 100644

10.2 KB
images/champions/TFT4_Ahri.png
0 → 100644

10.7 KB
images/champions/TFT4_Akali.png
0 → 100644

10 KB
images/champions/TFT4_Annie.png
0 → 100644

10.6 KB
images/champions/TFT4_Aphelios.png
0 → 100644

9.4 KB
images/champions/TFT4_Ashe.png
0 → 100644

10.1 KB
images/champions/TFT4_Azir.png
0 → 100644

9.64 KB
images/champions/TFT4_Cassiopeia.png
0 → 100644

9.35 KB
images/champions/TFT4_Diana.png
0 → 100644

9.33 KB
images/champions/TFT4_Elise.png
0 → 100644

10.2 KB
images/champions/TFT4_Evelynn.png
0 → 100644

10.2 KB
images/champions/TFT4_Ezreal.png
0 → 100644

10.7 KB
images/champions/TFT4_Fiora.png
0 → 100644

9.92 KB
images/champions/TFT4_Garen.png
0 → 100644

10.8 KB
images/champions/TFT4_Hecarim.png
0 → 100644

10.6 KB
images/champions/TFT4_Irelia.png
0 → 100644

10.4 KB
images/champions/TFT4_Janna.png
0 → 100644

10 KB
images/champions/TFT4_JarvanIV.png
0 → 100644

9.48 KB
images/champions/TFT4_Jax.png
0 → 100644

11.2 KB
images/champions/TFT4_Jhin.png
0 → 100644

9.99 KB
images/champions/TFT4_Jinx.png
0 → 100644

10.6 KB
images/champions/TFT4_Kalista.png
0 → 100644

10.9 KB
images/champions/TFT4_Katarina.png
0 → 100644

9.75 KB
images/champions/TFT4_Kayn.png
0 → 100644

10.4 KB
images/champions/TFT4_Kennen.png
0 → 100644

10.3 KB
images/champions/TFT4_Kindred.png
0 → 100644

10.5 KB
images/champions/TFT4_LeeSin.png
0 → 100644

10.8 KB
images/champions/TFT4_Lillia.png
0 → 100644

10.2 KB
images/champions/TFT4_Lissandra.png
0 → 100644

10.5 KB
images/champions/TFT4_Lulu.png
0 → 100644

11.1 KB
images/champions/TFT4_Lux.png
0 → 100644

10.6 KB
images/champions/TFT4_Maokai.png
0 → 100644

10.2 KB
images/champions/TFT4_Morgana.png
0 → 100644

11 KB
images/champions/TFT4_Nami.png
0 → 100644

8.93 KB
images/champions/TFT4_Nidalee.png
0 → 100644

9.56 KB
images/champions/TFT4_Nunu.png
0 → 100644

10.9 KB
images/champions/TFT4_Pyke.png
0 → 100644

9.71 KB
images/champions/TFT4_Riven.png
0 → 100644

10.3 KB
images/champions/TFT4_Sejuani.png
0 → 100644

11.2 KB
images/champions/TFT4_Sett.png
0 → 100644

10.4 KB
images/champions/TFT4_Shen.png
0 → 100644

9.87 KB
images/champions/TFT4_Sylas.png
0 → 100644

9.42 KB
images/champions/TFT4_TahmKench.png
0 → 100644

11 KB
images/champions/TFT4_Talon.png
0 → 100644

10.4 KB
images/champions/TFT4_Teemo.png
0 → 100644

10.1 KB
images/champions/TFT4_Thresh.png
0 → 100644

10.5 KB
images/champions/TFT4_TwistedFate.png
0 → 100644

9.14 KB
images/champions/TFT4_Vayne.png
0 → 100644

9.39 KB
images/champions/TFT4_Veigar.png
0 → 100644

10.7 KB
images/champions/TFT4_Vi.png
0 → 100644

10.1 KB
images/champions/TFT4_Warwick.png
0 → 100644

11.5 KB
images/champions/TFT4_Wukong.png
0 → 100644

11.4 KB
images/champions/TFT4_XinZhao.png
0 → 100644

11.4 KB
images/champions/TFT4_Yasuo.png
0 → 100644

10.5 KB
images/champions/TFT4_Yone.png
0 → 100644

10.7 KB
images/champions/TFT4_Yuumi.png
0 → 100644

10.9 KB
images/champions/TFT4_Zed.png
0 → 100644

10.7 KB
images/champions/TFT4_Zilean.png
0 → 100644

11.7 KB
-
Please register or login to post a comment