From 2371ee366c040f3ec1bbe2c760e9755f84bed598 Mon Sep 17 00:00:00 2001 From: Vermium Sifell Date: Wed, 19 Oct 2022 10:50:28 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20Added=20upd?= =?UTF-8?q?ateGuildCounter=20example?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/updateGuildCounter.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 examples/updateGuildCounter.ts diff --git a/examples/updateGuildCounter.ts b/examples/updateGuildCounter.ts new file mode 100644 index 0000000..2f53489 --- /dev/null +++ b/examples/updateGuildCounter.ts @@ -0,0 +1,13 @@ +const updateGuildCounter = await prisma.guildCounter.update({ + where: { + guildId_channelId: { + guildId: guild.id, + channelId: channel.id, + }, + }, + data: { + count: { + increment: 1, + }, + }, +});