Skip to content

Commit 938e2b3

Browse files
Merge branch 'master' into feature/everyone_command
2 parents 7862c29 + c7f41d3 commit 938e2b3

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/commands/commands.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,11 @@ Lista todos os comandos disponíveis.
1010

1111
availableCommands: `
1212
Os seguintes comandos estão disponiveis:
13-
- !bot
13+
- !about
1414
- !coin
1515
- !commands
1616
- !cron
1717
- !everyone
18-
- !doc
1918
- !links
2019
- !lyric
2120
- !report

src/utils/chattools.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ async function getMembersList(chat) {
2929
* @returns {string[]} - Serialized phone numbers of all administrators.
3030
*/
3131
async function getAdmsList(chat) {
32+
if (!chat.isGroup) {
33+
throw new Error(`This chat isn't a group.`);
34+
}
35+
3236
const members = await chat.participants;
3337
const admsIdList = members.filter((id) => id.isAdmin);
3438
const admsSerialList = getSerialList(admsIdList);

0 commit comments

Comments
 (0)