Discord 从 id 获取机器人信息

问题描述

我想获取机器人信息,如姓名、头像 ecc。通过使用 id。
为了获取用户信息,我使用以下代码

--transpile-only

如何仅使用机器人 ID 对机器人执行类似操作?
感谢您的建议,对于糟糕的英语深表歉意!

编辑:

        fetch('https://discord.com/api/users/@me',{
              headers: {
                  authorization: `Bearer ${accesstoken}`
              }
          })
              .then(result => result.json())
              .then(response => {
                 console.log(response)
                // do something
            })
        })

我找到了这个代码,但是当我尝试它时,它给了我一个错误

        fetch(`https://discord.com/api/users/${data.id}`,{
            
        })

我该如何解决

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)