Fallen
Explore posts from serversDIAdiscord.js - Imagine an app
•Created by Fallen on 7/17/2023 in #djs-questions
How to fetch a guild from the cache on another shard
Hello, I am making a command that needs the functionality of fetching a guild from the cache, however it is a sharded bot.
Is there a method I can call to check other shards client caches for this guild?
3 replies
DIAdiscord.js - Imagine an app
•Created by Fallen on 6/14/2023 in #djs-questions
Error fetching guild on client ready event
I have a function that will check for all guilds that have member count enabled
However this specific group of code seems to always fail to fetch the guild, even tho when evaluating the same code it succeeds.
This specific line
const guild = await client.guilds.fetch(g.guild).catch(() => {});
always returns void or undefined. Even tho the provided guild ID is valid.
This function is called from the ClientReady event.
20 replies
DIAdiscord.js - Imagine an app
•Created by Fallen on 5/25/2023 in #djs-voice
Audio Player state changes to playing when resource ends
I am creating an audio resource from a ytdl download, and when I play this resource on the player with
player.play(resource)
the players state is set to "buffering", once the resource stops playing in the voice channel the players state changes to "playing". I am listening for when the player goes idle to queue the next song, however it never goes idle. My code is below:
Queue:
5 replies