Closed sidanya closed 2 years ago
You can just replace bot token with user token and it will work just fine.
But it gives an error 401 (the channel id and my token are valid)
discordFS >>> booting discordFS +0ms
/root/node_modules/@discordjs/rest/dist/lib/handlers/SequentialHandler.cjs:287
throw new DiscordAPIError.DiscordAPIError(data, "code" in data ? data.code : data.error, status, method, url, requestData);
^
DiscordAPIError[0]: 401: Unauthorized
at SequentialHandler.runRequest (/root/node_modules/@discordjs/rest/dist/lib/handlers/SequentialHandler.cjs:287:15)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async SequentialHandler.queueRequest (/root/node_modules/@discordjs/rest/dist/lib/handlers/SequentialHandler.cjs:99:14)
at async REST.request (/root/node_modules/@discordjs/rest/dist/lib/REST.cjs:52:22)
at async DiscordFS.load (/root/node_modules/@forscht/ddrive/src/discordFS/index.js:59:31)
at async run (/root/run.js:22:5) {
rawError: { message: '401: Unauthorized', code: 0 },
code: 0,
status: 401,
method: 'GET',
url: 'https://discord.com/api/v10/channels/(hidden)/messages?limit=100',
requestBody: { files: undefined, json: undefined }
}
upd: i also tried using a group id with one user and it didn't work either
Do you have 2FA enabled? How did you extract user token?
Hi @idanyas , Thanks for bringing this up. To use the user token you will need to add one option in discordFS. I have updated README example. Please test your account with README example and let me know if you're still facing issue.
Thanks, it works now.
Of course, this is extremely dangerous, but instead of 7 or 14 boosts in the server, the user only needs to have a nitro to increase the maximum file size.