tmp commit

This commit is contained in:
JandereDev 2022-05-01 11:12:55 +02:00
parent c913267f02
commit 340896c553
Signed by: Lea
GPG key ID: 5D5E18ACB990F57A
4 changed files with 23 additions and 0 deletions

View file

@ -20,6 +20,7 @@
"discord.js": "^13.6.0", "discord.js": "^13.6.0",
"dotenv": "^16.0.0", "dotenv": "^16.0.0",
"form-data": "^4.0.0", "form-data": "^4.0.0",
"json5": "^2.2.1",
"log75": "^2.2.0", "log75": "^2.2.0",
"monk": "^7.3.4", "monk": "^7.3.4",
"prom-client": "^14.0.1", "prom-client": "^14.0.1",

View file

@ -0,0 +1,12 @@
import axios from "axios";
import JSON5 from 'json5';
const EMOJI_DICT_URL = 'https://raw.githubusercontent.com/revoltchat/revite/master/src/assets/emojis.ts';
async function fetchEmojiList(): Promise<Record<string, string>> {
const file: string = (await axios.get(EMOJI_DICT_URL)).data;
const start = file.indexOf('...{') + 3;
const end = file.indexOf('},') + 1;
return JSON5.parse(file.substring(start, end).trim());
}

View file

@ -0,0 +1,5 @@
export default class {
name: string;
emojiid: string;
animated: boolean;
}

View file

@ -315,6 +315,11 @@ js-yaml@^4.1.0:
dependencies: dependencies:
argparse "^2.0.1" argparse "^2.0.1"
json5@^2.2.1:
version "2.2.1"
resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.1.tgz#655d50ed1e6f95ad1a3caababd2b0efda10b395c"
integrity sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==
lodash.defaultsdeep@^4.6.1: lodash.defaultsdeep@^4.6.1:
version "4.6.1" version "4.6.1"
resolved "https://registry.yarnpkg.com/lodash.defaultsdeep/-/lodash.defaultsdeep-4.6.1.tgz#512e9bd721d272d94e3d3a63653fa17516741ca6" resolved "https://registry.yarnpkg.com/lodash.defaultsdeep/-/lodash.defaultsdeep-4.6.1.tgz#512e9bd721d272d94e3d3a63653fa17516741ca6"