I cant run my Discord bot 24/7 with the new deploy updated

Hello I cant understand this at all. I have no programming/hacker background. PLZZ help.

Deployment log

info: Deployment: f7c781b6-1a3a-49d2-ab5e-5879642544c7 - 2023-09-26T18:23:34.704Z
info: Build: d36374ff-5bb5-4616-855f-9bdd4bd175e6 - 2023-09-26T18:23:34.707Z
info: Connecting to builder - 2023-09-26T18:23:34.710Z
info: Builder connected - 2023-09-26T18:23:36.805Z
info: Installing packages - 2023-09-26T18:23:37.017Z
info: Skipping Build as no Build command set - 2023-09-26T18:23:37.162Z
info: Language - 2023-09-26T18:23:37Z
info: Pushing pid1 binary layer... - 2023-09-26T18:23:37Z
info: Created pid1 binary layer - 2023-09-26T18:23:38Z
info: Skipping Python layer creation - 2023-09-26T18:23:39Z
info: Pushing hosting layer... - 2023-09-26T18:23:39Z
info: Retrieved cached nix layer - 2023-09-26T18:23:39Z
info: Created hosting layer - 2023-09-26T18:23:40Z
info: Created Repl layer - 2023-09-26T18:23:41Z
info: Pushing Repl (cache) layer... - 2023-09-26T18:23:41Z
info: Created Repl (cache) layer - 2023-09-26T18:23:43Z
info: Pushed image manifest - 2023-09-26T18:23:43Z
info: Pushed soci index manifest - 2023-09-26T18:23:43Z
info: Creating Autoscale service - 2023-09-26T18:23:51.629Z
[2023-09-26 18:24:00] [INFO    ] discord.client: logging in using static token
starting up user application
hostingpid1: an open port was not detected
error: The deployment failed to initialize due to a configuration or code error. Check the logs tab for more information. For additional support, please post on https://ask.replit.com/c/help/13 and a staff member will take a look. - 2023-09-26T18:25:15.303Z

My bot that will send messages from Channel A to channel B. including pictures, text, videos etc.

import discord
import os
from discord.ext import commands

intents = discord.Intents.default()
intents.messages = True
intents.message_content = True  # Enable message content intent

bot = commands.Bot(command_prefix='!', intents=intents)
TOKEN = os.getenv("TOKEN")
SOURCE_CHANNEL_ID =************************** (channel ID)
TARGET_CHANNEL_ID = *************************** (Channel ID)

async def on_ready():
    print(f'Logged in as {bot.user.name} ({bot.user.id})')

async def on_message(message):
    if message.channel.id == SOURCE_CHANNEL_ID and not message.author.bot:
        target_channel = bot.get_channel(TARGET_CHANNEL_ID)
        content = message.content
        if message.attachments:
            for attachment in message.attachments:
                await attachment.save(attachment.filename)
                with open(attachment.filename, "rb") as f:
                    file = discord.File(f)
                    await target_channel.send(content=content, file=file)
        elif content:
            await target_channel.send(content)

except discord.HTTPException as e:
    if e.status == 429:
        print("The Discord servers denied the connection for making too many requests.")
        raise e

Please Please PLEASE put these in Secrets! Unless you have a private Repl, these WILL be public to anyone viewing your Repl!

I think it worked now. Chatgpt 4.5 told me to add Flask and edits few stuff. But what do you guys think? Can the bot send ALL type of files inc. Mov, jpeg, PNG and GIF?

Am I suppose to add my secrets to the deployment?

If you have a deployed Repl, then you should have the secrets in both your dev and deployed Repl.

So I can deploy my secret it is fine? or is the deployment making it public? But I have to add the secrets for it to personal?

No, but anyone can find your dev Repl unless you make it Private, and then they can read your tokens unless you use Secrets.