Jay
Jay
DIAdiscord.js - Imagine an app
Created by Jay on 10/26/2024 in #djs-questions
How to get how many users have installed the app
actually nvm, i found what discord gives to us via client.application.approximateUserInstallCount after digging through the network logs for the discord.dev page. if there is a better method to this though it would be great to know what the method is
5 replies
DIAdiscord.js - Imagine an app
Created by Jay on 10/26/2024 in #djs-questions
How to get how many users have installed the app
I did take a scan through Client on the documentation but it appears Users is legit all the users that the bot has access to which isn't going to be the right value
5 replies
DIAdiscord.js - Imagine an app
Created by Jay on 8/9/2023 in #djs-questions
@discordjs/core interaction create type error
there we go! thank you so much!
8 replies
DIAdiscord.js - Imagine an app
Created by Jay on 8/9/2023 in #djs-questions
@discordjs/core interaction create type error
hm, using both of the things you just mentioned, typescript is still giving me the name error, is it possible for you to give me a quick snippet of what you mean incase I am missing something?
8 replies
DIAdiscord.js - Imagine an app
Created by Jay on 8/9/2023 in #djs-questions
@discordjs/core interaction create type error
I forgot about that part! Thanks Duck, let me try get this working then
8 replies
DIAdiscord.js - Imagine an app
Created by sometroller77 on 8/8/2023 in #djs-voice
Audio not playing
you put a single backslash before Downloads on the path. that may be your issue
11 replies
DIAdiscord.js - Imagine an app
Created by Jay on 8/6/2023 in #djs-voice
Getting voice adapter with @discordjs/core
whatever works best for you guys, but thank you!
14 replies
DIAdiscord.js - Imagine an app
Created by Jay on 8/6/2023 in #djs-voice
Getting voice adapter with @discordjs/core
made an issue as I didn't see one mentioned
14 replies
DIAdiscord.js - Imagine an app
Created by Jay on 8/6/2023 in #djs-voice
Getting voice adapter with @discordjs/core
14 replies
DIAdiscord.js - Imagine an app
Created by Jay on 8/6/2023 in #djs-voice
Getting voice adapter with @discordjs/core
Is there a plan to implement something to @discordjs/core for this? Because this seems overly complicated
14 replies
DIAdiscord.js - Imagine an app
Created by Jay on 8/6/2023 in #djs-voice
Getting voice adapter with @discordjs/core
Is there any examples of this around I can take a peak at?
14 replies
DIAdiscord.js - Imagine an app
Created by Jay on 8/6/2023 in #djs-voice
Getting voice adapter with @discordjs/core
Not using discord.js, using @discordjs/ binaries Here is my code:
app.post('/play', async c => {
let { url, user, guild } = Object.fromEntries(await c.req.formData()) as {
url: string
user: string
guild: string | APIGuild
}
guild = await client.api.guilds.get(guild as string) as APIGuild
if (!url || !user || !guild) {
c.status(400)
return c.json({ success: false, message: 'No url, user, or guild provided' })
}
const state = voiceStates.get(user as string)
if (!state) {
c.status(400)
return c.json({ success: false, message: 'User not in a voice channel' })
}
const channel = await client.api.channels.get(state) as APITextChannel
joinVoiceChannel({
channelId: channel.id,
guildId: guild.id,
adapterCreator: guild.voiceAdapterCreator as DiscordGatewayAdapterCreator,
selfDeaf: true,
})
})
app.post('/play', async c => {
let { url, user, guild } = Object.fromEntries(await c.req.formData()) as {
url: string
user: string
guild: string | APIGuild
}
guild = await client.api.guilds.get(guild as string) as APIGuild
if (!url || !user || !guild) {
c.status(400)
return c.json({ success: false, message: 'No url, user, or guild provided' })
}
const state = voiceStates.get(user as string)
if (!state) {
c.status(400)
return c.json({ success: false, message: 'User not in a voice channel' })
}
const channel = await client.api.channels.get(state) as APITextChannel
joinVoiceChannel({
channelId: channel.id,
guildId: guild.id,
adapterCreator: guild.voiceAdapterCreator as DiscordGatewayAdapterCreator,
selfDeaf: true,
})
})
14 replies