Roblox Group Member Count to Discord

Why would you need to use a proxy?

Im aware of what noblox does, I used to use it before making my own. The thing he wants to do, Noblox doesnt have that function, You would have to use request or axios, to do what he wants.

Can’t you use HTTPService:RequestAsync for request?

he wants to do it via discord, not ingame. (So you would need to have an offsite host to run it)

Oh, now I know what you mean…

I want to try it too, could you put it in steps?

1 Like

I found another way you can use for group member count with Campfire. They offer free services for group member count and shout proxy webhooks for discord! Just go on products at the menu on the top. They offer really good services. https://campfirehq.net/

4 Likes

I dont think trusting a site with a webhook is ideal especially with cookies etc (looked briefly at there other stuff). It is quite easy to do this yourself aswell. Did this in abt 10 mins.

const axios = require('axios');
const discord = require("discord.js")
let GROUP_ID = 0
let GOAL = 100000
let count = 150
let wid = ""
let wtoken = ""

let webhook = new discord.WebhookClient(wid, wtoken)
async function updateCount() {
    let response = await axios.get(`https://groups.roblox.com/v1/groups/${GROUP_ID}/`)
    let response_count = response.data.memberCount 
    console.log("got request")
    if (count < response_count) {
        console.log(response_count, count) 
     const embed = new discord.RichEmbed()
.setTitle("New Group Member")
.setDescription(`${response.data.name} | We are at ${response_count} members. Only ${GOAL - response_count} members to go till ${GOAL}!`)
.setFooter("Bot made by: HmmBilly")
webhook.send(embed)      
  if (count == 0) {
            count = response_count
            return;
        }
        count = response_count
    }
}

setInterval(() => {

  updateCount()
}, 600000); ```
9 Likes

We don’t take cookies ever? It’s a webhook and an API.

1 Like

Yeah I was going to reply with the same, I have never known the site to take a Roblox Account cookie.

1 Like

Tried this out and it works, thank you!

Is this a webhook or a bot? Should I host it as a bot?

it uses this https://www.youtube.com/watch?v=utesBKFO7Cc

1 Like

That is not what that is. The code was hand made. Don’t assume because it is alike.

Unfortunately, campfire member counter has been discontinued due to some reason

Yeah I know, it sucks! I’m pretty sure they did this because they want to focus their website on discord bots, not webhooks.

Easiest way, make a loop run every 1 minute in a repl.it. Web scrape your groups membercount, mainly use snekfetch for that. I used this to gather a group shout.

const rbxapi = "https://groups.roblox.com/v1/groups/5627994";
const snekfetch = require("snekfetch");


module.exports = {
	name: 'getshout',
	description: 'Ping!',
	async execute(message, args) {
    snekfetch.get(rbxapi).then(r => {
      let body = r.body; 
		if (message.member.roles.cache.has('797513239545249822')) {
    message.reply(`This is what I fetched. ${body.shout.body}`);
      };
         });
	},
};

With that loop, check if the last member count is different to the new member count gathered, if it is then you use the code below to send the function.

  const guild = client.guilds.cache.get('your server id');
  const channel = guild.channels.cache.get('logging channel id that bot can talk in');
  channel.send(`We are currently at ${newmembernum}`);
1 Like

I made an easy way, follow this.

Tbh, I haven’t checked if it works, if it doesn’t play around with it until it does. The hard work is done, just make it loop around now.

as @Rare_tendo said this is what i learn

javascript:

const fetch = require('node-fetch')

async function getMembers(id) {
  // -- i wonder why "docs"
  var url = `https://groups.roblox.com/docs#!/Groups/${id}`
  fetch(url).then(res => res.json()).then(tbl => {
    return tbl.memberCount
  })
}

console.log(getMembers(123))
1 Like

The best way to fix this issue is the use the modulus operator!
You can use the modulus operator to make it send to the webhook every 10 members or a similar value.
In lua you’d do it like this:

memberCount.Changed:Connect(function()
  if memberCount.Value % 10 == 0 then
    webhook:Send()
  end
end)