Glitch restrictions?


#1

Ok, so I have a tiny discord bot, which has a currency system. So when my bot gets added to a server, it automatically starts looping through all the members and adds them to the db. So yesterday, my bot was added to a server which has over 2000 members (you already know where this is going), so it started looping through 2000 members. I noticed that when I do now something sql related, it will take ages to get my command reply and sometimes it even doesn’t reply. I tested my code on my local machine, and on there, it gets sended immediately. So my question is if Glitch has something like a rate limit. If so, how can I get rid of it. It is quite annoying to wait over 10 minutes.

Thank you in advance,
~Motasim


#2

You are going to run up against a couple issues with the bot, mainly up-time and disk space restrictions. I haven’t done much with discord bots (but apparently really should since they seem to be all the rage) but, there was a guide posted by @Froosty earlier don’t know if it will help in your case but it might be worth a look over on [Discord] Bot Shutting Down.


#3

My bot works perfectly and doesn’t have downtime. The only problem is that it takes ages to get something sended that is related with sql.

~Motasim


#4

Since its discord related, let me put my nose into it. And since i am the first user around glitch from the discord community (unless there was someone hiding their presence),
Let me tell you a thing.
By the means you said it loops through every member in a guild, no matter what it does: its already a bad task around discord… your bot can even get in a guild with 10k members and trying to loop through 10k members, thats some massive API spam.
I guess you are trying to do currency system, so what you can do is update the database when the user requests for their currency.