我正在使用 discord.py 制作一个重复命令,您在其中发送命令并重复您发送的消息。它有效,但唯一的问题是如果我使用空格,例如“你好,我是”打印出“你好”。我该如何解决?
这是我的代码:
import discord
import hypixel
from discord.ext import commands
bot = commands.Bot(command_prefix='>')
@bot.event
async def on_ready():
print("Ready to use!")
@bot.command()
async def ping(ctx):
await ctx.send('pong')
@bot.command()
async def send(ctx, message):
channel = bot.get_channel(718088854250323991)
await channel.send(message)
bot.run('Token')
Run Code Online (Sandbox Code Playgroud)