stuff
This commit is contained in:
parent
20353c20cf
commit
cd9dbdecc9
|
@ -2175,14 +2175,13 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
BDFDB.UserUtils = {};
|
BDFDB.UserUtils = {};
|
||||||
var myDataUser = LibraryModules.CurrentUserStore ? LibraryModules.CurrentUserStore.getCurrentUser() : null;
|
|
||||||
BDFDB.UserUtils.is = function (user) {
|
BDFDB.UserUtils.is = function (user) {
|
||||||
return user && user instanceof BDFDB.DiscordObjects.User;
|
return user && user instanceof BDFDB.DiscordObjects.User;
|
||||||
};
|
};
|
||||||
|
var myDataUser = LibraryModules.CurrentUserStore && LibraryModules.CurrentUserStore.getCurrentUser();
|
||||||
BDFDB.UserUtils.me = new Proxy(myDataUser || {}, {
|
BDFDB.UserUtils.me = new Proxy(myDataUser || {}, {
|
||||||
get: function (list, item) {
|
get: function (list, item) {
|
||||||
if (!myDataUser) myDataUser = LibraryModules.CurrentUserStore.getCurrentUser();
|
return (myDataUser = LibraryModules.CurrentUserStore.getCurrentUser()) != null && myDataUser[item];
|
||||||
return myDataUser ? myDataUser[item] : null;
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
BDFDB.UserUtils.getStatus = function (id = BDFDB.UserUtils.me.id) {
|
BDFDB.UserUtils.getStatus = function (id = BDFDB.UserUtils.me.id) {
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue