How do you kick mentioned people using Discord.js

I'm using No slash command builders just using Client.on(interaction) anyone please inform me how to kick mentioned people
37 Replies
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Shaurya
Shaurya2y ago
It's just <GuildMember>.kick(), get the member and use that
Fractyl
FractylOP2y ago
yeah but how you mention the user to be kicked as a prompt i guess?
Shaurya
Shaurya2y ago
Wdym?
Fractyl
FractylOP2y ago
1 moment
Fractyl
FractylOP2y ago
Fractyl
FractylOP2y ago
very old format probs
monbrey
monbrey2y ago
Why use string mentions instead of a user option?
Fractyl
FractylOP2y ago
i don't know this is got confusing that's why I'm asking for support
Shaurya
Shaurya2y ago
You need to do <GuildMember>.kick()
Fractyl
FractylOP2y ago
this does not work ive tried
Shaurya
Shaurya2y ago
What did you try? Why use getString though when you can use getMember?
Fractyl
FractylOP2y ago
done that to
Fractyl
FractylOP2y ago
monbrey
monbrey2y ago
What does your code look like right now? Whats null?
Fractyl
FractylOP2y ago
Shaurya
Shaurya2y ago
Remove that object from .getMember
Fractyl
FractylOP2y ago
wdym by that?
Shaurya
Shaurya2y ago
Remove the object from .getMember()
Fractyl
FractylOP2y ago
you mean the brackets or .options objects been removed still same issue Imma go Hit the Hay any useful info please let me know below -----------------------------------------------------------------------------
monbrey
monbrey2y ago
Can you show us your command definition? Doesnt matter if you didnt use builders
Fractyl
FractylOP2y ago
What do you mean by that
monbrey
monbrey2y ago
You said you dont use slash command builders
Fractyl
FractylOP2y ago
I dont
monbrey
monbrey2y ago
But you must have defined the slash command somehow In order to register it
Fractyl
FractylOP2y ago
It's a constant Variable
monbrey
monbrey2y ago
And for it to have options So show us that
Fractyl
FractylOP2y ago
I cant right now I'll have to restart my Laptop but I can tell you how it is
const commands=[
{
name:'command 1',
description:'this an an example'
},
{
name:'command 2',
description:'this an an example'
}

]
const commands=[
{
name:'command 1',
description:'this an an example'
},
{
name:'command 2',
description:'this an an example'
}

]
Etc Its not the most effective but it works fine But this kick command got me Extremely confused
monbrey
monbrey2y ago
Yeah thats not helpful at all, I need to see actual code not examples
Fractyl
FractylOP2y ago
I'll see what I can do gimme a second
Fractyl
FractylOP2y ago
dont question the names
monbrey
monbrey2y ago
None of those are your kick command
Fractyl
FractylOP2y ago
all of them work apart from Banhonk Which is the kick one
monbrey
monbrey2y ago
Youre making it really hard to help you Okay well that one doesnt have any options
Fractyl
FractylOP2y ago
how do i give it options
monbrey
monbrey2y ago
I mean I would have recommended using the slash command builders, if you want to do raw JSON its kinda outside the scope of discord.js
Fractyl
FractylOP2y ago
I should probably rework the bot for the 3rd time in a row to use slash command builders it might be easier to understand If you have anything else you can do to help I'm open to suggestions I really need to get some sleep so Thank you for your time! And goodnight
Want results from more Discord servers?
Add your server