Knabbiii ♡ ˚₊‧⁺˖
Knabbiii ♡ ˚₊‧⁺˖
DIAdiscord.js - Imagine an app
Created by Knabbiii ♡ ˚₊‧⁺˖ on 8/29/2023 in #djs-questions
Timeout Error
Hello! After this message you can see my current Code. I have a problem, that firstly, i get the error right here:
if (timeMember.permissions.has(PermissionsBitField.Flags.Administrator)) return await interaction.reply({ content: `Du kannst keinen User mit Administrator Rechten timeouten!`, ephermeral: true })

TypeError: Cannot read properties of undefined (reading 'has')
if (timeMember.permissions.has(PermissionsBitField.Flags.Administrator)) return await interaction.reply({ content: `Du kannst keinen User mit Administrator Rechten timeouten!`, ephermeral: true })

TypeError: Cannot read properties of undefined (reading 'has')
And secondly, if i just remove this, i get the error, from the
if (!timeMember.kickable) return await interaction.reply({....
if (!timeMember.kickable) return await interaction.reply({....
but the user i test it on is not above the bot at all.
11 replies
DIAdiscord.js - Imagine an app
Created by Knabbiii ♡ ˚₊‧⁺˖ on 10/10/2022 in #djs-questions
memberCount filter only Users
How do I filter out the bots in this code so that only users are displayed?
module.exports = {
name: 'ready',
async execute(client) {

setInterval(async () => {
let membersCount = client.guilds.cache.map(guild => guild.memberCount).reduce((a, b) => a + b, 0)
await client.user.setPresence({
activities: [{
name: `mit ${membersCount} usern`,
type: ActivityType.Playing
}],
status: "online"
})
}, 1000 * 60 * 10);
}
}
module.exports = {
name: 'ready',
async execute(client) {

setInterval(async () => {
let membersCount = client.guilds.cache.map(guild => guild.memberCount).reduce((a, b) => a + b, 0)
await client.user.setPresence({
activities: [{
name: `mit ${membersCount} usern`,
type: ActivityType.Playing
}],
status: "online"
})
}, 1000 * 60 * 10);
}
}
2 replies
DIAdiscord.js - Imagine an app
Created by Knabbiii ♡ ˚₊‧⁺˖ on 10/7/2022 in #djs-questions
membercount as activity precence
I want to take the Member count and put in inside my precence so people can see it in the activity my current code:
module.exports = {
name: 'ready',
once: true,
async execute(client) {

setInterval(() => {
let membersCount = client.guilds.cache.map(guild => guild.memberCount).reduce((a, b) => a + b, 0)

}, 1000 * 60 * 5);
const options = [
{
type: ActivityType.Playing,
text: `mit [${membersCount} usern]`,
status: "online"
}
];
await client.user.setPrecence({
activities: [{
name: [options].text,
type: [options].type
},
],
status: [options].status
}).catch(console.error);
}
}
module.exports = {
name: 'ready',
once: true,
async execute(client) {

setInterval(() => {
let membersCount = client.guilds.cache.map(guild => guild.memberCount).reduce((a, b) => a + b, 0)

}, 1000 * 60 * 5);
const options = [
{
type: ActivityType.Playing,
text: `mit [${membersCount} usern]`,
status: "online"
}
];
await client.user.setPrecence({
activities: [{
name: [options].text,
type: [options].type
},
],
status: [options].status
}).catch(console.error);
}
}
Error: membersCount is not defined- I'm not even sure if this whole code is right..
41 replies
DIAdiscord.js - Imagine an app
Created by Knabbiii ♡ ˚₊‧⁺˖ on 10/6/2022 in #djs-questions
Embed not sending- option value
6 replies
DIAdiscord.js - Imagine an app
Created by Knabbiii ♡ ˚₊‧⁺˖ on 10/6/2022 in #djs-questions
How to use an option value- so its executing something
2 replies
DIAdiscord.js - Imagine an app
Created by Knabbiii ♡ ˚₊‧⁺˖ on 10/6/2022 in #djs-questions
Embed is not showing emoji, only the name
7 replies
DIAdiscord.js - Imagine an app
Created by Knabbiii ♡ ˚₊‧⁺˖ on 10/6/2022 in #djs-questions
How to NOT respond a slash command?
my goal is not to send a respond after me using a slash command. I just want the message.
33 replies
DIAdiscord.js - Imagine an app
Created by Knabbiii ♡ ˚₊‧⁺˖ on 10/5/2022 in #djs-questions
Embed error
9 replies