Invite Tracker and Giveaway bot with a lot of features big bots use for premium features : )
https://github.com/levox00/Discord-Pyron-Bot
#Invite Tracker and Giveaway bot
1 messages · Page 1 of 1 (latest)
u shouldnt be using json as a database
If something was to be interrupted for instance, the json file itself would be corrupted. Json is mainly used for configurations, not a db
!!nojson
Why JSON is unsuitable as a database.
1) JSON, quite simply, is not a database. It's not designed to be a data storage format, rather a way of transmitting data over a network. It's also often used as a way of doing configuration files for programs.
2) There is no redundancy built in to JSON. JSON is just a format, and Python has libraries for it like json and ujson that let you load and dump it, sometimes to files, but that's all it does, write data to a file. There is no sort of DBMS (Database Management System), which means no sort of sophistication in how the data is stored, or built in ways to keep it safe and backed up, there's no built in encryption either - bear in mind in larger applications encryption may be necessary for GDPR/relevant data protection regulations compliance.
3) JSON, unlike relational databases, has no way to store relational data, which is a very commonly needed way of storing data. Relational data, as the name may suggest, is data that relates to other data. For example if you have a table of users and a table of servers, the server table will probably have an owner field, where you'd reference a user from the users table. [This is only relevant for relational data]
4) JSON is primarily a KV (key-value) format, for example `` where a is the key and b is the value, but what if you want to search not by that key but by a sub-key? Well, instead of being able to quickly use var[key], which in a Python dictionary has a constant return time (for more info look up hash tables), you now have to iterate through every object in the dictionary and compare to find what you're looking for. Most relational database systems, like MySQL, MariaDB, and PostgreSQL have ways of indexing secondary fields apart from the primary key so that you can easily search by multiple attributes.
For more info and resources about storing persistent data, please see https://vcokltfre.dev/tips/storage/
What should I use instead then?
Invite Tracker uses csv to export leaderboards do they use that as their database?
csv isnt a database
its more of a data storing as a tabular form
u dont have to exactly copy other bots
as in the db part btw
Huh? What did I copy in my database
Do u mean which file format to use
im not saying u copied
if u're gonna use mysql, then use .sql as the file format
and if I use sqlite
I saw more people suggesting sqlite online
i havent checked the whole thing but the ones i checked before arent bad
alr ty
@normal vessel I tried it
Doesnt seem to work that good
Should I make a seperate file for leaderboards and update it everytime someone joins the server
Or should I just keep it like that for now
i mean you could try that
i personally never tried sqlite since i mostly use mongodb
Rn I have a file for each server where every user has a invites list leaves list and counts for each so my bot only looks at the top counts and subtract the invite count - leaves count for the invited people that are still in the server
Do the invite and leave list make the process of that slower?
you'll have to ask that in #help since im not entirely sure about the speed
Finally
no
Here
Added some more stuff than on the video
Trying to do joun roles now
Accepting collaborators?
Sorry, what can collaborators do Im new to github
Collaboration
@silk sand whats ur user
Sorry for not responding. What would u do as a contributor?
@silk sand
Not sure, do you have some kinda new functiosn in mind, I can help w etc?
Or would you like me to be occassionally contrubuting send PRs and maybe you can accept/ decline?
Yes I do, I would have next made minimum account age to join a server.
On the roadmap you can see features I want to add and if I get new ideas or someone requests a feature I will add them to the roadmap
Yeah you can do that if you want to.
Would be appreciated
Alr
PRs it is
Don't expect too much PRs yet cuz I'm kinda busy this few months
sorry!
I also don't work a lot on the bot atm only when I have time and want to add new features to use on my discord server.

