This is a preview of how your server listing will look with the selected theme colors and background.
About 𝐕𝐀𝐋𝐗𝐄 𝐂𝐎𝐌𝐌𝐔𝐍𝐈𝐓𝐘
import discord
from openai import OpenAI
TOKEN = "DISCORD_BOT_TOKEN"
OPENAI_KEY = "OPENAI_API_KEY"
client_ai = OpenAI(api_key=OPENAI_KEY)
intents = discord.Intents.default()
intents.message_content = True
bot = discord.Client(intents=intents)
@bot.event
async def on_ready():
print(f"تم تشغيل البوت {bot.user}")
@bot.event
async def on_message(message):
if message.author == bot.user:
return
user_message = message.content
response = client_ai.chat.completions.create(
model="gpt-4.1-mini",
messages=[
{"role": "system", "content": "انت بوت ديسكورد يرد بالعربية فقط"},
{"role": "user", "content": user_message}
]
)
reply = response.choices[0].message.content
await message.channel.send(reply)
bot.run(TOKEN)
Categories
Primary Language
Reviews
Reviews are from Discord users. We moderate them. Read the review rules before posting.
No reviews yet.
Unverified reviews
Server Analytics Private
Listing updated
External Link
Platform
You are about to visit:
https://example.comThis will open in a new tab. Make sure you trust this link.