Tomáš
Tomáš
DIAdiscord.js - Imagine an app
Created by MrShark on 6/22/2023 in #djs-questions
send message to user in PresenceUpdate event
and this
28 replies
DIAdiscord.js - Imagine an app
Created by MrShark on 6/22/2023 in #djs-questions
send message to user in PresenceUpdate event
sorry, way away, but for one channel you can use this
28 replies
DIAdiscord.js - Imagine an app
Created by MrShark on 6/22/2023 in #djs-questions
send message to user in PresenceUpdate event
is your bot in multiple guilds, or is it planned to be? do you want to send the message to some channel in its respective guild or always to the same channel on one guild?
28 replies
DIAdiscord.js - Imagine an app
Created by MrShark on 6/22/2023 in #djs-questions
send message to user in PresenceUpdate event
when is some guild a presence update is emmited, you want to....?
28 replies
DIAdiscord.js - Imagine an app
Created by MrShark on 6/22/2023 in #djs-questions
send message to user in PresenceUpdate event
what exactly you are trying to accomplish? if is isn't a secret
28 replies
DIAdiscord.js - Imagine an app
Created by MrShark on 6/22/2023 in #djs-questions
send message to user in PresenceUpdate event
missread
28 replies
DIAdiscord.js - Imagine an app
Created by MrShark on 6/22/2023 in #djs-questions
send message to user in PresenceUpdate event
sorry
28 replies
DIAdiscord.js - Imagine an app
Created by MrShark on 6/22/2023 in #djs-questions
send message to user in PresenceUpdate event
const channelToSendTo = client.channels.fetch('id')
28 replies
DIAdiscord.js - Imagine an app
Created by MrShark on 6/22/2023 in #djs-questions
send message to user in PresenceUpdate event
or you can just copy the id of the channel and hardcode fetch that channel and send message to it
28 replies
DIAdiscord.js - Imagine an app
Created by MrShark on 6/22/2023 in #djs-questions
send message to user in PresenceUpdate event
you would need to fetch the guild channels from the presence update and then choose some
28 replies
DIAdiscord.js - Imagine an app
Created by MrShark on 6/22/2023 in #djs-questions
send message to user in PresenceUpdate event
this would send it to users DMs
28 replies
DIAdiscord.js - Imagine an app
Created by MrShark on 6/22/2023 in #djs-questions
send message to user in PresenceUpdate event
This may require additional intents
28 replies
DIAdiscord.js - Imagine an app
Created by MrShark on 6/22/2023 in #djs-questions
send message to user in PresenceUpdate event
will do
28 replies
DIAdiscord.js - Imagine an app
Created by MrShark on 6/22/2023 in #djs-questions
send message to user in PresenceUpdate event
yes
28 replies
DIAdiscord.js - Imagine an app
Created by MrShark on 6/22/2023 in #djs-questions
send message to user in PresenceUpdate event
newMember.user.send()
28 replies
DIAdiscord.js - Imagine an app
Created by dzlandis on 5/1/2023 in #djs-questions
Checking to make sure a message still exist (Unknown Message Errors)
well, the best solution I got for those kinds of issues is
const someMessage = ...;
if ( (await someMessage.channel.messages.fetch({ limit: 1, cache: false, around: someMessage.id })).has(someMessage.id) ) someMessage.react(...);
const someMessage = ...;
if ( (await someMessage.channel.messages.fetch({ limit: 1, cache: false, around: someMessage.id })).has(someMessage.id) ) someMessage.react(...);
this fetches message from around the message you are trying to react to, and if it still exist, the collection contains the message so you can react. However, there can still be some timing edge cases where the fetched data will already be outdated which will cause errors like Qjuh said.
7 replies
DIAdiscord.js - Imagine an app
Created by dzlandis on 5/1/2023 in #djs-questions
Checking to make sure a message still exist (Unknown Message Errors)
I think he meant that
try {
....
}
catch (err) {
....
}
try {
....
}
catch (err) {
....
}
the catch does't do anything in this case and it still throws new DiscordAPIError. I encountered this recently for similar problems, but I found other solutions I believe not applicable here, sorry.
7 replies
DIAdiscord.js - Imagine an app
Created by Tomáš on 5/2/2023 in #djs-questions
ReactionCollector discord.js reasons to stop/end
Have a beautiful day
7 replies
DIAdiscord.js - Imagine an app
Created by Tomáš on 5/2/2023 in #djs-questions
ReactionCollector discord.js reasons to stop/end
Thank you, I didn't look into collector.js, silly me.
7 replies