Update bot token docs (#1371)
Some checks failed
docker / pack (push) Has been cancelled
docker / deploy (push) Has been cancelled
main / format (push) Has been cancelled
main / test (push) Has been cancelled
main / pack (DiscordChatExporter.Cli, DiscordChatExporter.Cli, linux-arm) (push) Has been cancelled
main / pack (DiscordChatExporter.Cli, DiscordChatExporter.Cli, linux-arm64) (push) Has been cancelled
main / pack (DiscordChatExporter.Cli, DiscordChatExporter.Cli, linux-musl-x64) (push) Has been cancelled
main / pack (DiscordChatExporter.Cli, DiscordChatExporter.Cli, linux-x64) (push) Has been cancelled
main / pack (DiscordChatExporter.Cli, DiscordChatExporter.Cli, osx-arm64) (push) Has been cancelled
main / pack (DiscordChatExporter.Cli, DiscordChatExporter.Cli, osx-x64) (push) Has been cancelled
main / pack (DiscordChatExporter.Cli, DiscordChatExporter.Cli, win-arm64) (push) Has been cancelled
main / pack (DiscordChatExporter.Cli, DiscordChatExporter.Cli, win-x64) (push) Has been cancelled
main / pack (DiscordChatExporter.Cli, DiscordChatExporter.Cli, win-x86) (push) Has been cancelled
main / pack (DiscordChatExporter.Gui, DiscordChatExporter, linux-arm) (push) Has been cancelled
main / pack (DiscordChatExporter.Gui, DiscordChatExporter, linux-arm64) (push) Has been cancelled
main / pack (DiscordChatExporter.Gui, DiscordChatExporter, linux-musl-x64) (push) Has been cancelled
main / pack (DiscordChatExporter.Gui, DiscordChatExporter, linux-x64) (push) Has been cancelled
main / pack (DiscordChatExporter.Gui, DiscordChatExporter, osx-arm64) (push) Has been cancelled
main / pack (DiscordChatExporter.Gui, DiscordChatExporter, osx-x64) (push) Has been cancelled
main / pack (DiscordChatExporter.Gui, DiscordChatExporter, win-arm64) (push) Has been cancelled
main / pack (DiscordChatExporter.Gui, DiscordChatExporter, win-x64) (push) Has been cancelled
main / pack (DiscordChatExporter.Gui, DiscordChatExporter, win-x86) (push) Has been cancelled
main / release (push) Has been cancelled
main / deploy (DiscordChatExporter.Cli, DiscordChatExporter.Cli, linux-arm) (push) Has been cancelled
main / deploy (DiscordChatExporter.Cli, DiscordChatExporter.Cli, linux-arm64) (push) Has been cancelled
main / deploy (DiscordChatExporter.Cli, DiscordChatExporter.Cli, linux-musl-x64) (push) Has been cancelled
main / deploy (DiscordChatExporter.Cli, DiscordChatExporter.Cli, linux-x64) (push) Has been cancelled
main / deploy (DiscordChatExporter.Cli, DiscordChatExporter.Cli, osx-arm64) (push) Has been cancelled
main / deploy (DiscordChatExporter.Cli, DiscordChatExporter.Cli, osx-x64) (push) Has been cancelled
main / deploy (DiscordChatExporter.Cli, DiscordChatExporter.Cli, win-arm64) (push) Has been cancelled
main / deploy (DiscordChatExporter.Cli, DiscordChatExporter.Cli, win-x64) (push) Has been cancelled
main / deploy (DiscordChatExporter.Cli, DiscordChatExporter.Cli, win-x86) (push) Has been cancelled
main / deploy (DiscordChatExporter.Gui, DiscordChatExporter, linux-arm) (push) Has been cancelled
main / deploy (DiscordChatExporter.Gui, DiscordChatExporter, linux-arm64) (push) Has been cancelled
main / deploy (DiscordChatExporter.Gui, DiscordChatExporter, linux-musl-x64) (push) Has been cancelled
main / deploy (DiscordChatExporter.Gui, DiscordChatExporter, linux-x64) (push) Has been cancelled
main / deploy (DiscordChatExporter.Gui, DiscordChatExporter, osx-arm64) (push) Has been cancelled
main / deploy (DiscordChatExporter.Gui, DiscordChatExporter, osx-x64) (push) Has been cancelled
main / deploy (DiscordChatExporter.Gui, DiscordChatExporter, win-arm64) (push) Has been cancelled
main / deploy (DiscordChatExporter.Gui, DiscordChatExporter, win-x64) (push) Has been cancelled
main / deploy (DiscordChatExporter.Gui, DiscordChatExporter, win-x86) (push) Has been cancelled
main / notify (push) Has been cancelled

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Oleksii Holub <1935960+Tyrrrz@users.noreply.github.com>
This commit is contained in:
Yudi 2025-05-04 13:49:42 -03:00 committed by GitHub
parent f9fa35b6ad
commit 30ba273fb1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 78 additions and 12 deletions

View file

@ -1,10 +1,11 @@
# Obtaining Token and Channel IDs # Obtaining Token and Channel IDs
> **Warning**: > [!WARNING]
> **Do not share your token!** > **Do not share your token!** A token gives full access to an account.
> A token gives full access to an account. To reset a user token, change your account password. To reset a bot token, click on [Regenerate](#how-to-get-a-bot-token) in the bot settings. > To reset a user token, change your account password.
> To reset a bot token, click on [Reset Token](#how-to-export-with-a-bot-token) in the bot settings.
## How to get a User Token ## How to get a user token
**Caution:** [Automating user accounts violates Discord's terms of service](https://support.discord.com/hc/en-us/articles/115002192352-Automated-user-accounts-self-bots-) and may result in account termination. Use at your own risk. **Caution:** [Automating user accounts violates Discord's terms of service](https://support.discord.com/hc/en-us/articles/115002192352-Automated-user-accounts-self-bots-) and may result in account termination. Use at your own risk.
@ -254,17 +255,61 @@ Prerequisite step: Navigate to [discord.com](https://discord.com) and login.
4. Press <kbd>Esc</kbd>. The settings page will close. 4. Press <kbd>Esc</kbd>. The settings page will close.
5. To find your user token, continue [here](#in-chrome). 5. To find your user token, continue [here](#in-chrome).
## How to get a Bot Token ## How to export with a bot token
### Step 1 - Create an application
You can create a new application or use an existing one. If you want to create a new one:
1. Go to [Discord developer portal](https://discord.com/developers/applications)
2. Click on **New Application** in the top right corner
3. Enter a name for your application and click **Create**
### Step 2 - Invite the bot to your server
The bot needs to be invited to the server you'd like to export from.
1. Go to [Discord developer portal](https://discord.com/developers/applications)
2. Navigate to **General Information** on the left
3. Copy the **Application ID**
4. Open the following URL in your browser, replacing `YOUR_APP_ID` with the copied Client ID:
<!-- Permission code 66560 corresponds to "View Channels" and "Read Message History" permissions.
User can uncheck these when adding the bot to their server. -->
```
https://discord.com/oauth2/authorize?scope=bot&permissions=66560&client_id=YOUR_APP_ID
```
### Step 3 - Ensure message content intent is enabled
If this option is not enabled, the exported files will be empty.
1. Go to [Discord developer portal](https://discord.com/developers/applications) 1. Go to [Discord developer portal](https://discord.com/developers/applications)
2. Open your Application's settings 2. Open your Application's settings
3. Navigate to the **Bot** section on the left 3. Navigate to the **Bot** section on the left
4. Under **Token** click **Copy** 4. Scroll down to the **Privileged Gateway Intents** section
5. Enable **Message Content Intent** by toggling the switch
<img width="500" align="right" src="https://i.imgur.com/PPm2KKn.png" />
### Step 4 - Copy the bot token
If you don't have a bot token yet or if you've lost it, follow these steps to reset it:
1. Go to [Discord developer portal](https://discord.com/developers/applications)
2. Open your Application's settings
3. Navigate to the **Bot** section on the left
4. Under **Token** click **Reset Token**
5. Click **Yes, do it!** and authenticate to confirm
> **Tip**:
> As the token is only shown once, make sure to store it in a safe place. If you lose the token, you will have to reset it again.
> **Warning**: > **Warning**:
> Your bot needs to have **Message Content Intent** enabled for it to be able to read messages! > Resetting the token will invalidate the old one. Any integrations relying on the old token will cease to function until they are updated.
![https://discord.com/developers/applications/](https://i.imgur.com/BdrrxlY.png) ![https://discord.com/developers/applications/](https://i.imgur.com/soiB8Qc.png)
--- ---

View file

@ -24,7 +24,7 @@ Follow the [instructions here](Token-and-IDs.md).
### Will I get banned if I use this? ### Will I get banned if I use this?
Automating user accounts is technically against [TOS](https://discord.com/terms), use at your discretion. [Bot accounts](https://discord.com/developers/docs/topics/oauth2#bots) don't have this restriction. Automating user accounts is technically against [TOS](https://discord.com/terms), use at your discretion. [Bot accounts](https://discord.com/developers/docs/topics/oauth2#bot-users) don't have this restriction.
### Will the messages disappear from the exported file if I delete a message, delete my account or block a person? ### Will the messages disappear from the exported file if I delete a message, delete my account or block a person?

View file

@ -34,10 +34,17 @@ public class GuideCommand : ICommand
using (console.WithForegroundColor(ConsoleColor.White)) using (console.WithForegroundColor(ConsoleColor.White))
console.Output.WriteLine("To get the token for your bot:"); console.Output.WriteLine("To get the token for your bot:");
console.Output.WriteLine(
" The token is generated during bot creation. If you lost it, generate a new one:"
);
console.Output.WriteLine(" 1. Go to Discord developer portal"); console.Output.WriteLine(" 1. Go to Discord developer portal");
console.Output.WriteLine(" 2. Open your application's settings"); console.Output.WriteLine(" 2. Open your application's settings");
console.Output.WriteLine(" 3. Navigate to the Bot section on the left"); console.Output.WriteLine(" 3. Navigate to the Bot section on the left");
console.Output.WriteLine(" 4. Under Token click Copy"); console.Output.WriteLine(" 4. Under Token click Reset Token");
console.Output.WriteLine(" 5. Click Yes, do it! and authenticate to confirm");
console.Output.WriteLine(
" * Integrations using the previous token will stop working until updated"
);
console.Output.WriteLine( console.Output.WriteLine(
" * Your bot needs to have the Message Content Intent enabled to read messages" " * Your bot needs to have the Message Content Intent enabled to read messages"
); );

View file

@ -332,6 +332,9 @@
Text="To get the token for your bot:" /> Text="To get the token for your bot:" />
<LineBreak /> <LineBreak />
<Run BaselineAlignment="Center" Text="The token is generated during bot creation. If you lost it, generate a new one:" />
<LineBreak />
<Run BaselineAlignment="Center" Text="1. Open Discord" /> <Run BaselineAlignment="Center" Text="1. Open Discord" />
<controls:HyperLink Command="{Binding OpenDiscordDeveloperPortalCommand}" Text="developer portal" /> <controls:HyperLink Command="{Binding OpenDiscordDeveloperPortalCommand}" Text="developer portal" />
<LineBreak /> <LineBreak />
@ -356,7 +359,18 @@
<Run <Run
BaselineAlignment="Center" BaselineAlignment="Center"
FontWeight="SemiBold" FontWeight="SemiBold"
Text="Copy" /> Text="Reset Token" />
<LineBreak />
<Run BaselineAlignment="Center" Text="5. Click" />
<Run
BaselineAlignment="Center"
FontWeight="SemiBold"
Text="Yes, do it!" />
<Run BaselineAlignment="Center" Text="and authenticate to confirm" />
<LineBreak />
<Run BaselineAlignment="Center" Text="* Integrations using the previous token will stop working until updated" />
<LineBreak /> <LineBreak />
<Run BaselineAlignment="Center" Text="* Your bot needs to have the" /> <Run BaselineAlignment="Center" Text="* Your bot needs to have the" />

View file

@ -7,7 +7,7 @@
xmlns:viewModels="clr-namespace:DiscordChatExporter.Gui.ViewModels" xmlns:viewModels="clr-namespace:DiscordChatExporter.Gui.ViewModels"
Title="{Binding Title}" Title="{Binding Title}"
Width="625" Width="625"
Height="625" Height="665"
MinWidth="600" MinWidth="600"
MinHeight="400" MinHeight="400"
x:DataType="viewModels:MainViewModel" x:DataType="viewModels:MainViewModel"