Commit a0cba489 authored by Daniel Pérez Fernández's avatar Daniel Pérez Fernández 🕶
Browse files

Fixed some typos

- Minor changes
- Add Support for Basic Groups to export chat invite link
parent 242f0d0e
......@@ -10,15 +10,15 @@ app.bot.onText(/^\!link|^\/link/, function(msg){
'chatType': msg.chat.type
}
if (prop.chatType == 'supergroup'){
if ((prop.chatType == 'supergroup')|| (prop.chatType == 'group')){
app.bot.getChatMember(prop.chat_id, prop.from_id).then(function(infouser){
if ((infouser.status == 'creator') || (infouser.status == 'administrator')){
app.bot.exportChatInviteLink(prop.chat_id).then(function(link){
var url = link
var url = link;
app.bot.sendMessage(prop.chat_id, app.i18n.__('Group link: \n') + url);
});
} else {
app.bot.deleteMessage(prop.chat_id, msg.message_id)
app.bot.deleteMessage(prop.chat_id, msg.message_id);
app.bot.sendMessage(prop.chat_id, app.i18n.__('Command only available for admins and creator'));
}
})
......
......@@ -22,10 +22,11 @@ app.bot.onText(/^\/mute (.+)|^\!mute (.+)/, function(msg, match){
if ((report.status == 'creator') || (report.status == 'administrator')){
var permisosFalse = {};
permisosFalse.can_send_messages = false
permisosFalse.can_send_media_messages = false
permisosFalse.can_send_other_messages = false
permisosFalse.can_add_web_page_previews = false
permisosFalse.can_send_messages = false;
permisosFalse.can_send_media_messages = false;
permisosFalse.can_send_other_messages = false;
permisosFalse.can_add_web_page_previews = false;
permisosFalse.can_send_polls = false;
const ms = require("ms");
app.bot.restrictChatMember(prop.chat_id, prop.replyFromId, {until_date: Math.round((Date.now() + ms(prop.time || prop.timetwo + " hour"))/1000)}, permisosFalse).then(function(restricted){
......
......@@ -31,4 +31,4 @@ app.bot.onText(/^\!check|^\/check/, (msg) => {
}
});
});
});
});
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment