Step 1: Create a Discord Application
Go to the Discord Developer Portal:

Open your browser and go to https://discord.com/developers/applications
Log in with your Discord account if you haven’t already.

Create a New Application:

Click on the "New Application" button in the top right corner.
Give your application a name (this will be the name of your bot) and click "Create".


Step 2: Create a Bot User
Add a Bot to Your Application:

On the left-hand side, click on the "Bot" tab.
Click on "Add Bot" and confirm by clicking "Yes, do it!".
Your bot will now appear under the "Bot" section. You can customize its name and avatar if you wish.
Make sure you enable the Message Content Intent toggle here.

Get the Bot Token:

Under the "Token" section, click on "Copy" to copy the bot token to your clipboard.
Important: Keep this token secure. Do not share it publicly, as it provides full control over the bot.

Step 3: Invite the Bot to Your Server
Generate an OAuth2 URL:

On the left-hand side, click on the "OAuth2" tab.
Under "OAuth2 URL Generator," select the "bot" scope.
In the "Bot Permissions" section, select the permissions your bot will need. For basic operations, you might want to enable "Send Messages," "Read Message History," and "Connect."

Copy the Invite URL:

Copy the generated URL and paste it into your browser.
Select the server where you want to add the bot and click "Authorize."

Copy the Channel ID:

To copy the channel ID you may need to enable developer mode within the discord client.
settings>advanced>developer mode
You will then get context menus when right clicking a channel for the ID