该命令根本不起作用print()
。我不知道错误是什么,我只能说它仅在andprint()
中不起作用。如果它不包含在他们的作品中,那么它可以正常工作。这是代码:@client.event
@client.command()
import discord
import asyncio
from discord.ext import commands
from array import *
client = discord.ext.commands.Bot(command_prefix = "!")
@client.event
async def on_ready():
activity = discord.Activity(name='No game No live: Zero', type=discord.ActivityType.watching, details="Kawaii~")
await client.change_presence(activity=activity)
print('We have logged in as {0.user}'.format(client))
@client.event
async def on_message(message):
await client.process_commands(message)
if message.author == client.user:
return
if message.content.startswith('id'):
await message.channel.send(
embed = discord.Embed(
title='Инфо',
description=message.channel.id,
color=message.author.color
).set_thumbnail(
url='https://i.imgur.com/zizM1Qk.jpg'
))
print('123')
@client.command(pass_context=True)
async def привет(ctx):
await ctx.send(f'{ctx.message.author.mention}, Привет!')
@client.command(pass_context=True)
async def хелп(ctx):
await ctx.send('Я бот, да ты и сам знаешь.\n**Мои команды:**\n```!привет - Вывод сообщения с приветом.``` ```!хелп - эта команда.```')
@client.command(pass_context=True)
async def print(ctx, *, text):
gg = "".join(text)
await ctx.send(gg)
client.run('TOKEN')
你有一个叫做 print 的命令吗
不要对命令使用保留字
您需要重命名命令,错误就会消失