mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2025-09-01 08:21:27 +03:00
Fix env
`PUBLIC` is a path to the Public user dir on Windows, and !! does not convert a string to a boolean as expected
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
const ms = require('ms');
|
||||
const { boolean } = require('boolean');
|
||||
|
||||
module.exports.get = () => ({
|
||||
handler: async (req, res) => {
|
||||
@@ -21,7 +22,7 @@ module.exports.get = () => ({
|
||||
discriminator: client.user.discriminator,
|
||||
id: client.user.id,
|
||||
portal: process.env.PORTAL || null,
|
||||
public: !!process.env.PUBLIC,
|
||||
public: boolean(process.env.PUBLIC_BOT),
|
||||
stats: {
|
||||
activatedUsers: users.length,
|
||||
archivedMessages: users.reduce((total, user) => total + user.messageCount, 0), // don't count archivedMessage table rows, they can be deleted
|
||||
|
Reference in New Issue
Block a user