Ateeb Sohail
Ateeb Sohail
DIAdiscord.js - Imagine an app
Created by Ateeb Sohail on 2/18/2024 in #djs-questions
Thread sometimes null?
13 replies
DIAdiscord.js - Imagine an app
Created by Ateeb Sohail on 2/18/2024 in #djs-questions
Thread sometimes null?
still it says N/A
13 replies
DIAdiscord.js - Imagine an app
Created by Ateeb Sohail on 2/18/2024 in #djs-questions
Thread sometimes null?
well i just console.logged thread. its not null
13 replies
DIAdiscord.js - Imagine an app
Created by Ateeb Sohail on 2/18/2024 in #djs-questions
Thread sometimes null?
its the same here
msg = (channel as TextChannel).send({content: ping, embeds: [embed], components: [actionRow]}).then(async (msg) => {
updateMessage(post.id, {id: msg.id, url: msg.url})
updateApproval(post.id)
console.log(msg.id, msg.url)
})
msg = (channel as TextChannel).send({content: ping, embeds: [embed], components: [actionRow]}).then(async (msg) => {
updateMessage(post.id, {id: msg.id, url: msg.url})
updateApproval(post.id)
console.log(msg.id, msg.url)
})
13 replies
DIAdiscord.js - Imagine an app
Created by Ateeb Sohail on 2/18/2024 in #djs-questions
Thread sometimes null?
even though thread gets created and msg is sent and everything
13 replies
DIAdiscord.js - Imagine an app
Created by Ateeb Sohail on 2/18/2024 in #djs-questions
Thread sometimes null?
It seems to be the first one after bot starts
13 replies
DIAdiscord.js - Imagine an app
Created by Ateeb Sohail on 2/18/2024 in #djs-questions
Thread sometimes null?
(N/A is the default value)
13 replies
DIAdiscord.js - Imagine an app
Created by Ateeb Sohail on 2/18/2024 in #djs-questions
Thread sometimes null?
No description
13 replies
DIAdiscord.js - Imagine an app
Created by Ateeb Sohail on 1/31/2024 in #djs-questions
Unable to delete message from DM
No description
4 replies
DIAdiscord.js - Imagine an app
Created by Ateeb Sohail on 1/31/2024 in #djs-questions
Unable to delete message from DM
else if(interaction.customId == 'reportRefer') {
const btn = interaction.message.components[0].components[1]
if(btn.type == ComponentType.Button) {
const embed = new InfoEmbed( ':exclamation_alert: Referral Report!',`
\n\n
:angle_jhm:Reported By:

:divider_jhm:User ID: ${interaction.user.id}
:divider_jhm:User Tag: ${interaction.user.tag}

Referred By:
\n
:angle_jhm: Post: ${btn.url}`).setColor(0xff0000);
(channels.reportLog as TextChannel).send({embeds: [embed]})
}
interaction.message.delete()
interaction.user.send({content: ':Staff: Thank you for your report, the staff team will investigate on this issue.'})
return
}
else if(interaction.customId == 'reportRefer') {
const btn = interaction.message.components[0].components[1]
if(btn.type == ComponentType.Button) {
const embed = new InfoEmbed( ':exclamation_alert: Referral Report!',`
\n\n
:angle_jhm:Reported By:

:divider_jhm:User ID: ${interaction.user.id}
:divider_jhm:User Tag: ${interaction.user.tag}

Referred By:
\n
:angle_jhm: Post: ${btn.url}`).setColor(0xff0000);
(channels.reportLog as TextChannel).send({embeds: [embed]})
}
interaction.message.delete()
interaction.user.send({content: ':Staff: Thank you for your report, the staff team will investigate on this issue.'})
return
}
4 replies
DIAdiscord.js - Imagine an app
Created by Ateeb Sohail on 1/31/2024 in #djs-questions
Assuming I have a link button, anyway to get the URL of the button?
Thanks
3 replies
DIAdiscord.js - Imagine an app
Created by Ateeb Sohail on 1/28/2024 in #djs-questions
How do i send messages in a Forum Channel
Here's my working code for anyone in the future
newThread = await (channel as ForumChannel).threads.create({ name: post.jobTitle, message: {embeds: [embed], components: [btnRow]}, appliedTags: tags});
(channel as ForumChannel).threads.fetch(newThread.id).then(thread => {thread?.send({content: 'Hello World!'})})
newThread = await (channel as ForumChannel).threads.create({ name: post.jobTitle, message: {embeds: [embed], components: [btnRow]}, appliedTags: tags});
(channel as ForumChannel).threads.fetch(newThread.id).then(thread => {thread?.send({content: 'Hello World!'})})
18 replies
DIAdiscord.js - Imagine an app
Created by Ateeb Sohail on 1/28/2024 in #djs-questions
How do i send messages in a Forum Channel
thank you
18 replies
DIAdiscord.js - Imagine an app
Created by Ateeb Sohail on 1/28/2024 in #djs-questions
How do i send messages in a Forum Channel
msg = await (channel as ForumChannel).threads.create({ name: post.jobTitle, message: {embeds: [embed], components: [btnRow]}, appliedTags: tags});
(channel as ForumChannel).threads.fetch(msg.id).then()
msg = await (channel as ForumChannel).threads.create({ name: post.jobTitle, message: {embeds: [embed], components: [btnRow]}, appliedTags: tags});
(channel as ForumChannel).threads.fetch(msg.id).then()
18 replies
DIAdiscord.js - Imagine an app
Created by Ateeb Sohail on 1/28/2024 in #djs-questions
How do i send messages in a Forum Channel
and use it to fetch the channel using <channel>.threads.fetch
18 replies
DIAdiscord.js - Imagine an app
Created by Ateeb Sohail on 1/28/2024 in #djs-questions
How do i send messages in a Forum Channel
and i get the thread id
18 replies
DIAdiscord.js - Imagine an app
Created by Ateeb Sohail on 1/28/2024 in #djs-questions
How do i send messages in a Forum Channel
my bad
18 replies
DIAdiscord.js - Imagine an app
Created by Ateeb Sohail on 1/28/2024 in #djs-questions
How do i send messages in a Forum Channel
oh right
18 replies
DIAdiscord.js - Imagine an app
Created by Ateeb Sohail on 1/28/2024 in #djs-questions
How do i send messages in a Forum Channel
(channel as ForumChannel).send()
(channel as ForumChannel).send()
18 replies
DIAdiscord.js - Imagine an app
Created by Ateeb Sohail on 1/28/2024 in #djs-questions
How do i send messages in a Forum Channel
Property 'send' does not exist on type 'ForumChannel'.ts(2339)
18 replies