feature: reactions
This commit is contained in:
parent
6500d9a9be
commit
b8467ec870
16 changed files with 2603 additions and 383 deletions
|
|
@ -1,9 +1,7 @@
|
|||
import { by_character, by_lurid } from '@andyburke/fsdb/organizers';
|
||||
import { FSDB_COLLECTION } from '@andyburke/fsdb';
|
||||
import { FSDB_INDEXER_SYMLINKS } from '@andyburke/fsdb/indexers';
|
||||
import { EMOJI_MAP as JS_EMOJI_MAP } from '../public/js/emojis/en.js';
|
||||
|
||||
const EMOJI_MAP: Record<string, string[]> = JS_EMOJI_MAP;
|
||||
import { EMOJIS } from '../public/js/emojis/en.ts';
|
||||
|
||||
/**
|
||||
* @typedef {object} TIMESTAMPS
|
||||
|
|
@ -124,7 +122,7 @@ export function VALIDATE_EVENT(event: EVENT) {
|
|||
cause: 'reaction_must_be_an_emoji',
|
||||
message: 'A reaction event must have a `data.reaction` that is an emoji.'
|
||||
});
|
||||
} else if (typeof EMOJI_MAP[event.data.reaction] === 'undefined') {
|
||||
} else if (typeof EMOJIS.MAP[event.data?.reaction] === 'undefined') {
|
||||
errors.push({
|
||||
cause: 'reaction_must_be_an_emoji',
|
||||
message: 'A reaction event must have a `data.reaction` that is an emoji.'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue