#Why ii.channel.send(...) gives me a undefined but when console.log() shows everything is okay
64 messages · Page 1 of 1 (latest)
which channel.send?
142 linijka
but u re not logging it?
I am
where?
check line 140, 86, 130
channel.send return a promise
so what I have to do?
and isSelectMenu**()** is a fuction
Await it before log it
dziala bez () normalnie
but it will be always true
await ii.channel.send(`${toExchange} ${toReceive} ${amount}`) like this?
ta
What do you want console.log ?
i want to ii.channel.send(`${toExchange} ${toReceive} ${amount}`) start working
cuz it returns "undefined undefined undefined"
so toExchange , toReceive , amount are undefined
but Im setting their value and in console.log() it shows that value
but in sending message to channel it returns undefined
dobra po polsku bedzie lepiej mi to wytlumaczyc tobie
ustawiam normalnie ich wartosc i jak daje console.log to normalnie wszystko sie wyswietla w konsoli
ale jak probuje wyslac na kanal to wtedy pokazuje undefined
@cobalt flame
sorki za ping
Where?
for example line 131
c.values isn't toExchange, toReceive or amount
wdym?
english is difficult for me, sorry xD
In your code you never give a value to toExchange, toReceive or amount
You just declare it
Never assigning
i asign it in lines: 87, 131 and 141
No
and when I console.log toExchange, toReceive and amount it shows everything in console
only in channel.send it shows undefined
I can't find any console.log of toExchange, toReceive or amount
Send me your lines please
that is line 86: console.log(c.values) that is line 130: console.log(c.values) and that is line 140: console.log(collected)
Ok so where did you see "toExchange", "toReceive" or "amount" ?
okay im gonna replace it, wait
now the whole command doesnt work
"Interaction failed"
I think you don't understand
You declared 3 variables : toExchange, to Receive and amount at line 29-31 ok?
I understand what you said to me, so i tried to change console.logs to "toExchange", "toReceive" and "amount"
yes
How JavaScript can know the value of this variable ?
You never assigned it
cuz I asigned value to it
=== is if operator
oh
Not assignment