Remove mafia (Storyteller exists now)

This commit is contained in:
Dragon Fire
2019-06-26 17:28:43 -04:00
parent a8beea127b
commit 1359d044f2
7 changed files with 2 additions and 414 deletions
-26
View File
@@ -75,32 +75,6 @@ module.exports = class Util {
return today;
}
static async awaitPlayers(msg, max, min, { time = 30000, dmCheck = false } = {}) {
const joined = [];
joined.push(msg.author.id);
const filter = res => {
if (res.author.bot) return false;
if (joined.includes(res.author.id)) return false;
if (res.content.toLowerCase() !== 'join game') return false;
joined.push(res.author.id);
res.react(SUCCESS_EMOJI_ID || '✅').catch(() => null);
return true;
};
const verify = await msg.channel.awaitMessages(filter, { max, time });
verify.set(msg.id, msg);
if (dmCheck) {
for (const message of verify.values()) {
try {
await message.author.send('Hi! Just testing that DMs work, pay this no mind.');
} catch (err) {
verify.delete(message.id);
}
}
}
if (verify.size < min) return false;
return verify.map(message => message.author);
}
static async verify(channel, user, time = 30000) {
const filter = res => {
const value = res.content.toLowerCase();