wen
Explore posts from serversDIAdiscord.js - Imagine a bot
•Created by wen on 12/23/2023 in #djs-questions
Preventing Unknown Interaction Crash
i get "unknown interaction" error at random times... like sometimes a button works fine and sometimes it gives the said error.... ofc the bot crashes when it happens... is there any way i can prevent it from crashing when this happens ? and also keep the button collector going ?
6 replies
DIAdiscord.js - Imagine a bot
•Created by wen on 10/6/2023 in #djs-questions
Image URL doesn't show up in embed
5 replies
DIAdiscord.js - Imagine a bot
•Created by wen on 9/17/2023 in #djs-voice
Trying to play a local wav file in a vc but it doesn't play more than a min.
Trying to play a local wav audio file in a vc but it doesn't play for more than a min even though the actual file is of 3 mins.
Code:
10 replies
DIAdiscord.js - Imagine a bot
•Created by wen on 9/16/2023 in #djs-questions
Separate content into pages
lets say i make an api call and it returns a massive paragraph which i would like to put in an embed with different pages... like in the first page there will be the first 4000 chars and so on... and u can switch b/w the pages using buttons
how do i separate the content into pages and the content can be of any length so it cannot be hard coded
3 replies
DIAdiscord.js - Imagine a bot
•Created by wen on 2/23/2023 in #djs-questions
Getting guild members on a sharded bot
I want to check if a user is present in a guild on the
userUpdate
event
im doing this
now since i sharded my bot i gotta use fetchClientValues ( i think )
and the fetch client values for guilds.cache
returns an array inside an array with 2 objects of the guilds the bot is in but they are no the full member object... they have a member property which is also an array but only has the cached member id ( only an array of id's ) s
accessing the sharded guild object:
so is there any other method for what i need ?14 replies
DIAdiscord.js - Imagine a bot
•Created by wen on 2/6/2023 in #djs-questions
shard.broadcastEval gives me a reference error even tho all vars are defined
So I just sharded my bot and was playing around with
client.broadcastEval
and it gives me this.
got a channelCreate.js event file like so:
and it gives this error when a channel is created
but it logs the guild name before crashing... also after the bot crashes it restarts itself automatically and thats weird cuz i dont have no such thing set up69 replies
DIAdiscord.js - Imagine a bot
•Created by wen on 2/4/2023 in #djs-questions
Getting objects from client cache after sharding
So I am about to shard my bot... its not yet public but I want to make it shard compatible from the beginning.
My question is that... is getting stuff like guild object or user object from the cache or anything from the client cache in general if its different after sharding
14 replies
DIAdiscord.js - Imagine a bot
•Created by wen on 1/17/2023 in #djs-voice
Play local file
is this enough to play an mp3 file ?
94 replies
DIAdiscord.js - Imagine a bot
•Created by wen on 1/8/2023 in #djs-questions
Do not have permissions to use my own bot the second time
just created my own slash + prefix cmd handler but there is a problem with the slash part
after i use any one slash cmd and then go to use another one (of the same bot) it says that i do not have any permission to use commands of that bot ( it says this in the slash commands dialog ) box
it can use it again just once if i refresh the discord client
36 replies
DIAdiscord.js - Imagine a bot
•Created by wen on 1/7/2023 in #djs-questions
Problem getting channel
so i have logChannel defined like this
and i have my error handler in a folder in the work dir... but it gives the error that cannot read properties of undefined
i also used my eval cmd and it returns the channel info just fine
67 replies
DIAdiscord.js - Imagine a bot
•Created by wen on 11/29/2022 in #djs-questions
userUpdate for global users
Does the
userUpdate
event work for cached users only ? And not for all discord users43 replies
DIAdiscord.js - Imagine a bot
•Created by wen on 11/14/2022 in #djs-questions
User Badges
Is there anyway to fetch all the badges of a user? Like in my case it only returns
HOUSE_BALANCE
and not the active developer badge5 replies
DIAdiscord.js - Imagine a bot
•Created by wen on 9/7/2022 in #djs-questions
Message Content problems
My bot can't access message content although the intents are enabled on the portal
68 replies