mirror of
https://gitdab.com/cadence/out-of-your-element.git
synced 2025-09-10 20:32:50 +02:00
Move reaction_part to new events when possible
This commit is contained in:
parent
65de8aaf98
commit
ee266f844a
4 changed files with 32 additions and 5 deletions
|
@ -53,7 +53,7 @@ async function editMessage(message, guild, row) {
|
|||
const sendNewEventParts = new Set()
|
||||
for (const promotion of promotions) {
|
||||
if ("eventID" in promotion) {
|
||||
db.prepare(`UPDATE event_message SET ${promotion.column} = 0 WHERE event_id = ?`).run(promotion.eventID)
|
||||
db.prepare(`UPDATE event_message SET ${promotion.column} = ? WHERE event_id = ?`).run(promotion.value ?? 0, promotion.eventID)
|
||||
} else if ("nextEvent" in promotion) {
|
||||
sendNewEventParts.add(promotion.column)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue