Python, await ctx.send(response) yazarken send algılanmıyor

Mor1arty

Picopat
Katılım
17 Aralık 2022
Mesajlar
201
Çözümler
2
Daha fazla  
Cinsiyet
Erkek
.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?
Screenshot_20230106_160053.png

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)
 

Technopat Haberler

Geri
Yukarı