Javascript
Alright guys, quick question if i am new to javascript (i want to learn typescript by the way.) and discord developement in general. Where should i start from, and what do i need to learn?
27 Replies
for js what i did was follow some yt tutorials (dont just look at what they are writing and copy it)
and for discord.js i recommend https://discord.js.org
i learned js through discord bot development so it is possible. but make sure to try and build your own stuff instead of following line by line on a yt tutorial. and when ur starting out i dont think using sapphire is good for ur very first bot. you should follow the tutorial on the discordjs website first to learn how everything works and then maybe try making ur own command handler by looking at some tutorials and after that u can try sapphire, but thats just my opinion
discord.js
discord.js
discord.js is a powerful Node.js module that allows you to interact with the Discord API very easily. It takes a much more object-oriented approach than most other JS Discord libraries, making your bot's code significantly tidier and easier to comprehend.
this is the guide i was talking about https://discordjs.guide/
discord.js Guide
Imagine a guide... that explores the many possibilities for your discord.js bot.
i hate discord.js
um okay
may i know why?
well
i tried following some tutorials
heres what i ended up with
😭
and i've heard its bad from others
well discordjs is obviously not bad since almost everyone uses it for js based bots
and its very beginner friendly
do u know what the code does?
it seems like u just copied line by line from a yt tutorial
kinda
not really
xd i did
but like every tutorial i watch i dont understand anything
i got to the event point where i can write events and stuff
discord.js Guide
Imagine a guide... that explores the many possibilities for your discord.js bot.
okay 👍
i want to learn typescript tho
discordjs is more beginner friendly than other js librarys
u have to know js before u learn ts
first get a decent grasp on js
ts is just js with types
the code is almost identical between the two
how do i learn js
if u wanna focus on bot dev just make some small bots
using js
if ur confused just google it
and try to solve it on ur own
if u just wanna learn js
try w3schools
there are many ways just find which works for u
chatgpt is also good when ur confused on how to do something
also is is a support server for Sapphire Framework
not a server for learning js
i know
but i just wanted a quick question
and i wanted to learn sapphire
There are no other relevant ones tbh
There's that one that integrates with NestJS but that's about it
i heard eris was good, dyno uses it.
outdated
from what i've heard
that's why i didnt use it
last commit was 4 days ago
i don't think its outdated
hmm
okay ill check it out
stick with djs lol
sapphire uses discordjs
so if u want to learn sapphire
learning djs is the way to go
i want to
it makes my brain tingly
Dyno doesn't. They use their own fork which isn't even Eris anymore really.
ive been lied to by the
?info
command, my disappointment is immenseThey forked it years and years ago
I mean it's Dyno are you really surprised
On a scale of 1 to mee6 they're about a level 80 bad
lol
Before you make a Discord Bot, you should have a good understanding of JavaScript. This means you should have a basic understanding of the following topics:
- Read and understand docs
- Debug code
- Syntax
- NodeJS module system
If you aren't sure that your understanding of JavaScript is truly good enough to make a bot, you should try to continue learning first. Here are good resources to learn both Javascript and NodeJS:
- Codecademy: https://www.codecademy.com/learn/javascript
- Udemy: https://www.udemy.com/javascript-essentials/
- Eloquent JavaScript, free book: http://eloquentjavascript.net/
- You-Dont-Know-JS: https://github.com/getify/You-Dont-Know-JS
- JavaScript Garden: https://bonsaiden.github.io/JavaScript-Garden/
- JavaScript reference/docs: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference
- Nodeschool: https://nodeschool.io/
- Pluralsight: https://www.codeschool.com/courses/real-time-web-with-node-js
Before you ask a question, you should ask these yourself:
1. Is this question related to JavaScript, or the library I am using?
- If it is the library you are using, go to the proper server. You would get better answers there.
2. Have I tried to google and/or check StackOverflow?
- Double-check that you can't find anywhere that can lead you to a solution online.
3. Have I tried to look on MDN or the library documentation?
- You should always check documentation to make sure you aren't missing any details.
4. Does my question make enough sense so that people can understand it, and do they understand what I am trying to accomplish?
- If no, revise your question. Give as much detail as possible. Include any error or code output that can help us help you.
5. Am I aware of what I am doing, and not just mindlessly copying and pasting?
- If you are just copying and pasting code from a guide, you are not going to be able to solve anything. Make sure you understand the code you are writing.