This discord bot tracks users wordle entries for a given discord channel.
It picks up the score from the first line of the share snippet you can copy when you complete a wordle on the New York Times.
It uses 4/6
from the screenshot below.
It store the users scores and stats using Google Firestore with the following schema
[
{
usernames: ["daz"],
userId: "29287329372983729",
wordlesCompleted: 1,
wordlesFailed: 0,
totalWordles: 1,
percentageCompleted: 100,
percentageFailed: 0,
completionGuesses: [4],
averageGuesses: 0,
currentStreak: 0,
longestStreak: 0,
bestScore: 0,
scores: [0, 0, 0, 0, 0, 0],
achievements: [{id: 1, name: "First Wordle", description: "You completed your first wordle"}],
lastGameNumber: 0,
},
];
Each guild has it's own users and leaderboards collection in the database. which follows the below schema. They are tracked separately to allow leaderboards to be reset without affecting user stats.
{
leaderboards: [User, User, User]
users: [User, User, User],
channelId: "123456789",
guildId: "123456789",
name: "my server",
}
The bot currently has 14 slash commands.
- /set-channel
- /set-role
- /purge-user
- /reset-users
- /reset-leaderboard
- /server-status
- /upgrade-server
- /enable-notifications
- /disable-notifications
- /my-stats
- /my-achievements
- /leaderboard
- /simple-leaderboard
- /help
- /export-data
/set-channel sets the channel to track wordle entries in. It will only track entries in this channel.
/leaderboard displays a leaderboard that includes all users who have made an entry.
/stats displays the users stats
/achievements displays the users achievements
- Global leaderboards
Purge a users data- Better leaderboard sorting (Joint positioning)
Stop users from entering the same wordle twiceAllow ephemeral statsAchievementsStreak tracking{currentStreak: 0, longestStreak: 0, lastGame: ""}
Best score tracking{bestScore: 0}
General score tracking{scores: [0,0,0,1,0,0]}