pineafan | 4f164f3 | 2022-02-26 22:07:12 +0000 | [diff] [blame^] | 1 | import emojis from '../config/emojis.json' assert {type: 'json'}; |
2 | |||||
3 | function getEmojiByName(name: string): string { | ||||
4 | let split = name.split("."); | ||||
5 | let id = emojis | ||||
6 | split.forEach(part => { | ||||
7 | id = id[part]; | ||||
8 | }); | ||||
9 | return `<:a:${id}>`; | ||||
10 | } | ||||
11 | |||||
12 | export default getEmojiByName; |