Saint
Saint
DIAdiscord.js - Imagine a boo! 👻
Created by Saint on 9/18/2023 in #djs-questions
Storing Giveaway information
When making a giveaway bot - How would you store the entries and the users?
12 replies
DIAdiscord.js - Imagine a boo! 👻
Created by Saint on 9/18/2023 in #djs-questions
Wrong docs..?
Hey, can someone please explain this as I've spent 2+ hours on it lol. Basically on the docs it says to use const user = interaction.options.getUser('target'); guild.members.unban(user); When it's completely wrong. To ban via discordID you should use const target = interaction.options.getUser('target'); await interaction.guild.bans.remove(target); Kinda stupid if the only thing that can solve this is AI...
7 replies
DIAdiscord.js - Imagine a boo! 👻
Created by Saint on 9/18/2023 in #djs-questions
Send to specific channel
I used the docs To get "const channel = client.channels.cache.get('1153350608082964592');" but I get this error. Any help? Looked around and to no avail.
const client = new Discord.Client();
^

ReferenceError: Discord is not defined
at Object.<anonymous> (C:\Users\honeu\Desktop\NodeJSBot\commands\serverstuff\suggestion.js:3:16)
at Module._compile (node:internal/modules/cjs/loader:1275:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1329:10)
at Module.load (node:internal/modules/cjs/loader:1133:32)
at Module._load (node:internal/modules/cjs/loader:972:12)
at Module.require (node:internal/modules/cjs/loader:1157:19)
at require (node:internal/modules/helpers:119:18)
at Object.<anonymous> (C:\Users\honeu\Desktop\NodeJSBot\index.js:20:19)
at Module._compile (node:internal/modules/cjs/loader:1275:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1329:10)

Node.js v19.7.0
Process exited with code 1
const client = new Discord.Client();
^

ReferenceError: Discord is not defined
at Object.<anonymous> (C:\Users\honeu\Desktop\NodeJSBot\commands\serverstuff\suggestion.js:3:16)
at Module._compile (node:internal/modules/cjs/loader:1275:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1329:10)
at Module.load (node:internal/modules/cjs/loader:1133:32)
at Module._load (node:internal/modules/cjs/loader:972:12)
at Module.require (node:internal/modules/cjs/loader:1157:19)
at require (node:internal/modules/helpers:119:18)
at Object.<anonymous> (C:\Users\honeu\Desktop\NodeJSBot\index.js:20:19)
at Module._compile (node:internal/modules/cjs/loader:1275:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1329:10)

Node.js v19.7.0
Process exited with code 1
12 replies
DIAdiscord.js - Imagine a boo! 👻
Created by Saint on 9/18/2023 in #djs-questions
Valid way to check if role?
Hey, if this is a valid method to check if a user has the specific role needed? If not, is there any other ways? Haven't gotten the hang of the one specified in the docs.
async execute(interaction) {
// Check if user has role "Dev"
if (!interaction.member.roles.cache.has('1151994432678273034')) {
return interaction.reply({
content: 'You do not have permission to use this command.',
ephemeral: true,
});
async execute(interaction) {
// Check if user has role "Dev"
if (!interaction.member.roles.cache.has('1151994432678273034')) {
return interaction.reply({
content: 'You do not have permission to use this command.',
ephemeral: true,
});
4 replies
DIAdiscord.js - Imagine a boo! 👻
Created by Saint on 9/18/2023 in #djs-questions
How to pull interaction username?
Hello, I want to post an embed with the username of the person who ran the / command. Can anyone help me? Kinda lost in the docs. Thanks!
5 replies
DIAdiscord.js - Imagine a boo! 👻
Created by Saint on 9/14/2023 in #djs-questions
New DJS
Hey, I just put in all the coding information from the github and followed the documentation.. My index.js and deploy-comands.js files are both picking up errors. How can this be?
19 replies
DIAdiscord.js - Imagine a boo! 👻
Created by Saint on 9/14/2023 in #djs-questions
Learning - Good after?
Hey! I'm currently taking the full Java script course with the Pro membership on codeacademy. If I finish all the projects and lectures there. You reckon I'm good to attempt building discordjs bots?
2 replies