Question: I'm trying to implement a function which messages the count of users assigned to a certain role.
A few months ago this worked flawlessly, but after a certain update it just stopped working correctly.

```
let count = message.guild.members.filter(m => m.roles.find(r => r.name === roleName)).size;
message.channel.send(user + " Count of users in " + roleName + ": "+count);

```

My code now looks like this:

```
let count = message.guild.members.cache.filter(m => m.roles.cache.find(r => r.name === roleName)).size; //These commands are in a module export, message is an object passed as an argument into it
message.channel.send(user + " Count of users in " + roleName + ": "+count);

```

Easy to say it doesn't work and it usually returns count of users that recently messaged or interacted with the bot. I tried using various `.fetch()` but they just return:

> 
> UnhandledPromiseRejectionWarning: Error [GUILD\_MEMBERS\_TIMEOUT]: Members didn't arrive in time
> 
> 
> 

...or something similair.
I tried `guild.members.fetch()`/`guild.fetch()` and such. Any help would be appreciated.

Answer: 
I finally figured it out. You can set the default name for the default branch in GitHub in:

> 
> Settings->Repositories.
> 
> 
> 

There, there is a section called "Repository default branch" that says:

> 
> "Choose the default branch for your new personal repositories. You
> might want to change the default name due to different workflows, or
> because your integrations still require “master” as the default branch
> name. You can always change the default branch name on individual repositories."
> 
> 
> 

Here you can change the default branch name from main to any name you want, including master.
> 
> but now, each time I create a new repository, the default branch is main, and when I do "git init" in a directory, the default branch is master, so I have to manually change it.
> 
> 
> 

That isn't exactly true. If you create a new *empty* repository at GitHub, and then, back at your local, you `git init` and add-and-commit and push, the `master` from your local goes up to GitHub just fine, and no `main` is ever created at local or at GitHub.

Moreover, even if `main` on GitHub *does* get created (e.g. because you added a Readme when you configured the repo at GitHub), nothing prevents you from hooking `master` on local to `main` on GitHub, so you could even just keep both and have them correspond to one another just fine.

Basically what I'm saying is that this fear at `main` of GitHub is generally overdone. There is actually nothing to worry about.