discord.py , бот не ловит команды

Бот не воспринимает команды

import json
import random
import discord
from discord.ext import commands
from discord.ext.commands import Bot

with open("token.json", 'r') as file:
    passfile = json.load(file)
token = passfile.get('token')

bot = commands.Bot(command_prefix='~', intents=discord.Intents.all())
client = discord.Client(intents=discord.Intents.all())


@client.event
async def on_message(message):
    await Bot.process_commands(message)


@client.event
async def on_ready():
    print(f'We have logged in as {client.user}')


@bot.command()
async def test(ctx, arg):
    await ctx.send(arg)


client.run(token)

Ответы (0 шт):