-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathecofunc.js
More file actions
24 lines (23 loc) · 796 Bytes
/
ecofunc.js
File metadata and controls
24 lines (23 loc) · 796 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/*
* Antique-gold
* Copyright (C) 2021 DevZ-Org
* This software is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International
* For more information, see README.md and LICENSE
*/
module.exports = {
match: function(msg, i) {
if (!msg) return 0;
if (!i) return 0;
let user = i.members.cache.find(
m =>
m.user.username.toLowerCase().startsWith(msg) ||
m.user.username.toLowerCase() === msg ||
m.user.username.toLowerCase().includes(msg) ||
m.displayName.toLowerCase().startsWith(msg) ||
m.displayName.toLowerCase() === msg ||
m.displayName.toLowerCase().includes(msg)
);
if (!user) return undefined;
return user.user;
}
};