#Tracking whatever a guildMember has boosted the server more than once

1 messages · Page 1 of 1 (latest)

cerulean skiff
#

A

#

Let me go to my desktop and I'll help you

willow prairie
#

Sure thank-you

cerulean skiff
#
  1. Do you expect it to track a single guild member's or it be a global feature of your bot?
willow prairie
#

Please let me know my options for both cases

cerulean skiff
#
  1. What services do you already have with your bot? Do you already store some guildMembers on a database?
willow prairie
cerulean skiff
#

which tells me that implementing this should be easy. Let me inspect their repo

willow prairie
#

Literally my code lmao

cerulean skiff
# willow prairie Literally my code lmao

Now, to track the amounts of boost they have done, you will have to run callbacks which update either a storage on some server, or some file on yours. Your data structure (and the sideeffects you want to run on discord with your client) depends on whatever you wanna do it for a guild or for every guild your bot is; a basic one could be guilds/{guildId}/{memberId}, where each {memberId} is a json that is readed and modified when necessary

willow prairie
cerulean skiff
#

and when they unboost you just -1

willow prairie
#

mmm oka makes sense yet the issue is the history, i don't know if they're gonna boost tomorrow and their first boost was idk 80 days ago or something

#

I already applied the tactic you mentioned for server votes not a bad idea yet the history of votes / boosts remains the main issue in this case Thqnkqng

cerulean skiff
#

i.e, a map that is mapped by 'first', 'second', 'third', and points to timestamps

cerulean skiff
#

a sample {memberId} file could be like this:

{
  timesBoosted: number,
  history: Map(size) {
    first: <Date> of whenever timesBoosted was first modified
    ...
  }
}
cerulean skiff
#

and now, if you were referring to having a reference to them having boosted prior to you tracking their guild, you can't really do

cerulean skiff
willow prairie
#

The issue is how do I get the Date

cerulean skiff
willow prairie
cerulean skiff
willow prairie
#

True

willow prairie
#

Thankyou so much for your help I have a clearer picture now at least