Fixed bot admin handling + modified README

This commit is contained in:
A Bunch of Computer Nerds 2024-12-08 21:47:32 -03:00
parent 9944b67edd
commit 33f76fd806
4 changed files with 16 additions and 19 deletions

View file

@ -53,7 +53,8 @@ function getSystemInfo() {
async function handleAdminCommand(ctx, action, successMessage, errorMessage) {
const Strings = getStrings(ctx.from.language_code);
const userId = ctx.from.id;
if (process.env.botAdmins.includes(userId)) {
const adminArray = JSON.parse("[" + process.env.botAdmins + "]");
if (adminArray.includes(userId)) {
try {
await action();
ctx.reply(successMessage, {