Schlaumeyer
Schlaumeyer
DIAdiscord.js - Imagine an app
Created by Schlaumeyer on 12/3/2023 in #djs-questions
Sometimes Unknown Interaction
thx
13 replies
DIAdiscord.js - Imagine an app
Created by Schlaumeyer on 12/3/2023 in #djs-questions
Sometimes Unknown Interaction
Do you have something like a template or sth?
13 replies
DIAdiscord.js - Imagine an app
Created by Schlaumeyer on 12/3/2023 in #djs-questions
Sometimes Unknown Interaction
What should I do instead?
13 replies
DIAdiscord.js - Imagine an app
Created by Schlaumeyer on 12/3/2023 in #djs-questions
Sometimes Unknown Interaction
In my index.js I just import notifyCommand from './commands/notify.js';
13 replies
DIAdiscord.js - Imagine an app
Created by Schlaumeyer on 12/3/2023 in #djs-questions
Sometimes Unknown Interaction
result[resIndex].notification = notification;

let message_notify = " "

var embed_notify = new EmbedBuilder()
.setTitle(`Benachrichtigung`)
.setColor(embed_color[Math.floor(Math.random() * embed_color.length)])
.setDescription(message_notify)
.setFooter({ text: embed_footer })

if (notification) {
message_notify = "Ping erfolgreich **aktiviert**!";
notification = 1;
} else {
message_notify = "Ping erfolgreich **deaktiviert**!";
notification = 0;
}

embed_notify.setDescription(message_notify);

dbQuery(`UPDATE leaderboard SET notification = '${notification}' WHERE userID = ${interaction.user.id}`)

interaction.editReply({
content: " ",
embeds: [embed_notify],
ephemeral: true
})
}
} catch (err) {
console.error(err);
}
});

export default notifyCommand.toJSON();
result[resIndex].notification = notification;

let message_notify = " "

var embed_notify = new EmbedBuilder()
.setTitle(`Benachrichtigung`)
.setColor(embed_color[Math.floor(Math.random() * embed_color.length)])
.setDescription(message_notify)
.setFooter({ text: embed_footer })

if (notification) {
message_notify = "Ping erfolgreich **aktiviert**!";
notification = 1;
} else {
message_notify = "Ping erfolgreich **deaktiviert**!";
notification = 0;
}

embed_notify.setDescription(message_notify);

dbQuery(`UPDATE leaderboard SET notification = '${notification}' WHERE userID = ${interaction.user.id}`)

interaction.editReply({
content: " ",
embeds: [embed_notify],
ephemeral: true
})
}
} catch (err) {
console.error(err);
}
});

export default notifyCommand.toJSON();
13 replies
DIAdiscord.js - Imagine an app
Created by Schlaumeyer on 7/29/2023 in #djs-questions
Error when creating embed
I knew it would be some stupid issue... thx
6 replies
DIAdiscord.js - Imagine an app
Created by Schlaumeyer on 7/29/2023 in #djs-questions
Error when creating embed
That's what the error says... yeah. But in other files the color is not the problem so I think it has to be something different
6 replies
DIAdiscord.js - Imagine an app
Created by Schlaumeyer on 1/22/2023 in #djs-questions
TypeError: Cannot read properties of undefined (reading 'send')
thx so much
13 replies
DIAdiscord.js - Imagine an app
Created by Schlaumeyer on 1/22/2023 in #djs-questions
TypeError: Cannot read properties of undefined (reading 'send')
aaaaaaaaaaaaaa
13 replies
DIAdiscord.js - Imagine an app
Created by Schlaumeyer on 1/22/2023 in #djs-questions
TypeError: Cannot read properties of undefined (reading 'send')
I tried it as a string before but I think that was before I waited for the Promise
13 replies
DIAdiscord.js - Imagine an app
Created by Schlaumeyer on 1/22/2023 in #djs-questions
TypeError: Cannot read properties of undefined (reading 'send')
I hate it
13 replies
DIAdiscord.js - Imagine an app
Created by Schlaumeyer on 1/22/2023 in #djs-questions
TypeError: Cannot read properties of undefined (reading 'send')
took me 3 days
13 replies
DIAdiscord.js - Imagine an app
Created by Schlaumeyer on 1/22/2023 in #djs-questions
TypeError: Cannot read properties of undefined (reading 'send')
Yes
13 replies
DIAdiscord.js - Imagine an app
Created by Schlaumeyer on 1/22/2023 in #djs-questions
TypeError: Cannot read properties of undefined (reading 'send')
...
13 replies
DIAdiscord.js - Imagine an app
Created by Schlaumeyer on 1/21/2023 in #djs-questions
Cannot read properties of undefined (reading 'send')
That's the index.js file. I'm importing ready in another file and wait that I can send a message
12 replies
DIAdiscord.js - Imagine an app
Created by Schlaumeyer on 1/21/2023 in #djs-questions
Cannot read properties of undefined (reading 'send')
const ready = new Promise((resolve) => {
client.on('ready', () => resolve());
});

export { ready };

(async () => {
try {
await ready;
console.log(ready)
console.log(`Eingeloggt als ${client.user.tag}`);
} catch (err) {
console.error(err);
}
})();
const ready = new Promise((resolve) => {
client.on('ready', () => resolve());
});

export { ready };

(async () => {
try {
await ready;
console.log(ready)
console.log(`Eingeloggt als ${client.user.tag}`);
} catch (err) {
console.error(err);
}
})();
12 replies
DIAdiscord.js - Imagine an app
Created by Schlaumeyer on 1/21/2023 in #djs-questions
Cannot read properties of undefined (reading 'send')
Promise { undefined }
12 replies
DIAdiscord.js - Imagine an app
Created by Schlaumeyer on 1/21/2023 in #djs-questions
Cannot read properties of undefined (reading 'send')
I guess so
const client = new Client({ intents: ['Guilds', 'GuildMessages'] });
const client = new Client({ intents: ['Guilds', 'GuildMessages'] });
12 replies
DIAdiscord.js - Imagine an app
Created by Schlaumeyer on 1/21/2023 in #djs-questions
Cannot read properties of undefined (reading 'send')
It's a channel in a discord server, if you mean that, yes. The bot also has access to it (it has administrator permissions)
12 replies
DIAdiscord.js - Imagine an app
Created by Schlaumeyer on 1/21/2023 in #djs-questions
Cannot read properties of undefined (reading 'send')
Channel ID is correct. How can I see if the channel is cached? Or fix that?
12 replies