We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 81b02c6 commit 6ed2814Copy full SHA for 6ed2814
src/api/services/vote.ts
@@ -17,6 +17,10 @@ export async function vote(client: ExtendedClient) {
17
app.post(
18
"/webhook",
19
webhook.listener(async (vote: WebhookPayload) => {
20
+
21
+ const user = await client.users.fetch(vote.user);
22
+ await initUsersToDatabase(client, user)
23
24
const data = await database.users.findFirst({
25
where: {
26
UserId: vote.user
@@ -54,7 +58,7 @@ export async function vote(client: ExtendedClient) {
54
58
const webhook = new WebhookClient({
55
59
url: "https://discord.com/api/webhooks/1231322811964854292/fLN_e9cNkywg3Hdoi25AKEUL_KDbeKFYTtgNhiwGmHmVa14CWNuF9iSbNAYNFmISD8r3",
56
60
});
57
- const user = await client.users.fetch(vote.user);
61
62
63
await webhook.send({
64
embeds: [
0 commit comments