Batimius
Batimius
Explore posts from servers
DIAdiscord.js - Imagine an app
Created by Batimius on 9/19/2023 in #djs-questions
Slash Command Guild Permission Overwrite
Here is the entire function if it is of any help:
5 replies
DIAdiscord.js - Imagine an app
Created by Batimius on 8/5/2023 in #djs-voice
Is it possible to fetch a subscribed AudioPlayer from a VoiceConnection?
Thank you!
5 replies
DIAdiscord.js - Imagine an app
Created by Batimius on 8/5/2023 in #djs-voice
Is it possible to fetch a subscribed AudioPlayer from a VoiceConnection?
Oh I see.
5 replies
DIAdiscord.js - Imagine an app
Created by Batimius on 8/5/2023 in #djs-voice
Is it possible to fetch a subscribed AudioPlayer from a VoiceConnection?
Did they just forget to include it in the docs and in TS map?
5 replies
DIAdiscord.js - Imagine an app
Created by Batimius on 8/5/2023 in #djs-voice
Is it possible to fetch a subscribed AudioPlayer from a VoiceConnection?
5 replies
DIAdiscord.js - Imagine an app
Created by Batimius on 8/1/2023 in #djs-questions
TypeScript .getSubcommand() issue
Yep. It works perfectly. Thank you for the help!
5 replies
DIAdiscord.js - Imagine an app
Created by Batimius on 8/1/2023 in #djs-questions
TypeScript .getSubcommand() issue
Ah, I see. I'll try that and send an update here.
5 replies
DIAdiscord.js - Imagine an app
Created by Batimius on 8/1/2023 in #djs-questions
TypeScript .getSubcommand() issue
static startup() {
try {
SlashCommandBase.client.on('interactionCreate', async inter => {
if (!inter.isCommand()) return

try {
if (inter.user.id === SlashCommandBase.client.user.id) return
let subCommand = inter.options.getSubcommand(false)
if (subCommand) {
if (subCommand in SlashCommandBase.commandSubGroups) {
let command = SlashCommandBase.commandSubGroups[subCommand]
if (command.commandEnabled) {
await command.invoke(inter)
} else {
await inter.reply({content: `${inter.user}, Command is disabled.`, ephemeral: true})
}
}
return
}

if (inter.commandName in SlashCommandBase.commands) {
let command = SlashCommandBase.commands[inter.commandName]
if (command.commandEnabled) {
await command.invoke(inter as ChatInputCommandInteraction)
} else {
await inter.reply({content: `${inter.user}, Command is disabled.`, ephemeral: true})
}
}
} catch (error) {
console.error(error)
}
});
} catch {
return
}

SlashCommandBase.clientReady = true
}
static startup() {
try {
SlashCommandBase.client.on('interactionCreate', async inter => {
if (!inter.isCommand()) return

try {
if (inter.user.id === SlashCommandBase.client.user.id) return
let subCommand = inter.options.getSubcommand(false)
if (subCommand) {
if (subCommand in SlashCommandBase.commandSubGroups) {
let command = SlashCommandBase.commandSubGroups[subCommand]
if (command.commandEnabled) {
await command.invoke(inter)
} else {
await inter.reply({content: `${inter.user}, Command is disabled.`, ephemeral: true})
}
}
return
}

if (inter.commandName in SlashCommandBase.commands) {
let command = SlashCommandBase.commands[inter.commandName]
if (command.commandEnabled) {
await command.invoke(inter as ChatInputCommandInteraction)
} else {
await inter.reply({content: `${inter.user}, Command is disabled.`, ephemeral: true})
}
}
} catch (error) {
console.error(error)
}
});
} catch {
return
}

SlashCommandBase.clientReady = true
}
5 replies
DIAdiscord.js - Imagine an app
Created by Batimius on 1/5/2023 in #djs-questions
What is the difference between guildMemberAdd and guildMemberAvailable?
Got it. Thank you for the information.
4 replies
DIAdiscord.js - Imagine an app
Created by Batimius on 1/5/2023 in #djs-questions
What is the difference between guildMemberAdd and guildMemberAvailable?
So in terms of using it instead of guildMemberAdd, I was completely off, right?
4 replies
DIAdiscord.js - Imagine an app
Created by Batimius on 1/3/2023 in #djs-questions
How would I convert a URL into an attachment?
I didn't try it, but thank you for your help regardless.
6 replies
DIAdiscord.js - Imagine an app
Created by Batimius on 1/3/2023 in #djs-questions
How would I convert a URL into an attachment?
That worked for me. Thank you for your help.
6 replies
DIAdiscord.js - Imagine an app
Created by Batimius on 1/3/2023 in #djs-questions
Attaching already existing attachments to message
Regardless, thank you for your help, it is truly appreciated.
10 replies
DIAdiscord.js - Imagine an app
Created by Batimius on 1/3/2023 in #djs-questions
Attaching already existing attachments to message
Worked, I just had to use message.attachments.values(). Here's how the final line looks (for anyone who might have the same issue in the future):
await logChannel.send({embeds: [embed, ...message.embeds], files: [...message.attachments.values()], stickers: [...message.stickers]})
await logChannel.send({embeds: [embed, ...message.embeds], files: [...message.attachments.values()], stickers: [...message.stickers]})
10 replies
DIAdiscord.js - Imagine an app
Created by Batimius on 1/3/2023 in #djs-questions
Attaching already existing attachments to message
My intelligence strikes once more. Object.values() does not work on Collections. I used message.attachments.values() and it worked perfectly.
10 replies
DIAdiscord.js - Imagine an app
Created by Batimius on 1/3/2023 in #djs-questions
Attaching already existing attachments to message
Alright, so right after posting, I figured out that the problem is that message.attachments is a Collection. Using Object.map(message.attachments) seems to suppress the error, but it won't attach the image.
10 replies
DIAdiscord.js - Imagine an app
Created by Batimius on 1/2/2023 in #djs-questions
Best way to find and delete user messages
Thank you for your help regardless, it is truly appreciated.
16 replies
DIAdiscord.js - Imagine an app
Created by Batimius on 1/2/2023 in #djs-questions
Best way to find and delete user messages
I intended to make a purge command similar to Dyno's, but I guess until Discord adds some type of message searching API (like how we can do Ctrl + F and filter through messages), there isn't much I can do.
16 replies
DIAdiscord.js - Imagine an app
Created by Batimius on 1/2/2023 in #djs-questions
Best way to find and delete user messages
Well, that's unfortunate.
16 replies