@@ -11,7 +11,7 @@ import { cache } from '../../core/cache';
11
11
import { removeEmoji , removePunctuation } from '../../helpers/regex.helper' ;
12
12
13
13
const ONE_MINUTE = 1 * 60 * 1000 ;
14
- const MUTED_BY_BOT = 'Muted by bot ' ;
14
+ const MUTED_ON_COUBEH = 'Muted on Coubeh ' ;
15
15
16
16
const quoiDetectorRegex = / \b q u o i \s * $ / i;
17
17
const endWithQuoi = ( text : string ) => quoiDetectorRegex . test ( removeEmoji ( removePunctuation ( text ) ) ) ;
@@ -32,7 +32,7 @@ const reactWithCoubeh = async (message: Message) => {
32
32
await message . react ( '🇭' ) ;
33
33
await message . react ( '🔇' ) ;
34
34
35
- const mutedRole = message . guild ?. roles . cache . find ( ( r ) => r . name === MUTED_BY_BOT ) ;
35
+ const mutedRole = message . guild ?. roles . cache . find ( ( r ) => r . name === MUTED_ON_COUBEH ) ;
36
36
37
37
if ( ! mutedRole ?. id ) return ;
38
38
@@ -63,20 +63,20 @@ export const createRoleMutedByBot = async (guild: Guild | null): Promise<Role> =
63
63
if ( ! guild ) {
64
64
throw new Error ( 'Guild is null in createRoleMutedByBot' ) ;
65
65
}
66
- const existingMutedByBot = guild . roles . cache . find ( ( role ) => role . name === MUTED_BY_BOT ) ;
66
+ const existingMutedByBot = guild . roles . cache . find ( ( role ) => role . name === MUTED_ON_COUBEH ) ;
67
67
68
68
return (
69
69
existingMutedByBot ??
70
70
guild . roles . create ( {
71
- name : MUTED_BY_BOT ,
71
+ name : MUTED_ON_COUBEH ,
72
72
} )
73
73
) ;
74
74
} ;
75
75
76
76
export const deleteRoleMutedByBot = async ( client : Client < true > ) : Promise < void > => {
77
77
const guilds = await client . guilds . fetch ( ) . then ( ( guilds ) => guilds . map ( ( guild ) => guild . fetch ( ) ) ) ;
78
78
const roles = await Promise . all ( guilds ) . then ( ( guilds ) =>
79
- guilds . map ( ( guild ) => guild . roles . cache . find ( ( role ) => role . name === MUTED_BY_BOT ) ) ,
79
+ guilds . map ( ( guild ) => guild . roles . cache . find ( ( role ) => role . name === MUTED_ON_COUBEH ) ) ,
80
80
) ;
81
81
82
82
for ( const role of roles ) {
@@ -118,7 +118,7 @@ export const removeQuoiFeurFromChannel = async (interaction: ChatInputCommandInt
118
118
return ;
119
119
}
120
120
121
- const role = interaction . guild ?. roles . cache . find ( ( r ) => r . name === MUTED_BY_BOT ) ;
121
+ const role = interaction . guild ?. roles . cache . find ( ( r ) => r . name === MUTED_ON_COUBEH ) ;
122
122
if ( role ) {
123
123
await channel . permissionOverwrites . delete ( role ) ;
124
124
}
0 commit comments