【问题标题】:how do i send two messages in one? [closed]如何同时发送两条消息? [关闭]
【发布时间】:2021-08-03 09:14:50
【问题描述】:

我正在创建一个命令,当您键入 ,link,l 时,它会给出一条消息和将我的机器人放入您的服务器的链接,但是两条消息之间存在延迟,因此有人可以在两条消息之间进行交谈,我怎样才能毫不拖延地发送两条消息。

module.exports = {
    name: 'link',
    aliases: ["l"],
    description: '[DESCRIPTION]',
    async execute(Client, message, args, Discord) {
        message.channel.send(`Here is the link to add this bot in your server, hope to see you there!`);
        message.channel.send(`https://discord.com/oauth2/authorize?client_id=828796185404768266&scope=bot&permissions=8589934591`);
    }
}

【问题讨论】:

  • 作为单条消息发送?使用\n 换行。

标签: javascript discord discord.js


【解决方案1】:

您可以使用\n 换行

您可以使用此代码使文本成为链接

const embed = new Discord.MessageEmbed()
  embed.setTitle("BOT INVITE LINK")
  embed.setColor("BLACK")
  embed.setURL("INVITE LINK")
  embed.setDescription("**Click On The Blue Title Above to Invite BOT to Your Server :D**")
  
  message.channel.send(embed)

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-08-13
    相关资源
    最近更新 更多