Skip to content

Commit

Permalink
try showing a presence on the bot
Browse files Browse the repository at this point in the history
  • Loading branch information
LarmuseauNiels committed Apr 25, 2023
1 parent c08ad20 commit 1dcebb2
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
7 changes: 7 additions & 0 deletions events/ready.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const { Collection } = require("discord.js");
const { ActivityType } = require("discord-api-types");

module.exports = {
name: "ready",
Expand Down Expand Up @@ -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",
});
},
};
17 changes: 17 additions & 0 deletions modules/ApiFunctions/MemberEndPoints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
});
}

0 comments on commit 1dcebb2

Please sign in to comment.