From 72c99e5db98b420752527dbb846b8efc53b70e41 Mon Sep 17 00:00:00 2001 From: GramingFoxTeam Date: Thu, 17 Nov 2022 15:02:47 +0300 Subject: [PATCH] fix(reddit-bot): not properly checking for mod --- bots/reddit/commands/train.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bots/reddit/commands/train.js b/bots/reddit/commands/train.js index 4503fdc..d52ede8 100644 --- a/bots/reddit/commands/train.js +++ b/bots/reddit/commands/train.js @@ -5,7 +5,8 @@ export default { const isAdmin = await client .getSubreddit('revancedapp') .getModerators({ name: item.author.name }); - if (!isAdmin) + + if (!isAdmin[0]) return client.getComment(item.id).reply('You\'re not an admin.'); if (!args[0]) return client.getComment(item.id).reply('You didn\'t specifiy the label!');