How can I ban people with my bot who are outside of the server? (reopening)
I still cannot seem to find away to ban users who are outside of my server and require help
Im currently using an embed which you can choose if you want to ban or kick a person, which then goes to the button script to do the rest
command script:
38 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!btn script:
also
you use a try catch yet never log the error
whats the use of it then
idk why its not on there
its my script
let me update it
Pastebin
const { PermissionFlagsBits, EmbedBuilder } = require("discord.js")...
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Pastebin
const { SlashCommandBuilder, EmbedBuilder, PermissionFlagsBits, Act...
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
i just get unknown member and i've been trying to fix it and yet i just cant seem to find a way because im quite new lol
because a member isnt guaranteed to be in the guild
in which case the .fetch will reject
you do not even need the member object
just the id
how would I change the script to do that then#
by just using the id directly in the ban call
Alright thank you
Alright im still get "Unknown Member" errors
and my embeds arent working
so
I don't know what to do
show the updated code
i've actually just
lost it
i forgot to save my code so
its gone
wow
๐ญ
mind looking into https://discord.com/channels/222078108977594368/1284215275918594232/1284216717396148306 these too and just have a look at it when you can
would be greatly apperciated
well i gave you an answer
yeah but i've tried and it keep saying unknown member
and a few other errors
so
so what is your updated code then
i lost it because i forgot to save
and i aint going into the pain of rewriting my whole script again
well then whats your question if you;re not gonna use that code again
^^ I mean this
I still have that
but I did the updated code and I lost that
so im back to that basically at square 1
still this
alright i'll give it anothe rgo
i'll get back to you if anythiny happens
Pastebin
const { SlashCommandBuilder, EmbedBuilder, PermissionFlagsBits, Act...
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Pastebin
const { PermissionFlagsBits, EmbedBuilder } = require("discord.js")...
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
updated
if I've forgetten something obvious then
oops
also ignore the kickBtn i'll handle that leter
you never reply to the interaction
only when you encounter some sort of error
How shall I fix that then?
by replying to the intreraction
thus using interaction.update instead of message.edit
Kk
updated it still not working
so whats your current code
the pastebin i sent
thats not your updated code
its the exact same apart from the interaction.update
If you aren't getting any errors, try to place
console.log
checkpoints throughout your code to find out where execution stops.
- Once you do, log relevant values and if-conditions
- More sophisticated debugging methods are breakpoints and runtime inspections: learn morealright it breaks on the button script where
is
is
are you sure
that shouldnt stop your code
ignore the twos that was what i was testing
Alright I changed it
And yeah itโs stopping at the
That code I said