Tyrrrz / DiscordChatExporter

Exports Discord chat logs to a file
MIT License
7.48k stars 682 forks source link

Cannot export a private channel I have on someone else's server: "Access is forbidden" #1108

Closed mdonovan5 closed 1 year ago

mdonovan5 commented 1 year ago

Version

v2.40.1

Flavor

CLI (Command-Line Interface)

Export format

HTML

Details

I can export channels no problem on my own server, but I have a private channel on a server I don't own. I have access to it. But DCE doesn't allow me to export it.

DiscordChatExporter.Core.Exceptions.DiscordChatExporterException: Access is forbidden. at DiscordChatExporter.Core.Discord.DiscordClient.GetJsonResponseAsync(String url, CancellationToken cancellationToken) in /D:\a\DiscordChatExporter\DiscordChatExporter\DiscordChatExporter.Core\Discord\DiscordClient.cs:135 at DiscordChatExporter.Core.Discord.DiscordClient.GetChannelAsync(Snowflake channelId, CancellationToken cancellationToken) in /D:\a\DiscordChatExporter\DiscordChatExporter\DiscordChatExporter.Core\Discord\DiscordClient.cs:364 at DiscordChatExporter.Core.Discord.DiscordClient.GetChannelAsync(Snowflake channelId, CancellationToken cancellationToken) in /D:\a\DiscordChatExporter\DiscordChatExporter\DiscordChatExporter.Core\Discord\DiscordClient.cs:371 at DiscordChatExporter.Cli.Commands.Base.ExportCommandBase.ExecuteAsync(IConsole console, IReadOnlyList1 channelIds) in /D:\a\DiscordChatExporter\DiscordChatExporter\DiscordChatExporter.Cli\Commands\Base\ExportCommandBase.cs:282 at DiscordChatExporter.Cli.Commands.ExportChannelsCommand.ExecuteAsync(IConsole console) in /D:\a\DiscordChatExporter\DiscordChatExporter\DiscordChatExporter.Cli\Commands\ExportChannelsCommand.cs:26 at CliFx.CliApplication.RunAsync(ApplicationSchema applicationSchema, CommandInput commandInput) in /_/CliFx/CliApplication.cs:153 at CliFx.CliApplication.RunAsync(IReadOnlyList1 commandLineArguments, IReadOnlyDictionary`2 environmentVariables) in /_/CliFx/CliApplication.cs:193

Steps to reproduce

dotnet DiscordChatExporter.Cli.dll export -t "token" -c "channel id of private channel"

mdonovan5 commented 1 year ago

@Tyrrrz You closed my ticket without explanation. Can you at least tell me why? How do I export the private channel?

Yudi commented 1 year ago

He fixed the issue in https://github.com/Tyrrrz/DiscordChatExporter/commit/bcf652edbe26753789fa1f1fb2a7516f99e7f1ff.

Download a preview build from the CI Artifacts and check if it works.

mdonovan5 commented 1 year ago

Oh sorry! I was confused. Thanks a lot that's really nice!

mdonovan5 commented 1 year ago

It works!

Jhonrodez commented 1 month ago

It works!

hi, i also having issues, it says "messages?limit=1' failed: forbidden" it's a private channel aswell, but i'm in there, thank you for your help! extract discord

Jhonrodez commented 1 month ago

He fixed the issue in bcf652e.

Download a preview build from the CI Artifacts and check if it works.

Yudi, boa tarde, poderia dar uma olhadinha e me ajudar? agradeço demais

Yudi commented 1 month ago

@Jhonrodez como você tem acesso ao canal, se o seu DCE está atualizado, vai precisar abrir uma issue para descrever o bug de maneira reproduzível, para que ele possa ser corrigido

Tente pelo DCE.CLI também


@Jhonrodez as you have access to the channel, if your DCE is up to date, you'll have to open a new issue to describe reproducible steps so the bug can be fixed

Try the CLI too

Jhonrodez commented 1 month ago

Yudi tem como eu te escrever no twitter ou alguma coisa? eu te dou uma força em crypto assim que consiga, realmente tentei baixar o CLI mas nao entendi como usar na verdade

Yudi commented 1 month ago

@Jhonrodez

  1. Baixe o DCE.CLI Windows x64
  2. Extraia o .ZIP (extraia, não apenas abra)
  3. Abra o Terminal ou Powershell (se não encontrar o 1º, tente o 2º)
  4. Digite cd e aperte Espaço
  5. Arraste a pasta que contém o DCE para a janela do Terminal e aperte ↵ ENTER

  1. Digite ./DiscordChatExporter.Cli e aperte ENTER para listar os comandos disponíveis
  2. Para exportar um canal, digite:
./DiscordChatExporter.Cli export -t <TOKEN> -c <ID_CANAL>

Substitua <TOKEN> e <ID_CANAL>, tirando os sinais <>

Para obter o ID de um canal:

  1. Abra as configurações do Discord
  2. Vá para a aba "Avançado"
  3. Habilite o "modo desenvolvedor"
  4. Clique com o botão direito do mouse no canal desejado e clique em Copiar ID do canal (Copy Channel ID)

Se quiser dar uma força, doe para o Tyrrrz, que fez essa ferramenta incrível! :-) Ele tinha carteiras crypto, mas tirou do site. Dá um @ nele pedindo a wallet, se quiser doar BTC, ETH ou SOL.

Se não conseguir com as instruções, me mande um e-mail ou uma mensagem no Discord

E se encontrar o mesmo bug no CLI, abra uma nova issue.


Using the CLI steps

I'd appreciate if you donated to Tyrrrz instead :-)

Email or message me on Discord if you have trouble following the steps

Open a new issue if you face the same bug

Jhonrodez commented 1 month ago

image obrigado, estou colocando algo errado Yudi?

Yudi commented 1 month ago

@Jhonrodez Sim, depois do passo 5, mas antes do 6, aperte ↵ Enter, para executar o comando cd <CAMINHO>

Esqueci desse detalhe