2017-09-27 22:17:07 +02:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
const commandReference = `\
|
|
|
|
<b>Master commands</b>:
|
2017-09-29 00:02:58 +03:30
|
|
|
<code>/admin</code> - Makes the user admin.
|
|
|
|
<code>/unadmin</code> - Demotes the user from admin list.
|
2017-09-27 22:17:07 +02:00
|
|
|
|
|
|
|
<b>Admin commands</b>:
|
2017-09-29 00:02:58 +03:30
|
|
|
<code>/warn <reason></code> - Warns the user.
|
|
|
|
<code>/unwarn</code> - Removes the last warn from the user.
|
|
|
|
<code>/nowarns</code> - Clears warns for the user.
|
|
|
|
<code>/getwarns</code> - Shows a list of warns for the user.
|
|
|
|
<code>/ban <reason></code> - Bans the user from groups.
|
|
|
|
<code>/unban</code> - Removes the user from ban list.
|
2017-09-27 22:17:07 +02:00
|
|
|
|
|
|
|
<b>Commands for everyone</b>:
|
2017-09-29 00:02:58 +03:30
|
|
|
<code>/staff</code> - Shows a list of admins.
|
|
|
|
<code>/groups</code> - Show a list of groups which the bot is admin in.
|
|
|
|
<code>/report</code> - Reports the replied-to message to admins.
|
2017-09-27 22:17:07 +02:00
|
|
|
`;
|
|
|
|
|
2017-09-28 15:46:49 +03:30
|
|
|
const commandReferenceHandler = ({ chat, replyWithHTML }) => {
|
|
|
|
if (chat.type !== 'private') {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
return replyWithHTML(commandReference);
|
|
|
|
};
|
2017-09-27 22:17:07 +02:00
|
|
|
|
|
|
|
module.exports = commandReferenceHandler;
|