CrypLemonade
CrypLemonade
DIAdiscord.js - Imagine an app
Created by CrypLemonade on 2/17/2024 in #djs-questions
messageCreate event
anyone got any clue why this aint working?
client.on('messageCreate', (message) => {
if (message.mentions.has(message.guild.members.cache.find((member) => member.hasPermission('ADMINISTRATOR')))) {
message.delete();

const warningEmbed = new Discord.MessageEmbed()
.setColor('RED')
.setTitle('Warning')
.setDescription(`You cannot ping an administrator in this server. Your message has been deleted.`)
.setTimestamp();

message.author.send({ embeds: [warningEmbed] });
}
});
client.on('messageCreate', (message) => {
if (message.mentions.has(message.guild.members.cache.find((member) => member.hasPermission('ADMINISTRATOR')))) {
message.delete();

const warningEmbed = new Discord.MessageEmbed()
.setColor('RED')
.setTitle('Warning')
.setDescription(`You cannot ping an administrator in this server. Your message has been deleted.`)
.setTimestamp();

message.author.send({ embeds: [warningEmbed] });
}
});
its supposed to detect when a member pings someone with administrator then delete the ping adn send a warning embed but.. it just doesnt
11 replies
DIAdiscord.js - Imagine an app
Created by CrypLemonade on 9/3/2023 in #djs-questions
Cannot read properties of null.
4 replies
DIAdiscord.js - Imagine an app
Created by CrypLemonade on 8/31/2023 in #djs-questions
Syntax error.
/root/Xenix/Xenix/node_modules/discord.js/src/client/BaseClient.js:29
userAgentAppendix: options.rest?.userAgentAppendix
^

SyntaxError: Unexpected token '.'
at wrapSafe (internal/modules/cjs/loader.js:915:16)
at Module._compile (internal/modules/cjs/loader.js:963:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Module.require (internal/modules/cjs/loader.js:887:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.<anonymous> (/root/Xenix/Xenix/node_modules/discord.js/src/index.js:6:22)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
/root/Xenix/Xenix/node_modules/discord.js/src/client/BaseClient.js:29
userAgentAppendix: options.rest?.userAgentAppendix
^

SyntaxError: Unexpected token '.'
at wrapSafe (internal/modules/cjs/loader.js:915:16)
at Module._compile (internal/modules/cjs/loader.js:963:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Module.require (internal/modules/cjs/loader.js:887:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.<anonymous> (/root/Xenix/Xenix/node_modules/discord.js/src/index.js:6:22)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
Uploaded my bot to my VPS so it can be ran 24/7 now I get this error but it works fine on my PC
3 replies
DIAdiscord.js - Imagine an app
Created by CrypLemonade on 8/20/2023 in #djs-questions
TypeError: client.handleEvents is not a function
19 replies
DIAdiscord.js - Imagine an app
Created by CrypLemonade on 8/19/2023 in #djs-questions
Invalid Form body
72 replies
DIAdiscord.js - Imagine an app
Created by CrypLemonade on 8/19/2023 in #djs-questions
Reference Error.
7 replies