Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't load lots of messages with user token #33

Closed
idanyas opened this issue Sep 13, 2022 · 16 comments
Closed

Can't load lots of messages with user token #33

idanyas opened this issue Sep 13, 2022 · 16 comments
Labels
bug Something isn't working

Comments

@idanyas
Copy link

idanyas commented Sep 13, 2022

I have a discord channel with ~248.9gb of data and I use a user token, the problem is that at first everything worked, but when the data size increased I started getting:

discordFS >>> booting discordFS +0ms (and then ddrive closes)
2022-09-13_13-48

The Discord account itself is alive, through the client I can easily read messages and download files from the channel. (as well as upload them)

@idanyas
Copy link
Author

idanyas commented Sep 13, 2022

after very many runs it started

2022-09-13_14-57

@forscht
Copy link
Owner

forscht commented Sep 16, 2022

Are you trying from local machine? I think it's memory issue

@idanyas
Copy link
Author

idanyas commented Sep 16, 2022

I don't think the problem is memory, I have 24GB of RAM on my VPS and most of the time memory is free (including when I run ddrive, you can see it in the screenshot below)

I also tried running the bot, and after 5 minutes I got the standard error that the messages in the channel were not sent by the bot. (I think it managed to read all the messages successfully, unlike the user)

screenshot.png

@forscht
Copy link
Owner

forscht commented Sep 17, 2022

Does your bot have Message Content Intent enabled?

@forscht
Copy link
Owner

forscht commented Sep 17, 2022

@idanyas Can you join https://discord.gg/3TCZRYafhW to discuss further?

@idanyas
Copy link
Author

idanyas commented Sep 17, 2022

ah, I answer through a translator. I don't think we can talk normally, but I can try.

@idanyas
Copy link
Author

idanyas commented Sep 17, 2022

Does your bot have Message Content Intent enabled?

Oh, I think I forgot about that. Gave the bot this feature and it was able to start.

YMM5CI7

@forscht
Copy link
Owner

forscht commented Sep 17, 2022

Closing the issue and updating the README

@forscht forscht closed this as completed Sep 17, 2022
@idanyas
Copy link
Author

idanyas commented Sep 17, 2022

But it still does not start using the user token.

screenshot.png

@idanyas
Copy link
Author

idanyas commented Sep 17, 2022

@forscht

@forscht
Copy link
Owner

forscht commented Sep 17, 2022

@idanyas Have you tried this option?

// authPrefix: '', Uncomment this if you're using user token

@forscht forscht reopened this Sep 17, 2022
@forscht
Copy link
Owner

forscht commented Sep 17, 2022

const restOpts = {
    timeout: '60000',
    authPrefix: '', // Uncomment this if you're using user token
}
const discordFS = new DiscordFS({
    token, channelId, rest: restOpts, chunkSize,
})

@idanyas
Copy link
Author

idanyas commented Sep 18, 2022

Yes, of course.

The thing is that when there was not much data, everything ran smoothly. However, when a lot of data is stored (in my case about 250GB) it stops starting.

and at the same time if I start from the bot (not from the user) everything runs smoothly

@idanyas
Copy link
Author

idanyas commented Sep 21, 2022

Maybe mark it as a bug?

@forscht
Copy link
Owner

forscht commented Sep 21, 2022

@idanyas I think it's not bug but Discord is rate limiting get message API for users token

@forscht forscht added the bug Something isn't working label Sep 21, 2022
@idanyas
Copy link
Author

idanyas commented Sep 21, 2022

I think so, too. When you start with a user token it starts instantly unlike bots. (until it reaches rate limits and stops starting, of course.)

I assume for now the solution is not to store too much data using the user token. Given the recent update with 500MB files makes it a lot easier.

@forscht forscht pinned this issue Sep 22, 2022
@forscht forscht changed the title can't start discordfs Can't load lots of messages with user token Sep 22, 2022
@forscht forscht closed this as completed Sep 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants