Top-gg-Community / dotnet-sdk

MIT License
32 stars 11 forks source link

UpdateStatsAsync Overloads Not Clear #8

Closed devhl-labs closed 4 years ago

devhl-labs commented 4 years ago

There is an overload of UpdateStatsAsync that accepts int, int, array. What are these parameters supposed to be? The two int seem to be the same value, and I'm not sure what is expected in the array.

velddev commented 4 years ago

From the example shown below the idea is that it is a span of shards with their respective counts.

Make sure the array is equal size to shardCount - indexShard.

// Update stats sharded   indexShard shardCount shards
await me.UpdateStatsAsync(24,        50,        new[] { 12, 421, 62, 241, 524, 534 });
devhl-labs commented 4 years ago

The overload that takes the guild count doesn't seem to work right.

await me.UpdateStatsAsync(_client.Guilds.Count);

I'm passing in 28 as it is my test bot, but the website says 433. I printed the count to the console and it shows 28.

edit- Oh it may be a caching issue (but not sure where 433 came from). I'm still not understanding the overload with the shard counts though. I see shard index, am I supposed to be looping over my shards? Is the array a count of guilds in each shard?

edit- I cleared my cache and now I see 28 on the search page, but 433 when clicking through to my listing.

velddev commented 4 years ago

The idea is that if you run a multi-process setup, you can use it to post shards individually from different processes without overriding the other shards.

Hence why you give a start, end and a payload with all counts. If you do not run a multi-process bot, I do not recommend you using it.