7
7
} from 'discord.js' ;
8
8
9
9
import { cache } from '../../core/cache' ;
10
+ import type { Emoji } from '../../helpers/emoji' ;
11
+ import { EMOJI } from '../../helpers/emoji' ;
10
12
import {
11
13
removeEmoji ,
12
14
removeMarkdown ,
@@ -20,16 +22,17 @@ const quoiDetectorRegex = /\bquoi\s*$/i;
20
22
const endWithQuoi = ( text : string ) =>
21
23
quoiDetectorRegex . test ( removeNonASCII ( removeEmoji ( removePunctuation ( removeMarkdown ( text ) ) ) ) ) ;
22
24
23
- const reactWith = async ( message : Message , reactions : string [ ] ) => {
25
+ const reactWith = async ( message : Message , reactions : Emoji [ ] ) => {
24
26
for ( const reaction of reactions ) {
25
27
await message . react ( reaction ) ;
26
28
}
27
29
} ;
28
30
29
31
const reactWithCoubeh = async ( message : Message ) =>
30
- reactWith ( message , [ '🇨' , '🇴' , '🇺' , '🇧' , '🇪' , '🇭' , '🔇' ] ) ;
32
+ reactWith ( message , [ EMOJI . C , EMOJI . O , EMOJI . U , EMOJI . B , EMOJI . E , EMOJI . H , EMOJI . MUTED ] ) ;
31
33
32
- const reactWithFeur = async ( message : Message ) => reactWith ( message , [ '🇫' , '🇪' , '🇺' , '🇷' ] ) ;
34
+ const reactWithFeur = async ( message : Message ) =>
35
+ reactWith ( message , [ EMOJI . F , EMOJI . E , EMOJI . U , EMOJI . R ] ) ;
33
36
34
37
export const reactOnEndWithQuoi = async ( message : Message ) => {
35
38
if ( ! endWithQuoi ( message . content ) ) return ;
0 commit comments