Mobile Status
I have tried to set the mobile status by doing the 
Discord iOS in ws/index.js but It doesn't seem to be working, is there any other way, I have also tried Discord Android same location. I am not sure if its my ready file that may be causing the mobile status not to appear but below I have attached my ready file as well, I did make a attepmt to add the location of the ws into my ready file
const AvonClientEvent = require("../../structures/Eventhandler");
const { Client, GatewayIntentBits, ActivityType } = require('discord.js');
const client = new Client({
  intents: [
    GatewayIntentBits.Guilds,
    // .. more intents as needed
  ],
  ws: { properties: { browser: 'Discord Android' } },
});
class AvonReady extends AvonClientEvent{
    get name(){
        return 'ready';
    }
    async run(){
        console.log(`${this.client.user.username} is Online!`);
        this.client.poru.init(this.client);
        
        // Define the statuses, types, botStatuses, and URLs for full customization
        let baseStatuses = [`${this.client.config.prefix}help`];
let statuses = baseStatuses.map(status => `${status}`);
        let types = [ActivityType.Listening]; // You can add more types in this array as needed
        let botStatuses = [ws: { properties: { browser: 'Discord Android' } }]; // You can add more bot statuses (like 'online', 'idle') in this array as needed
        let streamURL = "https://twitch.tv/rutrruns"; // Stream URL
        setInterval(() => {
            let status = statuses[Math.floor(Math.random()*statuses.length)];        
            let type = types[Math.floor(Math.random() * types.length)]; 
            let botStatus = botStatuses[Math.floor(Math.random() * botStatuses.length)];
            this.client.user.setPresence({
                activities: [
                    {
                        name: status,
                        type: type,
                        url: streamURL  // Add the streaming URL
                    }
                ],
                status: botStatus
            });
        }, 1000);
        const guilds = this.client.guilds.cache.map(x => x.id);
        guilds.forEach(async g => {
            let guild = await this.client.guilds.fetch(g);
            if(!guild) return;
            let db = await this.client.data.get(`${guild.id}-247`);
            if(!db || db === null)
            {
                this.client.data.set(`${guild.id}-247`,`disabled`)
            }
            else if(db === `disabled`)
            {
                this.client.data.delete(`${guild.id}-voice`);
                this.client.data.delete(`${guild.id}-text`);
            }
            else if(db === `enabled`)
            {
                let voiceChannel = guild.channels.cache.get(await this.client.data.get(`${guild.id}-voice`));
                if(!voiceChannel){
                    this.client.data.delete(`${guild.id}-voice`);
                    this.client.data.delete(`${guild.id}-text`);
                    this.client.data.set(`${guild.id}-247`,`disabled`);
                }
               try{ this.client.poru.createConnection({
                    guildId : guild.id,
                    textChannel : await this.client.data.get(`${guild.id}-text`),
                    voiceChannel : await this.client.data.get(`${guild.id}-voice`),
                    selfMute : false,
                    selfDeaf : true
                });
            } catch(e) { this.client.data.delete(`${guild.id}-text`); this.client.data.delete(`${guild.id}-voice`); this.client.data.set(`${guild.id}-247`,`disabled`) }
            }
        })
    }
}
const avonReady = new AvonReady(client);
module.exports = AvonReady;
const AvonClientEvent = require("../../structures/Eventhandler");
const { Client, GatewayIntentBits, ActivityType } = require('discord.js');
const client = new Client({
  intents: [
    GatewayIntentBits.Guilds,
    // .. more intents as needed
  ],
  ws: { properties: { browser: 'Discord Android' } },
});
class AvonReady extends AvonClientEvent{
    get name(){
        return 'ready';
    }
    async run(){
        console.log(`${this.client.user.username} is Online!`);
        this.client.poru.init(this.client);
        
        // Define the statuses, types, botStatuses, and URLs for full customization
        let baseStatuses = [`${this.client.config.prefix}help`];
let statuses = baseStatuses.map(status => `${status}`);
        let types = [ActivityType.Listening]; // You can add more types in this array as needed
        let botStatuses = [ws: { properties: { browser: 'Discord Android' } }]; // You can add more bot statuses (like 'online', 'idle') in this array as needed
        let streamURL = "https://twitch.tv/rutrruns"; // Stream URL
        setInterval(() => {
            let status = statuses[Math.floor(Math.random()*statuses.length)];        
            let type = types[Math.floor(Math.random() * types.length)]; 
            let botStatus = botStatuses[Math.floor(Math.random() * botStatuses.length)];
            this.client.user.setPresence({
                activities: [
                    {
                        name: status,
                        type: type,
                        url: streamURL  // Add the streaming URL
                    }
                ],
                status: botStatus
            });
        }, 1000);
        const guilds = this.client.guilds.cache.map(x => x.id);
        guilds.forEach(async g => {
            let guild = await this.client.guilds.fetch(g);
            if(!guild) return;
            let db = await this.client.data.get(`${guild.id}-247`);
            if(!db || db === null)
            {
                this.client.data.set(`${guild.id}-247`,`disabled`)
            }
            else if(db === `disabled`)
            {
                this.client.data.delete(`${guild.id}-voice`);
                this.client.data.delete(`${guild.id}-text`);
            }
            else if(db === `enabled`)
            {
                let voiceChannel = guild.channels.cache.get(await this.client.data.get(`${guild.id}-voice`));
                if(!voiceChannel){
                    this.client.data.delete(`${guild.id}-voice`);
                    this.client.data.delete(`${guild.id}-text`);
                    this.client.data.set(`${guild.id}-247`,`disabled`);
                }
               try{ this.client.poru.createConnection({
                    guildId : guild.id,
                    textChannel : await this.client.data.get(`${guild.id}-text`),
                    voiceChannel : await this.client.data.get(`${guild.id}-voice`),
                    selfMute : false,
                    selfDeaf : true
                });
            } catch(e) { this.client.data.delete(`${guild.id}-text`); this.client.data.delete(`${guild.id}-voice`); this.client.data.set(`${guild.id}-247`,`disabled`) }
            }
        })
    }
}
const avonReady = new AvonReady(client);
module.exports = AvonReady;
3 Replies
- What's your exact discord.js 
npm list discord.js and node node -v version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!we do not support this modification
bruh