fix(telegram-bot): not checking for admin properly

This commit is contained in:
GramingFoxTeam
2022-11-16 17:29:27 +03:00
parent 9bff68c8c4
commit 92571085b7

View File

@@ -4,7 +4,7 @@ export default {
async execute(cb) {
const admins = await global.bot.getChatAdministrators(cb.message.chat.id);
const isAdmin = admins.find(
(admin) => admin.user.id === cb.message.from.id
(admin) => admin.user.id === cb.from.id
);
if (!isAdmin)