mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-21 05:54:33 +02:00
Minor Code Improvements
This commit is contained in:
@@ -50,7 +50,10 @@ module.exports = class BanCommand extends Command {
|
||||
return msg.say('This member is not bannable. Perhaps they have a higher role than me?');
|
||||
try {
|
||||
try {
|
||||
await member.send(`You were banned from ${msg.guild.name}!\nReason: ${reason}.`);
|
||||
await member.send(
|
||||
`You were banned from ${msg.guild.name}!
|
||||
Reason: ${reason}.`
|
||||
);
|
||||
} catch (err) {
|
||||
await msg.say('Failed to send DM to user.');
|
||||
}
|
||||
@@ -63,7 +66,11 @@ module.exports = class BanCommand extends Command {
|
||||
.setAuthor(msg.author.tag, msg.author.displayAvatarURL)
|
||||
.setColor(0xFF0000)
|
||||
.setTimestamp()
|
||||
.setDescription(`**Member:** ${member.user.tag} (${member.id})\n**Action:** Ban\n**Reason:** ${reason}`);
|
||||
.setDescription(
|
||||
`**Member:** ${member.user.tag} (${member.id})
|
||||
**Action:** Ban
|
||||
**Reason:** ${reason}`
|
||||
);
|
||||
return modlogs.send({embed});
|
||||
} catch (err) {
|
||||
return msg.say('An Unknown Error Occurred.');
|
||||
|
||||
@@ -47,7 +47,10 @@ module.exports = class KickCommand extends Command {
|
||||
return msg.say('This member is not kickable. Perhaps they have a higher role than me?');
|
||||
try {
|
||||
try {
|
||||
await member.send(`You were kicked from ${msg.guild.name}!\nReason: ${reason}.`);
|
||||
await member.send(
|
||||
`You were kicked from ${msg.guild.name}!
|
||||
Reason: ${reason}.`
|
||||
);
|
||||
} catch (err) {
|
||||
await msg.say('Failed to send DM.');
|
||||
}
|
||||
@@ -59,7 +62,11 @@ module.exports = class KickCommand extends Command {
|
||||
.setAuthor(msg.author.tag, msg.author.displayAvatarURL)
|
||||
.setColor(0xFFA500)
|
||||
.setTimestamp()
|
||||
.setDescription(`**Member:** ${member.user.tag} (${member.id})\n**Action:** Kick\n**Reason:** ${reason}`);
|
||||
.setDescription(
|
||||
`**Member:** ${member.user.tag} (${member.id})
|
||||
**Action:** Kick
|
||||
**Reason:** ${reason}`
|
||||
);
|
||||
return modlogs.send({embed});
|
||||
} catch (err) {
|
||||
return msg.say('An Unknown Error Occurred.');
|
||||
|
||||
@@ -49,7 +49,10 @@ module.exports = class SoftbanCommand extends Command {
|
||||
return msg.say('This member is not bannable. Perhaps they have a higher role than me?');
|
||||
try {
|
||||
try {
|
||||
await member.send(`You were softbanned from ${msg.guild.name}!\nReason: ${reason}.`);
|
||||
await member.send(
|
||||
`You were softbanned from ${msg.guild.name}!
|
||||
Reason: ${reason}.`
|
||||
);
|
||||
} catch (err) {
|
||||
await msg.say('Failed to send DM to user.');
|
||||
}
|
||||
@@ -63,7 +66,11 @@ module.exports = class SoftbanCommand extends Command {
|
||||
.setAuthor(msg.author.tag, msg.author.displayAvatarURL)
|
||||
.setColor(0xFF4500)
|
||||
.setTimestamp()
|
||||
.setDescription(`**Member:** ${member.user.tag} (${member.id})\n**Action:** Softban\n**Reason:** ${reason}`);
|
||||
.setDescription(
|
||||
`**Member:** ${member.user.tag} (${member.id})
|
||||
**Action:** Softban
|
||||
**Reason:** ${reason}`
|
||||
);
|
||||
return modlogs.send({embed});
|
||||
} catch (err) {
|
||||
return msg.say('An Unknown Error Occurred.');
|
||||
|
||||
@@ -61,7 +61,11 @@ module.exports = class UnbanCommand extends Command {
|
||||
.setAuthor(msg.author.tag, msg.author.displayAvatarURL)
|
||||
.setColor(0x00AE86)
|
||||
.setTimestamp()
|
||||
.setDescription(`**Member:** ${member.tag} (${member.id})\n**Action:** Unban\n**Reason:** ${reason}`);
|
||||
.setDescription(
|
||||
`**Member:** ${member.tag} (${member.id})
|
||||
**Action:** Unban
|
||||
**Reason:** ${reason}`
|
||||
);
|
||||
return modlogs.send({embed});
|
||||
} catch (err) {
|
||||
return msg.say('An Unknown Error Occurred.');
|
||||
|
||||
@@ -46,7 +46,11 @@ module.exports = class WarnCommand extends Command {
|
||||
.setAuthor(msg.author.tag, msg.author.displayAvatarURL)
|
||||
.setColor(0xFFFF00)
|
||||
.setTimestamp()
|
||||
.setDescription(`**Member:** ${member.user.tag} (${member.id})\n**Action:** Warn\n**Reason:** ${reason}`);
|
||||
.setDescription(
|
||||
`**Member:** ${member.user.tag} (${member.id})
|
||||
**Action:** Warn
|
||||
**Reason:** ${reason}`
|
||||
);
|
||||
return modlogs.send({embed});
|
||||
} catch (err) {
|
||||
return msg.say('An Unknown Error Occurred.');
|
||||
|
||||
Reference in New Issue
Block a user