Skip to content
Snippets Groups Projects
Commit 3e006513 authored by Reviath's avatar Reviath
Browse files

Update commands/unmute.js, commands/mute.js, commands/add-emote.js files

parent b9e4053f
Branches
No related tags found
No related merge requests found
......@@ -4,7 +4,7 @@ exports.run = async (client, message, args) => {
var url = "";
var name = "";
if (!message.member.hasPermission("MANAGE_EMOJIS"))
return [message.channel.send(`You must have \`MANAGE_EMOJIS\` permission to perform this action.`)];
return [message.channel.send(`Bu komutu kullanmak için emojileri yönetme yetkisine sahip olmalısın`)];
let emoji = args[0];
var emojiid = emoji.match(/\d/g);
emojiid = emojiid.join("");
......@@ -24,7 +24,7 @@ exports.run = async (client, message, args) => {
.create(url, name)
.then((emoji) =>
message.channel.send(
`Created new emoji called \`${emoji.name}\`. Preview: ${emoji}`
`\`${emoji.name}\` isimli emoji oluşturuldu! (${emoji})`
)
)
.catch(console.error);
......
......@@ -5,8 +5,8 @@ exports.run = async(client, message, args) => {
let spammer = message.guild.member(message.mentions.users.first() || message.guild.members.cache.get(args[0]));
if(!spammer) return message.channel.send("Please specify user to perform action upon.");
if(!message.member.hasPermission("MANAGE_MESSAGES")) return message.reply("Lacking permission to perform such action.");
if(!spammer) return message.channel.send("Bir üye belirtmelisin");
if(!message.member.hasPermission("MANAGE_ROLES")) return message.reply("Yeterli yetkiye sahip değilsin");
let role = message.guild.roles.cache.find(r => r.name === "Muted");
if(!role){
......@@ -28,24 +28,24 @@ exports.run = async(client, message, args) => {
}
}
if (spammer.roles.cache.has(role.id)) return message.channel.send('User is already muted.');
if (spammer.roles.cache.has(role.id)) return message.channel.send('Bu üye zaten susturulmuş!');
let time = args[1];
if(!time) {
time = "24h"
};
let reason = args.slice(2).join(' ');
if(!reason) {
reason = "Unspecified"
reason = "Belirtilmedi"
}
await(spammer.roles.add(role.id));
await message.channel.send(`Muted User: <@${spammer.id}> \nDuration: \`${ms(ms(time))}\` \nReason: \`${reason}\``);
await message.channel.send(`Susturulan üye: <@${spammer.id}> \nSüre: \`${ms(ms(time))}\` \nSebep: \`${reason}\``);
setTimeout(function () {
if (!spammer.roles.cache.has(role.id))
return;
spammer.roles.remove(role.id);
message.channel.send(`<@${spammer.id}> can speak again.`);
message.channel.send(`<@${spammer.id}> tekrar konuşabilir`);
}, ms(time));
};
......
......@@ -9,13 +9,13 @@ exports.run = async(client, message, args, connection) => {
let role = message.guild.roles.cache.find(r => r.name === "Muted");
if(!role) return;
if (!spammer.roles.cache.has(role.id)) return message.channel.send('User is not muted.');
if (!spammer.roles.cache.has(role.id)) return message.channel.send('Belirtilen kişi mute\'lu değil');
spammer.roles.remove(role.id);
message.channel.send(`<@${spammer.id}> can speak again.`);
message.channel.send(`<@${spammer.id}> Tekrar konuşabilir!`);
}
else {
message.channel.send(`Lacking permission to perform such action.`)
message.channel.send(`Yeterli yetkin yok`)
}
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment