tmp commit
This commit is contained in:
parent
c913267f02
commit
340896c553
4 changed files with 23 additions and 0 deletions
|
@ -20,6 +20,7 @@
|
|||
"discord.js": "^13.6.0",
|
||||
"dotenv": "^16.0.0",
|
||||
"form-data": "^4.0.0",
|
||||
"json5": "^2.2.1",
|
||||
"log75": "^2.2.0",
|
||||
"monk": "^7.3.4",
|
||||
"prom-client": "^14.0.1",
|
||||
|
|
12
bridge/src/discord/bridgeEmojis.ts
Normal file
12
bridge/src/discord/bridgeEmojis.ts
Normal 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());
|
||||
}
|
5
bridge/src/types/DiscordBridgedEmoji.ts
Normal file
5
bridge/src/types/DiscordBridgedEmoji.ts
Normal file
|
@ -0,0 +1,5 @@
|
|||
export default class {
|
||||
name: string;
|
||||
emojiid: string;
|
||||
animated: boolean;
|
||||
}
|
|
@ -315,6 +315,11 @@ js-yaml@^4.1.0:
|
|||
dependencies:
|
||||
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:
|
||||
version "4.6.1"
|
||||
resolved "https://registry.yarnpkg.com/lodash.defaultsdeep/-/lodash.defaultsdeep-4.6.1.tgz#512e9bd721d272d94e3d3a63653fa17516741ca6"
|
||||
|
|
Loading…
Reference in a new issue