mirror of
https://github.com/nx-bat/pet-the-pond.git
synced 2026-09-22 10:29:11 -04:00
it works™.
This commit is contained in:
@@ -53,7 +53,7 @@ class RankCommand extends Command<CommandClient> {
|
||||
case 'take':
|
||||
await database`
|
||||
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)
|
||||
DO UPDATE SET points = GREATEST(p.points - ${points}, 0)
|
||||
`;
|
||||
|
||||
@@ -12,7 +12,7 @@ class MessageReactionRemoveEvent extends Event<CommandClient> {
|
||||
|
||||
await database`
|
||||
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)
|
||||
DO UPDATE SET points = GREATEST(p.points - 1, 0)
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user