.txt dosyasından rastgele bir satır seçen bir Discord botu yapmaya çalışıyordum, aşağıdaki resimde send'in renkli olması gerek ama beyaz gözüküyor. Acaba kodda mı bir yanlışlık var?
Python:
# bot.py
import discord
import os
import random
from discord.ext import commands
from dotenv import load_dotenv
load_dotenv()
TOKEN = "token"
intents = discord.Intents.all()
intents.message_content = True
bot = commands.Bot(command_prefix='.', intents=intents)
@bot.event
async def on_ready():
print(f'{bot.user.name} text')
@bot.command(name='rastgelefilm')
async def rf(ctx):
with open("movies.txt") as f:
lines = f.readlines()
response = random.choice(lines)
await ctx.send(response)
bot.run(TOKEN)