Transitioned all Misc, audio, Selmer Specific, admin, anime/manga, and inventory commands to Slash Command format. The RSS and reactionrole commands are still broken and all game commands are still in message format due to compications

This commit is contained in:
ION606
2022-09-27 16:45:50 -04:00
parent a190a250a6
commit e1002d748d
45 changed files with 1951 additions and 1058 deletions
+26
View File
@@ -0,0 +1,26 @@
/**
* Check if the user has a premium subscription
* @param {*} bot
* @param {String} userId
* @returns {Promise<Boolean>}
*/
function verPremium(bot, userId) {
return new Promise((resolve, reject) => {
const member = bot.guilds.cache.get(bot.home_server).members.cache.get(userId);
bot.mongoconnection.then(async (client) => {
const dbo = client.db('main').collection('authorized');
dbo.findOne({ discordID: userId }).then((doc) => {
//Only available to Selmer Bot devs, testers and "authorized" users
if (doc != undefined || member && (member.roles.cache.has('944048889038774302') || member.roles.cache.has('946610800418762792'))) {
resolve(true);
} else {
reject("You have to be a premium subscriber to use this feature!\n_support coming soon_");
}
});
});
});
}
module.exports = { verPremium }