Discord.py使用bot邀请bot

2024-05-23 18:28:35 发布

您现在位置:Python中文网/ 问答频道 /正文

我试图让我的机器人使用discord.py邀请另一个机器人。对此有什么敬意吗?感谢所有帮助我的人。祝你过得愉快

@bot.command()
async def Invite(ctx, invite_link=None):
    if invite_link == None:
        await ctx.message.author.send(embed=discord.Embed(
                        title='**Syntax Error**',
                        description='**Please provide an invite Link!**',
                        color=discord.Color.red()
                        )
        return
    #Inviting function
    #Doing stuff....

Tags: pynonemessageasyncifdefbotlink