2
0
Files
bot/packages/scripts/prepareEmojis.ts
Baptiste Arnaud ee338f62dc build: add pnpm
2022-08-10 18:49:06 +02:00

34 lines
1.1 KiB
TypeScript

import fs from 'fs'
export const prepareEmojis = () => {
const emojiData = JSON.parse(fs.readFileSync('./emojiData.json', 'utf8'))
const strippedEmojiData = {
'Smileys & Emotion': emojiData['Smileys & Emotion'].map(
(emoji: { emoji: any }) => emoji.emoji
),
'People & Body': emojiData['People & Body'].map(
(emoji: { emoji: any }) => emoji.emoji
),
'Animals & Nature': emojiData['Animals & Nature'].map(
(emoji: { emoji: any }) => emoji.emoji
),
'Food & Drink': emojiData['Food & Drink'].map(
(emoji: { emoji: any }) => emoji.emoji
),
'Travel & Places': emojiData['Travel & Places'].map(
(emoji: { emoji: any }) => emoji.emoji
),
Activities: emojiData['Activities'].map(
(emoji: { emoji: any }) => emoji.emoji
),
Objects: emojiData['Objects'].map((emoji: { emoji: any }) => emoji.emoji),
Symbols: emojiData['Symbols'].map((emoji: { emoji: any }) => emoji.emoji),
Flags: emojiData['Flags'].map((emoji: { emoji: any }) => emoji.emoji),
}
fs.writeFileSync(
'strippedEmojis.json',
JSON.stringify(strippedEmojiData),
'utf8'
)
}