Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add has_reviewed field to get bot response
Browse files Browse the repository at this point in the history
chimpdev committed May 6, 2024
1 parent 4cbb60b commit c101d3a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion server/src/routes/bots/[id]/index.js
Original file line number Diff line number Diff line change
@@ -56,6 +56,7 @@ module.exports = {
const publiclySafeBot = await bot.toPubliclySafe();
const botUser = client.users.cache.get(bot.id);
const badges = [];
const has_reviewed = reviews.some(review => review.user.id === request.user?.id);

if (botUser.flags.toArray().includes('VerifiedBot')) badges.push('Verified');
if (publiclySafeBot.owner?.premium) badges.push('Premium');
@@ -65,7 +66,8 @@ module.exports = {
permissions,
badges,
vote_timeout,
reviews
reviews,
has_reviewed
};

if (permissions.canEditAPIKey && bot.api_key?.iv) {

0 comments on commit c101d3a

Please sign in to comment.