7.5 commit
This commit is contained in:
1 parent
4eb8658459
commit
45bd88e4d2
6 files changed
+88
-9
No files matched your search
@@ -0,0 +1,32 @@
|
||||
|
||||
const Discord = require('discord.js');
|
||||
const fs = require("fs");
|
||||
const Event = require("../Structures/Event.js");
|
||||
const yaml = require("js-yaml");
|
||||
const supportbot = yaml.load(
|
||||
fs.readFileSync("./Configs/supportbot.yml", "utf8")
|
||||
);
|
||||
|
||||
module.exports = new Event("guildMemberAdd", async (client, member, interaction, guild) => {
|
||||
|
||||
const WelcomeChannel = interaction.guild.channels.get(supportbot.WelcomeChannel)
|
||||
|
||||
const WelcomeEmbed = new Discord.MessageEmbed()
|
||||
.setColor(supportbot.WelcomeColour)
|
||||
.setTitle(supportbot.WelcomeTitle)
|
||||
.setDescription(supportbot.WelcomeMessage.replace(/%joined_user%/g, member.user))
|
||||
.setThumbnail(member.user.displayAvatarURL())
|
||||
.setTimestamp();
|
||||
|
||||
member.guild.channels.cache.get(
|
||||
supportbot.WelcomeChannel).send({
|
||||
embeds: [WelcomeEmbed]
|
||||
|
||||
})
|
||||
|
||||
|
||||
const WelcomeMsg = await WelcomeChannel.send({
|
||||
embeds: [WelcomeEmbed]
|
||||
});
|
||||
|
||||
});
|
||||
+1
-1
@@ -14,7 +14,7 @@ const panelconfig = yaml.load(
|
||||
|
||||
const Event = require("../Structures/Event.js");
|
||||
|
||||
module.exports = new Event("ready", async (client) => {
|
||||
module.exports = new Event("ready", async (client, interaction) => {
|
||||
const { getRole, getChannel, getCategory } = client;
|
||||
client.user.setActivity(supportbot.BotActivity, {
|
||||
type: supportbot.ActivityType,
|
||||
|
||||
Reference in new issue
Block a user