it works™.

This commit is contained in:
2026-09-13 17:40:40 +08:00
parent 141f68ba5e
commit b6d4c9b4d2
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -53,7 +53,7 @@ class RankCommand extends Command<CommandClient> {
case 'take': case 'take':
await database` await database`
INSERT INTO points AS p (user_id, guild_id, points) INSERT INTO points AS p (user_id, guild_id, points)
VALUES ${target.id}, ${interaction.guild.id}, 0) VALUES (${target.id}, ${interaction.guild.id}, 0)
ON CONFLICT (user_id, guild_id) ON CONFLICT (user_id, guild_id)
DO UPDATE SET points = GREATEST(p.points - ${points}, 0) DO UPDATE SET points = GREATEST(p.points - ${points}, 0)
`; `;
+1 -1
View File
@@ -12,7 +12,7 @@ class MessageReactionRemoveEvent extends Event<CommandClient> {
await database` await database`
INSERT INTO points AS p (user_id, guild_id, points) INSERT INTO points AS p (user_id, guild_id, points)
VALUES ${_message.author.id}, ${_message.guildID}, 0) VALUES (${_message.author.id}, ${_message.guildID}, 0)
ON CONFLICT (user_id, guild_id) ON CONFLICT (user_id, guild_id)
DO UPDATE SET points = GREATEST(p.points - 1, 0) DO UPDATE SET points = GREATEST(p.points - 1, 0)
`; `;