guildMemberAdd Updated

This commit is contained in:
ItzEmerald committed 2020-06-21 12:36:48 +01:00
1 parent 63b08f8c12
commit ecd17a51df
4 files changed
+26 -18

No files matched your search

+6 -6
View File
@@ -14,6 +14,9 @@ module.exports = async (bot, member) => {
if (!SystemChannel) return;
console.log(`[${supportbot.Bot_Name}]: ${member.user.username} has joined ${member.guild.name}!`)
console.log(supportbot.AutoRole_Role)
if (supportbot.SystemMessage_Type === "embed") {
const GuildAddMember = new Discord.MessageEmbed()
.setTitle(supportbot.Welcome_Title)
@@ -21,11 +24,11 @@ module.exports = async (bot, member) => {
.setColor(supportbot.EmbedColour)
if (supportbot.WelcomeMessage_Icon === "BOT") {
GuildAddMember.setThumbnail(bot.displayAvatarURL())
GuildAddMember.setThumbnail(bot.user.displayAvatarURL())
}
if (supportbot.WelcomeMessage_Icon === "USER") {
GuildAddMember.setThumbnail(member.displayAvatarURL())
GuildAddMember.setThumbnail(member.user.displayAvatarURL())
}
@@ -40,10 +43,7 @@ module.exports = async (bot, member) => {
if (supportbot.SystemMessage_Type === "normal") {
SystemChannel.send(supportbot.WelcomeMessage.replace(/%member%/g, member.user.username).replace(/%guildname%/g, member.guild.name))
if (supportbot.AutoRole === "true") {
member.roles.add(supportbot.AutoRole_Role)
}
}
}
};
+1 -3
View File
@@ -1,8 +1,6 @@
{
"name": "supportbot",
"version": "1.0.0",
"lockfileVersion": 1,
"requires": true,
"lockfileVersion": 1,
"dependencies": {
"@discordjs/collection": {
"version": "0.1.5",
+17 -8
View File
@@ -1,15 +1,24 @@
{
"name": "supportbot",
"version": "1.0.0",
"description": "A self hosted discord support bot. SUPPORTBOT v6 GO CRAZYYYY",
"version": "6.0.0",
"description": "SupportBot | #1 Self-Hosted Ticket Bot",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"discord.js": "^12.2.0",
"js-yaml": "^3.14.0"
}
},
"devDependencies": {},
"scripts": {
"test": "help"
},
"repository": {
"type": "git",
"url": "git+https://github.com/1tzemerald/SupportBot.git"
},
"author": "Emerald Services",
"license": "MIT",
"bugs": {
"url": "https://github.com/1tzemerald/SupportBot/issues"
},
"homepage": "https://github.com/1tzemerald/SupportBot#readme"
}
+2 -1
View File
@@ -81,9 +81,10 @@ DepartmentRole_3: "Support"
SystemMessages: "true"
SystemMessage_Channel: "system-messages"
SystemMessages_Type: "normal"
SystemMessage_Type: "embed"
# There are 2 types of how you can send system messages, 'normal' or 'embed'
Welcome_Title: "Welcome"
WelcomeMessage: "Hello %member%, Welcome to %guildname%!"
WelcomeMessage_Icon: "USER"