SzyMoon
SzyMoon
DIAdiscord.js - Imagine an app
Created by SzyMoon on 12/16/2023 in #djs-questions
DeferReply problem
Hello I want my code to clean up components under message that button was clicked and then send new message. i got this effect by update first and then sending followup
await interaction.update({components: []})
await interaction.followup({content: 'This is a follow-up message.', components: [row]});
await interaction.update({components: []})
await interaction.followup({content: 'This is a follow-up message.', components: [row]});
This code works as intended but when i add deferReply this code end every time with error:
Error [InteractionAlreadyReplied]: The reply to this interaction has already been sent or deferred.
Error [InteractionAlreadyReplied]: The reply to this interaction has already been sent or deferred.
Do you have idea how would i fix that?
14 replies
DIAdiscord.js - Imagine an app
Created by SzyMoon on 10/28/2023 in #djs-questions
User.client.presence is null
HI! I want to detect if user is on discord mobile version or on desktop/ web one. In documentation I try to get it through such line in my commancbuilder interaction.user.client.presence.clientStatus But i can only see if user is online, rest is null. I looked up what only presence return and here is result
presence: ClientPresence {
userId: null,
guild: null,
status: 'online',
activities: [],
clientStatus: null
},
presence: ClientPresence {
userId: null,
guild: null,
status: 'online',
activities: [],
clientStatus: null
},
Can i fetch somehow clientstatus?
10 replies
DIAdiscord.js - Imagine an app
Created by SzyMoon on 8/11/2023 in #djs-questions
Modal imput question
In current version of discord js can you insert into modal some other components than TextInputBuilder? I cannot see this in discord js docs. I have found some screenshots that it's (was?) possible like in discord modals package. I tried to run this code but it gives error 'DiscordAPIError[50035]: Invalid Form Body data.components[1].components[0][UNION_TYPE_CHOICES]: Value of field "type" must be one of (4,). Invalid Form Body' https://www.npmjs.com/package/discord-modals https://user-images.githubusercontent.com/79017590/172033349-816d4b8f-ab1b-4cb4-9d7a-f4919ba9aa70.gif
4 replies
DIAdiscord.js - Imagine an app
Created by SzyMoon on 5/20/2023 in #djs-questions
Stage Bot
So many of my clients cannot join to speak on stage channel because of bugs in discord mobile version of the app. Accept button is not clickable for some reason. I was wondering is there a option to help them and write command to manually give them access to speak? In standard discord js or in discord voice ofc
7 replies
DIAdiscord.js - Imagine an app
Created by SzyMoon on 5/8/2023 in #djs-questions
ForumChannel webhook scope
I want to create custom discord backup bot for ForumChannels. I can now create backups but now i want to post it back on my discord. To do that i need to send it as a bot user copy Question: If i create webhook for ForumChannel does this range allows me to create and post into ThreadChannels? They cannot have webhook itself according to docs
4 replies