Skip to content
This repository has been archived by the owner on Mar 27, 2021. It is now read-only.

Commit

Permalink
now ready for the next tutorial part :^)
Browse files Browse the repository at this point in the history
  • Loading branch information
ゼクロ committed Dec 21, 2017
1 parent ab7e022 commit 58b5146
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ const config = JSON.parse(fs.readFileSync('config.json', 'utf8'))
var client = new Discord.Client()


const AUTOROLEID = "332164463186673666"


client.on('ready', () => {
console.log(`Logged in as ${client.user.username}...`)
Expand Down Expand Up @@ -51,17 +49,4 @@ client.on('message', (msg) => {
})


client.on('guildMemberAdd', (memb) => {
var guild = memb.guild
var role = guild.roles.find(r => r.id == AUTOROLEID)
if (role) {
memb.addRole(role)
memb.sendMessage('', new Discord.RichEmbed()
.setColor(0x29B6F6)
.setDescription(`You got automatically assigned the role <@&${AUTOROLEID}>.`)
)
}
})


client.login(config.token)

0 comments on commit 58b5146

Please sign in to comment.