diff --git a/events/ready.js b/events/ready.js index 2c8c3c3..66ce3ac 100644 --- a/events/ready.js +++ b/events/ready.js @@ -1,4 +1,5 @@ const { Collection } = require("discord.js"); +const { ActivityType } = require("discord-api-types"); module.exports = { name: "ready", @@ -26,5 +27,11 @@ module.exports = { .then((invite) => client.invites.set(guild.id, invite)) .catch((error) => console.log(error)); } + + client.user.setActivity({ + name: "flamingpalm.com", + type: ActivityType.Streaming, + url: "https://flamingpalm.com", + }); }, }; diff --git a/modules/ApiFunctions/MemberEndPoints.ts b/modules/ApiFunctions/MemberEndPoints.ts index 1ac5b03..96def82 100644 --- a/modules/ApiFunctions/MemberEndPoints.ts +++ b/modules/ApiFunctions/MemberEndPoints.ts @@ -87,5 +87,22 @@ export function memberEndPoints(app) { app.post(apiPrefix + "redeemItem", authenticateToken, function (req, res) { const { rewardId } = req.body; + let user = req.user; + global.client.prisma.rewardItem + .findFirst({ + where: { + RewardID: rewardId, + RedeemedBy: null, + }, + orderBy: { + RewardItemID: "asc", + } as any, + include: { + Reward: true, + }, + }) + .then((rewardItem) => { + console.log(rewardItem); + }); }); }