fit-ctu-discord / honza-botner

Bot for FIT CTU Discord
https://discord.fit.cvut.cz/
MIT License
14 stars 10 forks source link

Server is going to loose boost status notification #140

Closed pokorj54 closed 3 years ago

pokorj54 commented 3 years ago

Whenever the server is about to lose boost status the bot should post about it into specified channel.

ostorc commented 3 years ago

What kind of message do you want to see?

pokorj54 commented 3 years ago

Oh no, the server is going to lose level. Somebody do something.Or something similar.

tenhobi commented 3 years ago

Is this notification shown after some subscriptions have ended? Aka the current number of boosters is for example 29 for 3 days? Or does it implies that it will be 29 after 3 days, but for now it is 30+? 🤔

pokorj54 commented 3 years ago

I think that you can go 3 days with less than 30 boost to maintain lvl 3, so the notification will be sent when the number of boosters goes below this threshold.

pokorj54 commented 3 years ago

Ok, I was wrong the server has more than 30 boosts now but, discord says it will lose lvl 3 in less than 3 days.

tenhobi commented 3 years ago

Hmm, I believe we can only handle and get a number of current subscribers.

tenhobi commented 3 years ago

Cannot be done. The API doesn't expose the necessary information. https://github.com/discord/discord-api-docs/issues/1182

tenhobi commented 3 years ago

I will try to check this field:

https://discord.com/developers/docs/resources/guild https://github.com/DSharpPlus/DSharpPlus/blob/2f6f45723c30a64cc201e9492224f3479b58eac9/DSharpPlus/Entities/DiscordGuild.cs#L406-L416

sudofox commented 3 years ago

Just a heads up: the "pending level expiration" display is severely messed up and doesn't match Discord's docs. In particular:

It's pretty wack.