Love
Love
DIAdiscord.js - Imagine a bot
Created by Love on 7/11/2023 in #djs-questions
execute function not ending after return statement?
Hello, I have the following assign.js command that I am trying to use to assign a targeted user to a specific team, which is kept track of in a MySQL database. https://hastebin.skyra.pw/tusanaxana.js When the user is not found to have registered in the database, I am expecting that the function should stop, because there is a return statement on line 26. However, this is not the case. All the subsequent lines of code still continue to run, and I'm not sure why. Any help would be greatly appreciated, thank you! This is what I get logged in my console after I run the command and purposefully select a user that has not registered, along with a team name that I know is not valid. https://hastebin.skyra.pw/egaxekiweb.txt
12 replies
DIAdiscord.js - Imagine a bot
Created by Love on 8/10/2022 in #djs-questions
Getting user from a message link
Hello, if I send my bot a message (msg_A) containing a link to a separate message (msg_B), how can I get the name/user who originally posted msg_B?
6 replies