victorr
victorr
DIAdiscord.js - Imagine an app
Created by victorr on 7/30/2023 in #djs-questions
Unmute button not working
Yeah, found a work around however. Just had to decline any requests to speak before moving members.
6 replies
DIAdiscord.js - Imagine an app
Created by victorr on 7/30/2023 in #djs-questions
Unmute button not working
Update To completely isolate the issue, I have just tested with 3 accounts - One being the host - One being an audience member with their hand up - One being an audience member without their hand up The problem above occurred ONLY to the member with their hand up
6 replies
DIAdiscord.js - Imagine an app
Created by victorr on 7/30/2023 in #djs-questions
Unmute button not working
My code for the end-stage button: https://sourceb.in/lxJ34lCAO8
6 replies
DIAdiscord.js - Imagine an app
Created by victorr on 7/30/2023 in #djs-questions
Unmute button not working
6 replies
DIAdiscord.js - Imagine an app
Created by victorr on 7/17/2023 in #djs-questions
presenceUpdate event emitter doesn't return activity channelId
Ah gotcha, thank you very much.
4 replies
DIAdiscord.js - Imagine an app
Created by victorr on 7/1/2023 in #djs-questions
Activity Filtering
Nevermind, I think I can just filter it out by checking the activity array length
14 replies
DIAdiscord.js - Imagine an app
Created by victorr on 7/1/2023 in #djs-questions
Activity Filtering
Sorry about the delay, I had to do something else but; newPresence.activities[0].flags logs: ActivityFlagsBitField { bitfield: 256 }
14 replies
DIAdiscord.js - Imagine an app
Created by victorr on 7/16/2023 in #djs-questions
Emitter Not Firing
🙏
45 replies
DIAdiscord.js - Imagine an app
Created by victorr on 7/16/2023 in #djs-questions
Emitter Not Firing
Thank you very much, you're a life saver.
45 replies
DIAdiscord.js - Imagine an app
Created by victorr on 7/16/2023 in #djs-questions
Emitter Not Firing
Yep, seems to be working now.
45 replies
DIAdiscord.js - Imagine an app
Created by victorr on 7/16/2023 in #djs-questions
Emitter Not Firing
I think it should be this:
const { statSync } = require("node:fs");
const directorySearch = require("node-recursive-directory");
module.exports = async(client, rootPath) => {
const clientEventsFiles = await directorySearch(`${rootPath}/Src/Events`);
clientEventsFiles.forEach(eventFile => {
if (statSync(eventFile).isDirectory()) return;
const clientEvent = require(eventFile);
if (clientEvent.ignore || !clientEvent.name || !clientEvent.run) return;

client.events.set(clientEvent.name, clientEvent);
if (clientEvent.customEvent) return clientEvent.run(client, rootPath);

if (clientEvent.runOnce) client.once(clientEvent.name, (...args) => clientEvent.run(...args, client, rootPath));
else client.on(clientEvent.name, (...args) => clientEvent.run(...args, client, rootPath));
});
};
const { statSync } = require("node:fs");
const directorySearch = require("node-recursive-directory");
module.exports = async(client, rootPath) => {
const clientEventsFiles = await directorySearch(`${rootPath}/Src/Events`);
clientEventsFiles.forEach(eventFile => {
if (statSync(eventFile).isDirectory()) return;
const clientEvent = require(eventFile);
if (clientEvent.ignore || !clientEvent.name || !clientEvent.run) return;

client.events.set(clientEvent.name, clientEvent);
if (clientEvent.customEvent) return clientEvent.run(client, rootPath);

if (clientEvent.runOnce) client.once(clientEvent.name, (...args) => clientEvent.run(...args, client, rootPath));
else client.on(clientEvent.name, (...args) => clientEvent.run(...args, client, rootPath));
});
};
45 replies
DIAdiscord.js - Imagine an app
Created by victorr on 7/16/2023 in #djs-questions
Emitter Not Firing
Uh, where can I check this? I'm not 100% sure
45 replies
DIAdiscord.js - Imagine an app
Created by victorr on 7/16/2023 in #djs-questions
Emitter Not Firing
Ah right I see
45 replies
DIAdiscord.js - Imagine an app
Created by victorr on 7/16/2023 in #djs-questions
Emitter Not Firing
Ah so I just use voiceStateUpdate?
45 replies
DIAdiscord.js - Imagine an app
Created by victorr on 7/16/2023 in #djs-questions
Emitter Not Firing
Mhm
45 replies
DIAdiscord.js - Imagine an app
Created by victorr on 7/16/2023 in #djs-questions
Emitter Not Firing
const commandOptionsProcessor = require("../Structures/CommandOptions/Processor");
module.exports = {
name: 'interactionCreate',
run: async (interaction, client) => {
if (interaction.isChatInputCommand() || interaction.isContextMenuCommand()) {
const slashCommand = client.slashCommands.get(interaction.commandName);
if (!slashCommand) return;
const authenticatedCMDOptions = await commandOptionsProcessor(client, interaction, slashCommand, true, "SlashCommand");
if (authenticatedCMDOptions) return await slashCommand.run(client, interaction);
}
else if (interaction.isAnySelectMenu()) {
const selectMenuCommand = client.selectMenus.get(interaction.values[0]) ?? client.selectMenus.get(interaction.customId);
if (!selectMenuCommand) return;
const authenticatedCMDOptions = await commandOptionsProcessor(client, interaction, selectMenuCommand, true, "SelectMenu");
if (authenticatedCMDOptions) return await selectMenuCommand.run(client, interaction);
}
else if (interaction.isButton()) {
const buttonInteraction = client.buttonCommands.get(interaction.customId);
if (!buttonInteraction) return;
const authenticatedCMDOptions = await commandOptionsProcessor(client, interaction, buttonInteraction, true, "Button");
if (authenticatedCMDOptions) return await buttonInteraction.run(client, interaction);
}
else if (interaction.isModalSubmit()) {
const modalInteraction = client.modalForms.get(interaction.customId);
if (!modalInteraction) return;
const authenticatedCMDOptions = await commandOptionsProcessor(client, interaction, modalInteraction, true, "ModalForm");
if (authenticatedCMDOptions) return await modalInteraction.run(client, interaction);
}
}
};
const commandOptionsProcessor = require("../Structures/CommandOptions/Processor");
module.exports = {
name: 'interactionCreate',
run: async (interaction, client) => {
if (interaction.isChatInputCommand() || interaction.isContextMenuCommand()) {
const slashCommand = client.slashCommands.get(interaction.commandName);
if (!slashCommand) return;
const authenticatedCMDOptions = await commandOptionsProcessor(client, interaction, slashCommand, true, "SlashCommand");
if (authenticatedCMDOptions) return await slashCommand.run(client, interaction);
}
else if (interaction.isAnySelectMenu()) {
const selectMenuCommand = client.selectMenus.get(interaction.values[0]) ?? client.selectMenus.get(interaction.customId);
if (!selectMenuCommand) return;
const authenticatedCMDOptions = await commandOptionsProcessor(client, interaction, selectMenuCommand, true, "SelectMenu");
if (authenticatedCMDOptions) return await selectMenuCommand.run(client, interaction);
}
else if (interaction.isButton()) {
const buttonInteraction = client.buttonCommands.get(interaction.customId);
if (!buttonInteraction) return;
const authenticatedCMDOptions = await commandOptionsProcessor(client, interaction, buttonInteraction, true, "Button");
if (authenticatedCMDOptions) return await buttonInteraction.run(client, interaction);
}
else if (interaction.isModalSubmit()) {
const modalInteraction = client.modalForms.get(interaction.customId);
if (!modalInteraction) return;
const authenticatedCMDOptions = await commandOptionsProcessor(client, interaction, modalInteraction, true, "ModalForm");
if (authenticatedCMDOptions) return await modalInteraction.run(client, interaction);
}
}
};
45 replies
DIAdiscord.js - Imagine an app
Created by victorr on 7/16/2023 in #djs-questions
Emitter Not Firing
45 replies
DIAdiscord.js - Imagine an app
Created by victorr on 7/16/2023 in #djs-questions
Emitter Not Firing
Sure
45 replies
DIAdiscord.js - Imagine an app
Created by victorr on 7/16/2023 in #djs-questions
Emitter Not Firing
I'll take a look now, and see if I can get it to work
45 replies
DIAdiscord.js - Imagine an app
Created by victorr on 7/16/2023 in #djs-questions
Emitter Not Firing
The handler didn't include a voiceStateUpdate event, and tbh I wasn't 100% sure how to adapt it
45 replies