#unknown run function location
1 messages · Page 1 of 1 (latest)
thats not what i was talking about. show me your interactionCreate event please
one sec
yh i have one in events
but i have the code // out
and use it in my index rn
theres the event one

do you mind if i ask you if you copy pasted
nope, was going off an example and changing some stuff to my things
i get confused sometimes with run and execute or client and Client coz i just started djs etc
ik copy and pasting straight up never works coz everyones codes different
okay well a few things to note -
you have no run function as its called execute instead.
your function is also surrounded by an object which that function is also not using.
change the function name to execute and remove the object around it in your cmd
so just change the run to execute and go from there, alr
also remove the object around the parameters
take ur time
alright i removed the brackets and changed the run to execute
alright, lemme know what happens
if the interaction doesnt respond within 3 seconds, you need to defer
oh right i have .editReply
my other codes however use interaction.followUp
coz i have defer reply in my slash register
right
like here for eg
which cmd is giving the did not...
play.js , the new one im working on which is the current one im having errors with
wait a second
why do you have 2 interactionCreate events
one event shows this function
one event shows this function
the execute function has (interaction, client)
your cmd probably has (client, interaction)
flip them
so in your cmd you need to use (interaction, client)
no
the function must use the same parameters in the same order
also this
oh that
that code isnbt being used rn
im using inter create from my index
wait now i know why i couldnt get my interaction create to work in the evnt.. theyre flipped
dont listen to ppl who are rude to u btw. some give uncalled for responses and dont realize that it comes off as rude
yh ik
make sure the function is used correctly in all places of your code
yep its being rn
still get application did not respond
heres how it currently is
btw
my toher cmds have like a mod exports.data
so you flipped the function parameters in the interaction event right?
this one doesnt coz the subcommands dont work then
wait why are u doing module.exports.run
yh but ill use it once im done fixing this code
i have a mod exports data and a mod exports run
thats how my code works for some reason
you cant flip it once its fixed
thats the problem
if the event has (client, interaction), then the cmd needs to use (client, interaction)
vise-versa
do you call that function anywhere?
make sure to fix the function parameters and make sure the cmds are using it properly
otherwise, not much else i can do
yeah ik
my point is do i need a module.exports.data like this in my other command
or can it just be like this
how it is
the play cmd layout should look the same as others
thing is when i did mod exports.data = new i didnt have the subcommands
when i did setname play and the desc
the command just said /play and everything else wasnt there
this is my first time using subcommands so not sure
i dont work with builders unfortunately
also, i do have to go since i have class in a few minutes, but i hope i was able to help you
alright, yh u did
listen to people who are willing to help you, not those who give you a rude attitude
yeah thats how i do it
hope your code gets fixed. gtg bye!