Discord бот не отвечает на серверах
Код:
import openai
import discord
from discord.ext import commands
openai.api_key = "ключик"
bot = commands.Bot(command_prefix='/', intents=discord.Intents.default())
@bot.command()
async def chat(ctx, *, message):
if ctx.guild is None:
await ctx.send("This command can only be used on a server.")
return
response = openai.Completion.create(
engine="text-davinci-002",
prompt=f"User: {message}",
max_tokens=2048,
n=1,
stop=None,
temperature=0.5,
)
await ctx.send(f'ChatGPT: {response.choices[0].text}')
bot.run('токен')
пытался решить проблему чекая разрешения и настройки, но не разобрался. Стоит разрешение отправлять сообщения, закинул на сервер, но отвечает только в лс