【问题标题】:Enter Discord Channel via Console通过控制台进入 Discord 频道
【发布时间】:2021-03-20 20:55:52
【问题描述】:

是否可以使用开发控制台(Ctrl + Shift + I)进入不和谐频道?

类似 "client.openChannel("channel_id")" 还是会加载频道的 fetch?

更具体地说

但不必让用户成为朋友或拥有用户 ID。

有了用户ID,你就可以用这个了

fetch("https://discord.com/api/v8/users/@me/channels", {
  "headers": {
    "accept": "*/*",
    "accept-language": "en-US",
    "authorization": "mfa.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "content-type": "application/json",
    "sec-fetch-dest": "empty",
    "sec-fetch-mode": "cors",
    "sec-fetch-site": "same-origin",
    "x-context-properties": "",
    "x-super-properties": ""
  },
  "referrer": "https://discord.com/channels/@me",
  "referrerPolicy": "no-referrer-when-downgrade",
  "body": "{\"recipients\":[\"USER_ID\"]}",
  "method": "POST",
  "mode": "cors",
  "credentials": "include"
});

它会打开该用户的 DM,但对于某些我只有频道 ID。

【问题讨论】:

    标签: discord


    【解决方案1】:

    这不是一个确切的答案,而是在某些情况下应该有效的解决方法。

    我从“隐私和安全”的“请求我的数据”中获得了所有频道 ID。

    当我在file.zip/messages/index.json 上获得频道 ID 后,我抓住了所有这些 ID 并拨打了电话

    let channels = ['54623165841324165','54623165841324165','54623165841324165']
    async function get_Channel_Data() {
      let channel_id = channels.pop();
      await sleep(2000);
      let response = await fetch("https://discord.com/api/v8/channels/" + channel_id, {
        "headers": {
          "accept": "*/*",
          "accept-language": "en-US",
          "authorization": "mfa.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
          "sec-fetch-dest": "empty",
          "sec-fetch-mode": "cors",
          "sec-fetch-site": "same-origin"
        },
        "referrer": "https://discord.com/channels/@me",
        "referrerPolicy": "no-referrer-when-downgrade",
        "body": null,
        "method": "GET",
        "mode": "cors",
        "credentials": "include"
      });
    
      let data = await response.json();
      // data.type 1 is a DM, data.type 0 is server
      if (data.type == 1) {
        // This is the user ID of the person you DM
        console.log(data.recipients[0].id);
      }
      get_Channel_Data();
    }
    

    然后对于每个用户 ID 调用

    let user_ids = ['54623165841324165','54623165841324165','54623165841324165']
    async function open_dms() {
      let user_id = user_ids.pop();
      if (user_id === undefined) {
        console.log("END");
        return false;
      }
      await sleep(2000);
      let response = await fetch("https://discord.com/api/v8/users/@me/channels", {
        "headers": {
          "accept": "*/*",
          "accept-language": "en-US",
          "authorization": "mfa.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
          "content-type": "application/json",
          "sec-fetch-dest": "empty",
          "sec-fetch-mode": "cors",
          "sec-fetch-site": "same-origin"
        },
        "referrer": "https://discord.com/channels/@me",
        "referrerPolicy": "no-referrer-when-downgrade",
        "body": "{\"recipients\":[\""+user_id+"\"]}",
        "method": "POST",
        "mode": "cors",
        "credentials": "include"
      });
    
      let data = await response.json();
      open_dms();
    }
    

    使用该用户 ID 打开 DM

    【讨论】:

      猜你喜欢
      • 2018-06-06
      • 2012-03-23
      • 2021-09-09
      • 2020-11-04
      • 1970-01-01
      • 1970-01-01
      • 2022-01-06
      • 2020-10-12
      • 2020-07-14
      相关资源
      最近更新 更多