Small tip: creating a new connection for each request is considered as a bad practice, because for relatively large bots that’ll just connect and disconnect your bot dozens of time. Usually you want a method to create the connection only when needed, and return it as much as you need (and don’t forget to close it when your bot is shut down)
Can i make this system if i understand the video or sqlite My command is setchannel imagine there are 3 servers using my bot Server1 setchannel for general Server2 setchannel for bot-commands Server3 setchannel for chatting Bot should respond for each server channel Can i make it with database in video?
Which Autocompleter is this? Its so nice you even didn't type anything and it knows what you'll code and you just press enter, enter, enter. Its a good plugin can you say what it is called?
@@glowstik I need to do it because I can't find out how to exchange a url link between two bots, since sending a DM to each other doesnt work... so I was thinking about storing the link in a shared database database so that both can read it
17:18 man didnt even respond to the travis scott thing bro
Glow pin this lol
Small tip: creating a new connection for each request is considered as a bad practice, because for relatively large bots that’ll just connect and disconnect your bot dozens of time. Usually you want a method to create the connection only when needed, and return it as much as you need (and don’t forget to close it when your bot is shut down)
How to do that
any tutorial videos?
Please share how to do that
Is there a tutorial for this one?
Use classes?
The ctrl shift p is called command pallet btw
This doesn't work anymore. Right when you hit run for the first time, we get errors.
i know u wont believe it i was just banging my head thinking how could i use a db in my bot
Are you supposed to only be able to add one user at a time with this example?
where you make id and guild integers, does it work if you do strings too?
Is there a way to pull the data from a Json to the db without having to re-enter everything?
Heyy whats the extension you're using that gives this error messages directly in your code ? That's very useful
I think its called Error Lens
its also listed in my youtube short: th-cam.com/users/shorts2w0vly6i3Io
@@glowstik Yay thanks, just installed it !
Hey what's the name of theme that you use on vsc
sublime monakai
Hey how you check your users added if you dont use VSC
you can always make a command that checks for you...
Can i make this system if i understand the video or sqlite
My command is setchannel imagine there are 3 servers using my bot
Server1 setchannel for general
Server2 setchannel for bot-commands
Server3 setchannel for chatting
Bot should respond for each server channel
Can i make it with database in video?
Is it work like this store guild ids then store set channel ids for each guilds?
isn't it very bad to connect for each command? Normally you connect and stay connected or no?
yeah typically you should connect on ready and leave it be, i fix this in later tutorials
@@glowstik you shouldn't connect it on ready
on ready can trigger two times
instead do it in your bot class
Which Autocompleter is this? Its so nice you even didn't type anything and it knows what you'll code and you just press enter, enter, enter. Its a good plugin can you say what it is called?
its called tabine... tab9.in/glowstik if you wanna install it
@@glowstik sure thx!
@@glowstik link not work error 404 can help to install it
Hey nice video, can you explain how to make a shared database between two discord bots so that both can access it?
sqlite is a local db, you would need to use something like a postgres server or mongodb to achieve that
@@glowstik I need to do it because I can't find out how to exchange a url link between two bots, since sending a DM to each other doesnt work... so I was thinking about storing the link in a shared database database so that both can read it
good video, it helped me a lot :D
2 min gang
fisrt
sqlite is pretty meh
its simple and easy to use ._.