DrBr1ll14nt
80+
- Katılım
- 12 Kasım 2020
- Mesajlar
- 3
Dahası
- Reaksiyon skoru
- 0
- İsim
- Kaan KORKMAZ
Python:
import discord
from discord.ext import commands
class MyClient(discord.Client):
async def on_ready(self):
print(f'{self.user} Giris yapti!')
async def on_message(self, message):
print(f'{message.author} Adli kisiden mesaj var: {message.content}')
intents = discord.Intents.default()
intents.message_content = True
bot = commands.Bot(command_prefix='!', intents=intents)
@bot.command()
async def test(ctx, arg):
await ctx.send(arg)
bot.add_command(test)
client = MyClient(intents=intents)
client.run('token')
Bu kodda aşağıdaki şekilde bir hata alıyorum:
Kod:
Traceback (most recent call last):
File "c:\Users\kaank\Desktop\kozmos.py\main.py", line 20, in <module>
bot.add_command(test)
~~~~~~~~~~~~~~~^^^^^^
File "C:\Users\kaank\AppData\Local\Programs\Python\Python313\Lib\site-packages\discord\ext\commands\bot.py", line 253, in add_command
super().add_command(command)
~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "C:\Users\kaank\AppData\Local\Programs\Python\Python313\Lib\site-packages\discord\ext\c
ommands\core.py", line 1356, in add_command
raise CommandRegistrationError(command.name)
discord.ext.commands.errors.CommandRegistrationError: The command test is already an existing command or alias.
Yardım edebilirmisiniz?