-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathranking.go
32 lines (26 loc) · 829 Bytes
/
ranking.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package main
func getRank(rankId int) string {
return "Rank"
}
func rankUp() {
}
func readRanks() {
//Get table userid:messageCount to memory
//every 50 messages or on rankUp save progress
}
/*func checkAndNotifyRank(bot *tgbotapi.BotAPI, update tgbotapi.Update, userID int, messageCount int, ranks map[string]string) {
// Example: Check if the message count reaches a certain threshold for rank upgrade
// This logic can be more complex based on how you want to calculate ranks
var newRank string
if messageCount == 10 {
newRank = ranks["10"]
} else if messageCount == 50 {
newRank = ranks["50"]
} else if messageCount == 100 {
newRank = ranks["100"]
}
if newRank != "" {
msg := tgbotapi.NewMessage(update.Message.Chat.ID, "Congratulations, you've been promoted to "+newRank+"!")
bot.Send(msg)
}
}*/