mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-17 21:40:51 +02:00
Show guild owner in join logs
This commit is contained in:
@@ -130,13 +130,15 @@ client.on('guildCreate', async guild => {
|
|||||||
}
|
}
|
||||||
const joinLeaveChannel = await client.fetchJoinLeaveChannel();
|
const joinLeaveChannel = await client.fetchJoinLeaveChannel();
|
||||||
if (joinLeaveChannel) {
|
if (joinLeaveChannel) {
|
||||||
|
if (!guild.members.cache.has(guild.ownerID)) await guild.members.fetch(guild.ownerID);
|
||||||
const embed = new MessageEmbed()
|
const embed = new MessageEmbed()
|
||||||
.setColor(0x7CFC00)
|
.setColor(0x7CFC00)
|
||||||
.setThumbnail(guild.iconURL({ format: 'png' }))
|
.setThumbnail(guild.iconURL({ format: 'png' }))
|
||||||
.setTitle(`Joined ${guild.name}!`)
|
.setTitle(`Joined ${guild.name}!`)
|
||||||
.setFooter(`ID: ${guild.id}`)
|
.setFooter(`ID: ${guild.id}`)
|
||||||
.setTimestamp()
|
.setTimestamp()
|
||||||
.addField('❯ Members', formatNumber(guild.memberCount));
|
.addField('❯ Members', formatNumber(guild.memberCount))
|
||||||
|
.addField('❯ Owner', guild.owner.user.tag);
|
||||||
await joinLeaveChannel.send({ embed });
|
await joinLeaveChannel.send({ embed });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "xiao",
|
"name": "xiao",
|
||||||
"version": "120.0.0",
|
"version": "120.0.1",
|
||||||
"description": "Your personal server companion.",
|
"description": "Your personal server companion.",
|
||||||
"main": "Xiao.js",
|
"main": "Xiao.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Reference in New Issue
Block a user