Moblie Status Indicator For Bot

So according to someone on Github you can make your Bot appear online on Mobile Client :

    const Discord = require('discord.js')
    const Client = new Discord.Client()
    const Constants = require('discord.js/src/util/Constants.js')
    Constants.DefaultOptions.ws.properties.$browser = `Discord iOS`
    Client.on("ready", () => {
      console.log("Loading status..")
      Client.user.setActivity(`!help for commands`, { type: 3, browser: "DISCORD IOS"  });
    });

the code is working and bot came online with a phone status indicator, did a little search and found the same code from constants.js in a file named gateway.py from discord.py library : pic

I know this is a dumb question to ask but i’d appreciate if anyone can actually help me out with this.
Thanks!

1 thought on “Moblie Status Indicator For Bot”

  1. As you can see from the JS code you sent, the program requires a specific file from the library, applies a few changes to it, and then connects as a mobile user.

    If you wanted to perform the same trick using discord.py, I’d suggest you to dig a little bit inside the library (you could compare with discord.js, I’m sure this part should be quite similar) and then come up with your own, working mobile connection system for python !

    Reply

Leave a Comment