aboutsummaryrefslogtreecommitdiff
path: root/events/guildMemberAdd.js
diff options
context:
space:
mode:
authorJustin <jtsshieh@outlook.com>2019-11-02 11:02:19 -0400
committerJustin <jtsshieh@outlook.com>2019-11-02 11:02:19 -0400
commit7031fa12ba79281edc49df972311c13ad0e8fa53 (patch)
tree60410a33fe45add85a9dc962c975be478f3f8cff /events/guildMemberAdd.js
parent106530d5dc53166632a6a0ecc8930eb2b1ed4bfd (diff)
downloadPokeBot-7031fa12ba79281edc49df972311c13ad0e8fa53.tar.gz
PokeBot-7031fa12ba79281edc49df972311c13ad0e8fa53.tar.bz2
PokeBot-7031fa12ba79281edc49df972311c13ad0e8fa53.zip
es-lint settings added + linted all files
Diffstat (limited to 'events/guildMemberAdd.js')
-rw-r--r--events/guildMemberAdd.js22
1 files changed, 14 insertions, 8 deletions
diff --git a/events/guildMemberAdd.js b/events/guildMemberAdd.js
index 1c8273a..8527f63 100644
--- a/events/guildMemberAdd.js
+++ b/events/guildMemberAdd.js
@@ -8,11 +8,15 @@
* *************************************/
module.exports = async (bot, member) => {
- const { RichEmbed } = require('discord.js');
+ const {RichEmbed} = require('discord.js');
const logChannel = await bot.plugins.settings.getStr('logs', member.guild.id);
- if (!logChannel) return;
+ if (!logChannel) {
+ return;
+ }
const channelObj = bot.channels.find('id', logChannel);
- if (!channelObj) return;
+ if (!channelObj) {
+ return;
+ }
channelObj.send(
new RichEmbed()
.setColor(0x00ae86)
@@ -24,14 +28,16 @@ module.exports = async (bot, member) => {
.setFooter(member.user.tag, member.user.avatarURL)
);
- if (member.guild.id != '417088992329334792') return;
+ if (member.guild.id != '417088992329334792') {
+ return;
+ }
const botCount = member.guild.members.filter(x => x.user.bot).size;
- bot.channels.get('635835776613220353').setName('User Count: ' + member.guild.memberCount);
- bot.channels.get('635835832913231872').setName('Member Count: ' + (member.guild.memberCount - botCount));
- bot.channels.get('635835875065987073').setName('Bot Count: ' + botCount);
+ bot.channels.get('635835776613220353').setName(`User Count: ${member.guild.memberCount}`);
+ bot.channels.get('635835832913231872').setName(`Member Count: ${member.guild.memberCount - botCount}`);
+ bot.channels.get('635835875065987073').setName(`Bot Count: ${botCount}`);
bot.channels.get('417100669980508160').send(`Welcome to the server **${member.user.tag}**! Make sure to read the rules! We now have ${member.guild.memberCount} members.`);
- bot.channels.get('417088992329334794').send('Welcome to the server <@' + member.id + '>. Be sure to join a team: `p:join <flare, skull>`. Also, make sure to read our introduction: `p:start`.');
+ bot.channels.get('417088992329334794').send(`Welcome to the server <@${member.id }>. Be sure to join a team: \`p:join <flare, skull>\`. Also, make sure to read our introduction: \`p:start\`.`);
const role = member.guild.roles.find('name', 'Trainers');
member.addRole(role);
};