mirror of
https://github.com/kirameki-cafe/Yumi.git
synced 2026-09-13 10:49:20 +00:00
Added Users services
This commit is contained in:
@@ -0,0 +1,20 @@
|
|||||||
|
import { User, Snowflake } from "discord.js";
|
||||||
|
import Environment from "../providers/Environment";
|
||||||
|
|
||||||
|
class Users {
|
||||||
|
public static isDeveloper(user: User | Snowflake) {
|
||||||
|
const developers: Snowflake[] = (Environment.get().DEVELOPER_IDS).split(',');
|
||||||
|
|
||||||
|
let userID;
|
||||||
|
|
||||||
|
if(user instanceof User)
|
||||||
|
userID = user.id;
|
||||||
|
else
|
||||||
|
userID = user;
|
||||||
|
|
||||||
|
return developers.includes(userID);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Users;
|
||||||
Reference in New Issue
Block a user