guildMemberAdd Updated
This commit is contained in:
1 parent
63b08f8c12
commit
ecd17a51df
4 files changed
+25
-17
No files matched your search
@@ -14,6 +14,9 @@ module.exports = async (bot, member) => {
|
|||||||
|
|
||||||
if (!SystemChannel) return;
|
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") {
|
if (supportbot.SystemMessage_Type === "embed") {
|
||||||
const GuildAddMember = new Discord.MessageEmbed()
|
const GuildAddMember = new Discord.MessageEmbed()
|
||||||
.setTitle(supportbot.Welcome_Title)
|
.setTitle(supportbot.Welcome_Title)
|
||||||
@@ -21,11 +24,11 @@ module.exports = async (bot, member) => {
|
|||||||
.setColor(supportbot.EmbedColour)
|
.setColor(supportbot.EmbedColour)
|
||||||
|
|
||||||
if (supportbot.WelcomeMessage_Icon === "BOT") {
|
if (supportbot.WelcomeMessage_Icon === "BOT") {
|
||||||
GuildAddMember.setThumbnail(bot.displayAvatarURL())
|
GuildAddMember.setThumbnail(bot.user.displayAvatarURL())
|
||||||
}
|
}
|
||||||
|
|
||||||
if (supportbot.WelcomeMessage_Icon === "USER") {
|
if (supportbot.WelcomeMessage_Icon === "USER") {
|
||||||
GuildAddMember.setThumbnail(member.displayAvatarURL())
|
GuildAddMember.setThumbnail(member.user.displayAvatarURL())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -40,9 +43,6 @@ module.exports = async (bot, member) => {
|
|||||||
if (supportbot.SystemMessage_Type === "normal") {
|
if (supportbot.SystemMessage_Type === "normal") {
|
||||||
SystemChannel.send(supportbot.WelcomeMessage.replace(/%member%/g, member.user.username).replace(/%guildname%/g, member.guild.name))
|
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)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Generated
+1
-3
@@ -1,8 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "supportbot",
|
|
||||||
"version": "1.0.0",
|
|
||||||
"lockfileVersion": 1,
|
|
||||||
"requires": true,
|
"requires": true,
|
||||||
|
"lockfileVersion": 1,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@discordjs/collection": {
|
"@discordjs/collection": {
|
||||||
"version": "0.1.5",
|
"version": "0.1.5",
|
||||||
|
|||||||
+17
-8
@@ -1,15 +1,24 @@
|
|||||||
{
|
{
|
||||||
"name": "supportbot",
|
"name": "supportbot",
|
||||||
"version": "1.0.0",
|
"version": "6.0.0",
|
||||||
"description": "A self hosted discord support bot. SUPPORTBOT v6 GO CRAZYYYY",
|
"description": "SupportBot | #1 Self-Hosted Ticket Bot",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
|
||||||
},
|
|
||||||
"author": "",
|
|
||||||
"license": "ISC",
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"discord.js": "^12.2.0",
|
"discord.js": "^12.2.0",
|
||||||
"js-yaml": "^3.14.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"
|
||||||
}
|
}
|
||||||
@@ -81,9 +81,10 @@ DepartmentRole_3: "Support"
|
|||||||
SystemMessages: "true"
|
SystemMessages: "true"
|
||||||
|
|
||||||
SystemMessage_Channel: "system-messages"
|
SystemMessage_Channel: "system-messages"
|
||||||
SystemMessages_Type: "normal"
|
SystemMessage_Type: "embed"
|
||||||
# There are 2 types of how you can send system messages, 'normal' or '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: "Hello %member%, Welcome to %guildname%!"
|
||||||
WelcomeMessage_Icon: "USER"
|
WelcomeMessage_Icon: "USER"
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user