mirror of
https://github.com/cassoule/flopobot_v2.git
synced 2026-01-18 16:37:40 +01:00
Merge pull request #32 from cassoule/poker-debug
less console logs and AKHY/VOTING roles dissociated
This commit is contained in:
3
index.js
3
index.js
@@ -98,7 +98,7 @@ async function getAkhys() {
|
||||
const guild = await client.guilds.fetch(process.env.GUILD_ID);
|
||||
const members = await guild.members.fetch(); // Fetch all members
|
||||
|
||||
const akhys = members.filter(m => !m.user.bot && m.roles.cache.has(process.env.VOTING_ROLE_ID));
|
||||
const akhys = members.filter(m => !m.user.bot && m.roles.cache.has(process.env.AKHY_ROLE_ID));
|
||||
|
||||
akhys.forEach(akhy => {
|
||||
akhysData.set(akhy.user.id, {
|
||||
@@ -4285,7 +4285,6 @@ io.on('connection', (socket) => {
|
||||
|
||||
socket.on('user-connected', async (user) => {
|
||||
const username = getUser.get(user)
|
||||
console.log(`user connected: ${username?.username ?? '-'}`);
|
||||
|
||||
queue = queue.filter(obj => obj !== user)
|
||||
let names = [];
|
||||
|
||||
@@ -53,7 +53,7 @@ export const getUserInventory = flopoDB.prepare('SELECT * FROM skins WHERE user_
|
||||
export const getTopSkins = flopoDB.prepare('SELECT * FROM skins ORDER BY maxPrice DESC LIMIT 10');
|
||||
|
||||
export const insertManyUsers = flopoDB.transaction(async (users) => {
|
||||
for (const user of users) try { await insertUser.run(user) } catch (e) { console.log('user insert failed (might already exists)') }
|
||||
for (const user of users) try { await insertUser.run(user) } catch (e) { /**/ }
|
||||
});
|
||||
export const updateManyUsers = flopoDB.transaction(async (users) => {
|
||||
for (const user of users) try { await updateUser.run(user) } catch (e) { console.log('user update failed') }
|
||||
|
||||
Reference in New Issue
Block a user