Replies: 1 comment 2 replies
-
It really depends on how you want to implement this. When I say "it depends", it's all about the needs of your app. If you need a robust way to store data, then you have to go with a database implementation (e.g. MySQL), but if you just want to store plaintext data and then parse it (in your case, links/URLs), a .json file (or even a .txt file as you mentioned) will be enough. My suggestion is, instead of using a text file (to avoid formatting and parsing problems) you should use a JSON file to store your links. You can then easily read the file when you want to randomly select a link. There are many examples, both in StackOverflow and the discord.py Discord server (and on the internet in general). |
Beta Was this translation helpful? Give feedback.
-
so i'm currently making a discord bot which helps out with an album exchange which my friend group uses.
and so basically, i can't find anything that can help out with being able to submit spotify/album links to the bot, so it puts it into a txt file, then when i draw the submitted albums, it randomly auto-selects one.
can anyone help out or point me into the right direction?
Beta Was this translation helpful? Give feedback.
All reactions