Peyton Keep

make ne a discord bot and name it Celestial Vision and put this as the logo and make the commands /text /welcome

[Viewing 1 image]

1 image attached
Kodari AI
KodariSep 8 at 12:11 pm 1
CelestialVisionBot
A Discord bot named Celestial Vision featuring a celestial-themed logo. It provides two primary commands: /text for generating or displaying custom text content, and /welcome for sending a warm welcome message to new members or users. The bot is built with discord.py, includes an embed-based welcome system, and supports text customization through slash commands. Designed for easy integration into any Discord server.

I’ll create the Celestial Vision bot with:

  1. /text for sending styled text messages.

  2. /welcome for branded member welcome messages.

  3. Automatic join welcomes when WELCOME_CHANNEL_ID is configured.

  4. Environment-based secrets, setup documentation, and a Celestial Vision logo asset.

Created the Celestial Vision Discord bot.

Included:

  • /text <message> command

  • /welcome <member> branded welcome command

  • Automatic member welcomes via WELCOME_CHANNEL_ID

  • Celestial Vision branding and SVG logo asset

  • .env configuration support

  • Cooldowns and error handling

  • requirements.txt

  • Setup instructions in README.md

To run it:

Shell
cp .env.example .env
pip install -r requirements.txt
python bot.py

Add your Discord bot token to .env as DISCORD_TOKEN=..., then upload the logo from assets/celestial-vision-logo.svg as the bot avatar in the Discord Developer Portal.

Peyton Keep

where do i find my discord token

Kodari AI
KodariSep 8 at 12:12 pm 1
  1. Select your Celestial Vision application, or click New Application.

  2. Open Bot in the left sidebar.

  3. Click Reset Token or View Token.

  4. Complete the confirmation prompt and copy the token.

  5. Put it in your project’s .env file:

Env
DISCORD_TOKEN=your_token_here

Keep the token private—never post it in chat, commit it to GitHub, or include it in screenshots. If it is ever exposed, immediately return to Developer Portal → Bot → Reset Token and replace it.

You may also need to enable Message Content Intent and Server Members Intent under Bot → Privileged Gateway Intents, depending on the bot’s features.

Peyton Keep

<redacted> is mytoken

Kodari AI
KodariSep 8 at 12:16 pm 1

That Discord bot token is now exposed. Reset it immediately:

  1. Select Celestial Vision.

  2. Go to Bot.

  3. Click Reset Token and confirm.

  4. Copy the new token and place it only in your local .env file:

Env
DISCORD_TOKEN=your_new_token_here

Do not share the new token here or commit .env to GitHub. The token you posted should be considered permanently compromised.

Peyton Keep

'ok now what

Kodari AI
KodariSep 8 at 12:17 pm 1
  1. Reset the exposed token in the Discord Developer Portal, then copy the new one. Don’t send it here.

  2. In your bot project folder, create or open .env:

Env
DISCORD_TOKEN=your_new_token_here
WELCOME_CHANNEL_ID=

Leave WELCOME_CHANNEL_ID blank for now, or add your welcome channel’s ID later.

  1. Install the dependencies:

Shell
pip install -r requirements.txt
  1. Invite the bot to your server:

  • Developer Portal → OAuth2 → URL Generator

  • Select scopes:

    • bot

    • applications.commands

  • Select permissions:

    • View Channels

    • Send Messages

    • Embed Links

    • Read Message History

  • Open the generated URL and choose your server.

  1. Start the bot:

Shell
python bot.py

You should see a message that Celestial Vision is online.

  1. In Discord, try:

Plain Text
/text Hello from Celestial Vision

and:

Plain Text
/welcome

If slash commands do not appear immediately, wait a few minutes or restart Discord. Set the bot’s logo in Developer Portal → General Information → App Icon using the logo file from the project’s assets folder.

Peyton Keep

its not letting select scopes

Kodari AI
KodariSep 8 at 12:20 pm 1

In the Discord Developer Portal:

  1. Open Applications and select Celestial Vision.

  2. If you do not see a Bot section, open Installation or Bot and click Add Bot / Reset Token.

  3. In the left menu, open OAuth2 → URL Generator.

  4. Under Scopes, click the checkbox next to:

    • bot

    • applications.commands

  5. After selecting bot, the Bot Permissions section should appear. Choose:

    • View Channels

    • Send Messages

    • Embed Links

    • Read Message History

  6. Scroll to the bottom, copy the generated URL, and open it in your browser.

If the checkboxes still cannot be selected:

  • Make sure you are using the Developer Portal, not the Discord server settings.

  • Use a desktop browser or enable desktop mode on mobile.

  • Confirm you are signed into the Discord account that owns or manages the application.

  • Try OAuth2 → URL Generator rather than the Installation page.

  • Make sure the bot user has been created under the Bot page first.

Never paste your token into the invite URL or share it.

Peyton Keep

now how do i add it into my discord'

Kodari AI
KodariSep 8 at 12:24 pm 1

To add Celestial Vision to your Discord server:

  1. Select Celestial Vision.

  2. Go to OAuth2 → URL Generator.

  3. Under Scopes, select:

    • bot

    • applications.commands

  4. Under Bot Permissions, select:

    • View Channels

    • Send Messages

    • Embed Links

    • Read Message History

  5. Scroll down and click Copy beside the generated URL.

  6. Paste that URL into your browser.

  7. Select your server and click Continue → Authorize.

  8. Complete the CAPTCHA if prompted.

You must own the server or have the Manage Server permission.

After adding it, start the bot on your computer:

Shell
python bot.py

The bot needs to be running before /text and /welcome will work. Do not put your token in the invite link or share it.

Peyton Keep

says no resluts found'

Kodari AI
KodariSep 8 at 12:25 pm 1

If the server selector says “No results found,” your Discord account probably doesn’t have permission to add bots to that server.

Try this:

  1. Make sure you are logged into the correct Discord account.

  2. In your server, open Server Settings → User Management → Members and confirm your account has Manage Server or Administrator.

  3. In the Developer Portal, open your app and go to OAuth2 → URL Generator.

  4. Select:

    • bot

    • applications.commands

  5. Choose the bot permissions, copy the generated URL, and open it in a browser where you are logged into Discord.

  6. Select the server from the dropdown.

If the server still does not appear, ask the server owner to either:

  • Give you Manage Server, or

  • Open the bot invite link and authorize Celestial Vision themselves.

Also make sure you created the bot under Developer Portal → Celestial Vision → Bot → Add Bot. The bot must exist before it can be invited.

Peyton Keep

now how do i inv

Kodari AI
KodariSep 8 at 12:30 pm 1

To invite Celestial Vision:

  1. Select Celestial Vision.

  2. Go to OAuth2 → URL Generator.

  3. Select these scopes:

    • bot

    • applications.commands

  4. Select permissions:

    • View Channels

    • Send Messages

    • Embed Links

    • Read Message History

  5. Scroll down and click Copy on the generated URL.

  6. Paste the URL into your browser.

  7. Select your Discord server, then click Continue → Authorize.

If your server does not appear, you need Manage Server permission, or the server owner must open the invite link.

After inviting it, run the bot:

Shell
python bot.py

The bot will only appear online and respond to commands while the program is running.

Peyton Keep

start my bot

Kodari AI
KodariSep 8 at 12:34 pm 1

Open a terminal in your bot’s project folder and run:

Shell
pip install -r requirements.txt
python bot.py

On Windows, use this if python doesn’t work:

Shell
py bot.py

Make sure your .env file contains the newly reset token:

Env
DISCORD_TOKEN=your_new_token_here

A successful startup should show something like:

Plain Text
Logged in as Celestial Vision

Keep the terminal open—the bot stays online only while the program is running. If you get an error, paste the error message here, but never paste your token.

Peyton Keep

i did it

Kodari AI
KodariSep 8 at 12:35 pm 1

Check Discord for the bot’s status:

  • Online: try one of its commands, such as /text or /welcome.

  • Offline: keep the terminal running and check for an error message.

  • Commands not appearing: wait a minute, restart Discord, and confirm the bot was invited with the applications.commands scope.

If it shows online but doesn’t respond, verify it has permission to view the channel and send messages.

Peyton Keep

its not joining

Kodari AI
KodariSep 8 at 12:39 pm 1

Starting the bot does not automatically add it to your server—you must invite it first.

  1. Open Developer Portal → Applications → Celestial Vision.

  2. Go to OAuth2 → URL Generator.

  3. Select:

    • bot

    • applications.commands

  4. Select Send Messages and View Channels under permissions.

  5. Copy the generated URL at the bottom.

  6. Open it in your browser, choose your server, and click Authorize.

If your server is missing from the list, you need Manage Server permission, or the server owner must use the invite link. Also confirm you are logged into the correct Discord account.

If the invite page says “No results found,” tell me whether you own the server and whether you see the server in Discord normally.

Peyton Keep

i did invite it

Kodari AI
KodariSep 8 at 12:40 pm 1

If Discord said “Authorized,” the bot should appear in the server even if it is offline.

Check these:

  1. Open your server’s Member List and search for Celestial Vision.

  2. If it is not there, generate a new invite using:

    • OAuth2 → URL Generator

    • Scopes: bot and applications.commands

  3. Make sure you selected the correct application and the correct server.

  4. You must own the server or have Manage Server permission.

  5. If Discord says it is already installed, check Server Settings → Integrations → Bots and Apps.

If the bot appears but is offline, run the bot again:

Shell
python bot.py

If it still does not appear, tell me exactly what happens after you click Authorize—for example, whether it says “Success,” “No results found,” or shows an error.

Kodari can make mistakes. Review important code before using.
Files
assets
.gitignore
bot.py
README.md
requirements.txt
Code
5 221
bot.py
import logging
import os
from typing import Optional

import discord
from discord import app_commands
from discord.ext import commands
from dotenv import load_dotenv


load_dotenv()

logging.basicConfig(
    level=logging.INFO,
    format="%(asctime)s | %(levelname)s | %(name)s | %(message)s",
)
logger = logging.getLogger("celestial-vision")


BRAND_COLOR = discord.Colour.from_rgb(15, 76, 152)
ACCENT_COLOR = discord.Colour.from_rgb(255, 174, 0)


class CelestialVisionBot(commands.Bot):
    def __init__(self) -> None:
        intents = discord.Intents.default()
        intents.members = True
        super().__init__(command_prefix="!", intents=intents)

    async def setup_hook(self) -> None:
        synced_commands = await self.tree.sync()
        logger.info("Synced %d application command(s)", len(synced_commands))


bot = CelestialVisionBot()


def logo_url() -> Optional[str]:
    value = os.getenv("LOGO_URL", "").strip()
    return value or None


def welcome_embed(member: discord.Member) -> discord.Embed:
    embed = discord.Embed(
        title="Welcome to Celestial Vision ✨",
        description=(
            f"Welcome {member.mention}!\n\n"
            "We’re glad you’re here. Take a look around, meet the community, "
            "and enjoy the view."
        ),
        colour=ACCENT_COLOR,
    )
    embed.set_footer(text="Celestial Vision • See beyond the ordinary")
    if logo := logo_url():
        embed.set_thumbnail(url=logo)
    return embed


@bot.event
async def on_ready() -> None:
    if bot.user is not None:
        logger.info("Logged in as %s (%s)", bot.user, bot.user.id)


@bot.event
async def on_member_join(member: discord.Member) -> None:
    channel_id = os.getenv("WELCOME_CHANNEL_ID", "").strip()
    if not channel_id:
        return

    try:
        channel = member.guild.get_channel(int(channel_id))
    except ValueError:
        logger.warning("WELCOME_CHANNEL_ID is not a valid channel ID")
        return

    if not isinstance(channel, discord.abc.Messageable):
        logger.warning("Configured welcome channel was not found or is not messageable")
        return

    try:
        await channel.send(embed=welcome_embed(member))
    except discord.Forbidden:
        logger.warning("Cannot send a welcome message in channel %s", channel_id)
    except discord.HTTPException:
        logger.exception("Discord rejected the automatic welcome message")


@bot.tree.command(name="text", description="Send a message as Celestial Vision")
@app_commands.describe(message="The message to send")
@app_commands.guild_only()
@app_commands.checks.cooldown(1, 5.0, key=lambda interaction: interaction.user.id)
async def text_command(interaction: discord.Interaction, message: str) -> None:
    await interaction.response.send_message(
        message,
        allowed_mentions=discord.AllowedMentions.none(),
    )


@bot.tree.command(name="welcome", description="Welcome a member with Celestial Vision branding")
@app_commands.describe(member="The member to welcome")
@app_commands.guild_only()
@app_commands.checks.cooldown(1, 10.0, key=lambda interaction: interaction.user.id)
async def welcome_command(interaction: discord.Interaction, member: discord.Member) -> None:
    await interaction.response.send_message(embed=welcome_embed(member))


@bot.tree.error
async def on_app_command_error(
    interaction: discord.Interaction,
    error: app_commands.AppCommandError,
) -> None:
    if isinstance(error, app_commands.CommandOnCooldown):
        message = f"Please wait {error.retry_after:.1f} seconds before using that command again."
    elif isinstance(error, app_commands.NoPrivateMessage):
        message = "This command can only be used inside a server."
    elif isinstance(error, app_commands.CheckFailure):
        message = "You cannot use that command right now."
    else:
        logger.exception("Unhandled application command error", exc_info=error)
        message = "Something went wrong while running that command."

    if interaction.response.is_done():
        await interaction.followup.send(message, ephemeral=True)
    else:
        await interaction.response.send_message(message, ephemeral=True)


def main() -> None:
    token = os.getenv("DISCORD_TOKEN", "").strip()
    if not token:
        raise RuntimeError("DISCORD_TOKEN is missing from the environment")

    bot.run(token, log_handler=None)


if __name__ == "__main__":
    main()