*编辑:我试着让它成为ctx.send。它不起作用。
我是一个新的Python开发人员。我使用Discord.py已经有一段时间了。我听说了NextCord并决定使用它。
还:我确保正确设置了意图。代码不会给我一个错误。只是没有反应!
import nextcord
from nextcord.ext import commands
from termcolor import colored
import os
os.system('color')
logo = """
█┼┼ ███ ███- ███ ███ ███ ██▄
█┼┼ █▄┼ █┼█- █┼┼ █┼█ █▄┼ █┼█
█▄█ █▄▄ █▄█- ███ █▄█ █┼█ ███
"""
print(colored(logo, "green"))
print(colored("Lam Bot coded by LeoDev only!", "green"))
TOKEN = 'token'
bot = commands.Bot(command_prefix='$')
@bot.event
async def on_ready():
print(colored("Bot Ready!","green"))
@bot.command()
async def ping(ctx):
await ctx.send('Pong!')
bot.run(TOKEN)当我在服务器中发送"$ping“时,它根本没有响应。没有错误。就是什么都没有!
发布于 2022-06-09 14:22:37
替换你的
bot = commands.Bot(command_prefix='$')至
intents = nextcord.Intents.default()
intents.message_content = True
bot=commands.Bot(command_prefix="$",intents=intents)https://stackoverflow.com/questions/72541814
复制相似问题