Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ISW Leuven
ISW General
discord-bot
Commits
98e38019
Commit
98e38019
authored
Jun 02, 2021
by
Sigfried Seldeslachts
Browse files
Male word detector fix
parent
65a813c1
Pipeline
#10661
passed with stage
in 30 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/events/message/maleWordDetector.js
View file @
98e38019
const
words
=
[
'
man
'
,
'
guys
'
,
'
guyz
'
,
'
gentlemen
'
,
'
men
'
,
'
male
'
,
'
boys
'
,
'
manne
'
,
'
mannen
'
];
module
.
exports
=
async
(
msg
)
=>
{
if
(
msg
.
author
.
bot
)
return
;
if
(
typeof
msg
.
content
!==
"
string
"
)
return
;
try
{
const
split
=
msg
.
content
.
split
(
'
'
);
const
matches
=
words
.
some
(
word
=>
split
.
includes
(
word
));
const
split
=
msg
.
content
.
split
(
'
'
);
const
matches
=
words
.
some
(
word
=>
split
.
includes
(
word
));
if
(
matches
)
{
msg
.
react
(
"
👙
"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment