You're right. It's not a good idea to hardcode sensitive information such as API tokens directly in your code. Instead, you can use environment variables to securely store and access the token. Here's how you can do that:

1. First, install the python-dotenv package to easily work with environment variables:
``` 
pip install python-dotenv
``` 
2. Create a new file named .env in the same directory as your Python script. In this file, add the following line:
```
DISCORD_TOKEN=your_token_here
```
Replace your_token_here with your actual Discord API token.

3. Modify your Python script to load the token from the environment variable using python-dotenv. Here's the updated script:
```
import os
import discord
from discord.ext import commands
from dotenv import load_dotenv

load_dotenv()
token = os.getenv('DISCORD_TOKEN')

bot = commands.Bot(command_prefix='!')

@bot.event
async def on_ready():
    print(f'{bot.user.name} has connected to Discord!')

@bot.command()
async def hello(ctx):
    await ctx.send('Hello!')

bot.run(token)
```
Now, your Discord token is stored securely in the .env file and accessed through the environment variable in your script. Make sure to add the .env file to your .gitignore if you're using version control to prevent accidentally sharing your token.
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence