Steve Jobs
Steve Jobs
DIAdiscord.js - Imagine an app
Created by Steve Jobs on 4/7/2024 in #djs-questions
owner.send isn't working properly
@Qjuh
const guild = await client.guilds.fetch(guildId)
const guild = await client.guilds.fetch(guildId)
16 replies
DIAdiscord.js - Imagine an app
Created by Steve Jobs on 4/7/2024 in #djs-questions
owner.send isn't working properly
else if (interaction.customId == "deny_partner") {
await row.components[0].setDisabled(true)
await row.components[1].setDisabled(true)
await interaction.update({components: [row]})
collector.stop()
const guildId3 = await interaction.client.guilds.fetch(guild).then(guild => guild.id)
if (await isToggled(guildId3) === true) {
await guild.fetchOwner().then(async (owner) => {
console.log(`Owner's username: ${owner.user}`); // Log the owner's username
const embed = new EmbedBuilder()
.setTitle('Partnership Declined')
.setColor('Red')
.setDescription(`${interaction.guild.name} declined a partnership requested by ${guild.name}'s Auto-Partner module`)
.setTimestamp()
await owner.send({embeds: [embed]}).catch(error => {
console.log(error)
return
})
await interaction.followUp("Done!")
return
})}
else {
await interaction.followUp("Done!")
return
}
}
else if (interaction.customId == "deny_partner") {
await row.components[0].setDisabled(true)
await row.components[1].setDisabled(true)
await interaction.update({components: [row]})
collector.stop()
const guildId3 = await interaction.client.guilds.fetch(guild).then(guild => guild.id)
if (await isToggled(guildId3) === true) {
await guild.fetchOwner().then(async (owner) => {
console.log(`Owner's username: ${owner.user}`); // Log the owner's username
const embed = new EmbedBuilder()
.setTitle('Partnership Declined')
.setColor('Red')
.setDescription(`${interaction.guild.name} declined a partnership requested by ${guild.name}'s Auto-Partner module`)
.setTimestamp()
await owner.send({embeds: [embed]}).catch(error => {
console.log(error)
return
})
await interaction.followUp("Done!")
return
})}
else {
await interaction.followUp("Done!")
return
}
}
16 replies
DIAdiscord.js - Imagine an app
Created by Steve Jobs on 4/7/2024 in #djs-questions
owner.send isn't working properly
Update: I did both things and it didn't worked. I tried catching the error/bug and I have nothing displayed on my terminal
16 replies
DIAdiscord.js - Imagine an app
Created by Steve Jobs on 4/7/2024 in #djs-questions
owner.send isn't working properly
I'll try to do .catch
16 replies
DIAdiscord.js - Imagine an app
Created by Steve Jobs on 4/7/2024 in #djs-questions
owner.send isn't working properly
I tried await owner.send already, and I got the same unwanted results
16 replies
DIAdiscord.js - Imagine an app
Created by Steve Jobs on 4/7/2024 in #djs-questions
owner.send isn't working properly
No, but I'm going to make one soon.
16 replies
DIAdiscord.js - Imagine an app
Created by Steve Jobs on 4/7/2024 in #djs-questions
owner.send isn't working properly
Basically the whole point here is to DM me the owner (myself here)
16 replies
DIAdiscord.js - Imagine an app
Created by Steve Jobs on 4/7/2024 in #djs-questions
owner.send isn't working properly
Hm, I'm currently testing the bot myself and my DMs are open.
16 replies
DIAdiscord.js - Imagine an app
Created by Steve Jobs on 4/7/2024 in #djs-questions
owner.send isn't working properly
but not the owner.send
16 replies
DIAdiscord.js - Imagine an app
Created by Steve Jobs on 4/7/2024 in #djs-questions
owner.send isn't working properly
Yeah the followUp happens
16 replies
DIAdiscord.js - Imagine an app
Created by Steve Jobs on 4/7/2024 in #djs-questions
owner.send isn't working properly
Ok
16 replies
DIAdiscord.js - Imagine an app
Created by Steve Jobs on 4/7/2024 in #djs-questions
owner.send isn't working properly
Everything works perfectly fine, no errors or nothing, except the part were the bot doesn't DM the owner variable
16 replies
DIAdiscord.js - Imagine an app
Created by Steve Jobs on 4/6/2024 in #djs-questions
How to check if randomServerWithAd blacklisted the server that is running this command.
Thanks
4 replies
DIAdiscord.js - Imagine an app
Created by Steve Jobs on 4/6/2024 in #djs-questions
How to check if randomServerWithAd blacklisted the server that is running this command.
Oh lol
4 replies
DIAdiscord.js - Imagine an app
Created by Steve Jobs on 4/6/2024 in #djs-questions
User need to be authorized bug
thanks
11 replies
DIAdiscord.js - Imagine an app
Created by Steve Jobs on 4/6/2024 in #djs-questions
User need to be authorized bug
I see why
11 replies
DIAdiscord.js - Imagine an app
Created by Steve Jobs on 4/6/2024 in #djs-questions
User need to be authorized bug
Oh
11 replies
DIAdiscord.js - Imagine an app
Created by Steve Jobs on 4/6/2024 in #djs-questions
User need to be authorized bug
why not interaction.user.roles?
11 replies
DIAdiscord.js - Imagine an app
Created by Steve Jobs on 4/6/2024 in #djs-questions
User need to be authorized bug
so in other terms the code would be like this?
const roleId = yourGuildData.partnerRoleId
const userIsAuthorized = interaction.user.id === interaction.guild.ownerId || yourGuildData.managers?.includes(interaction.user.id) || interaction.user.roles.cache.has(roleId.id);
if (!userIsAuthorized) {
await interaction.reply("Only the server owner or authorized users can use this command.");
return;
}
const roleId = yourGuildData.partnerRoleId
const userIsAuthorized = interaction.user.id === interaction.guild.ownerId || yourGuildData.managers?.includes(interaction.user.id) || interaction.user.roles.cache.has(roleId.id);
if (!userIsAuthorized) {
await interaction.reply("Only the server owner or authorized users can use this command.");
return;
}
11 replies
DIAdiscord.js - Imagine an app
Created by Steve Jobs on 4/6/2024 in #djs-questions
User need to be authorized bug
I see
11 replies