Open varatep opened 2 years ago
I've thought about this before, I think to do it without wanting to jump off my balcony is to find a way to find a way to merge multiple "workouts" in one db entry
Maybe I can keep the same model and just use duplicate messageId
, and then join them when updating the embed. Just not a huge fan because you can't truly tell that a workout can all reference
I think a better option would be expanding the type and making a new one specifically to map post -> workouts
export type workout = {
readonly activity_id: number;
readonly activity_name: string;
readonly timestamp: string;
readonly activity_type: string;
readonly exp: Exp.exp
}
export type workout_post = {
readonly __version: 1;
readonly discord_id: string;
readonly message_id: string;
readonly workouts: workout[];
}
When a user has multiple events that sync all at once generating multiple webhook events, the bot creates posts for every event.