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 User16mo ago
Message Not Public
Sign In & Join Server To View
Shaurya
Shaurya16mo ago
It's just <GuildMember>.kick(), get the member and use that
Fractyl
Fractyl16mo ago
yeah but how you mention the user to be kicked as a prompt i guess?
Shaurya
Shaurya16mo ago
Wdym?
Fractyl
Fractyl16mo ago
1 moment
Fractyl
Fractyl16mo ago
Fractyl
Fractyl16mo ago
very old format probs
monbrey
monbrey16mo ago
Why use string mentions instead of a user option?
Fractyl
Fractyl16mo ago
i don't know this is got confusing that's why I'm asking for support
Shaurya
Shaurya16mo ago
You need to do <GuildMember>.kick()
Fractyl
Fractyl16mo ago
this does not work ive tried
Shaurya
Shaurya16mo ago
What did you try? Why use getString though when you can use getMember?
Fractyl
Fractyl16mo ago
done that to
Fractyl
Fractyl16mo ago
monbrey
monbrey16mo ago
What does your code look like right now? Whats null?
Fractyl
Fractyl16mo ago
Shaurya
Shaurya16mo ago
Remove that object from .getMember
Fractyl
Fractyl16mo ago
wdym by that?
Shaurya
Shaurya16mo ago
Remove the object from .getMember()
Fractyl
Fractyl16mo 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
monbrey16mo ago
Can you show us your command definition? Doesnt matter if you didnt use builders
Fractyl
Fractyl16mo ago
What do you mean by that
monbrey
monbrey16mo ago
You said you dont use slash command builders
Fractyl
Fractyl16mo ago
I dont
monbrey
monbrey16mo ago
But you must have defined the slash command somehow In order to register it
Fractyl
Fractyl16mo ago
It's a constant Variable
monbrey
monbrey16mo ago
And for it to have options So show us that
Fractyl
Fractyl16mo 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
monbrey16mo ago
Yeah thats not helpful at all, I need to see actual code not examples
Fractyl
Fractyl16mo ago
I'll see what I can do gimme a second
Fractyl
Fractyl16mo ago
dont question the names
monbrey
monbrey16mo ago
None of those are your kick command
Fractyl
Fractyl16mo ago
all of them work apart from Banhonk Which is the kick one
monbrey
monbrey16mo ago
Youre making it really hard to help you Okay well that one doesnt have any options
Fractyl
Fractyl16mo ago
how do i give it options
monbrey
monbrey16mo 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
Fractyl16mo 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