GUH
This commit is contained in:
parent
8eb154decb
commit
9bdbebd20f
39
index.js
39
index.js
|
@ -95,6 +95,8 @@ client.on('ready', async () => {
|
||||||
|
|
||||||
const sendMessages = async (data) => {
|
const sendMessages = async (data) => {
|
||||||
const channel = await client.channels.fetch(process.env.DISCORD_BANLOG_CHANNEL_ID);
|
const channel = await client.channels.fetch(process.env.DISCORD_BANLOG_CHANNEL_ID);
|
||||||
|
for (const ban in data.added) {
|
||||||
|
thisBan = data.added[ban]
|
||||||
embed = {
|
embed = {
|
||||||
fields: [
|
fields: [
|
||||||
{
|
{
|
||||||
|
@ -130,8 +132,6 @@ const sendMessages = async (data) => {
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const ban in data.added) {
|
|
||||||
thisBan = data.added[ban]
|
|
||||||
embed.title = "Ban Added"
|
embed.title = "Ban Added"
|
||||||
embed.color = 0xff0000
|
embed.color = 0xff0000
|
||||||
channel.send({ embeds: [embed] })
|
channel.send({ embeds: [embed] })
|
||||||
|
@ -140,6 +140,41 @@ const sendMessages = async (data) => {
|
||||||
|
|
||||||
for (const ban in data.removed) {
|
for (const ban in data.removed) {
|
||||||
thisBan = data.removed[ban]
|
thisBan = data.removed[ban]
|
||||||
|
embed = {
|
||||||
|
fields: [
|
||||||
|
{
|
||||||
|
name: "Banned Username",
|
||||||
|
value: thisBan.banned_username,
|
||||||
|
inline: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Banned ID",
|
||||||
|
value: thisBan.banned_id,
|
||||||
|
inline: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Banned",
|
||||||
|
value: `<t:${new Date(thisBan.banned_timestamp) / 1000}:f> <t:${new Date(thisBan.banned_timestamp) / 1000}:R>`,
|
||||||
|
inline: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Expires",
|
||||||
|
value: `<t:${new Date(thisBan.expires) / 1000}:f> <t:${new Date(thisBan.expires) / 1000}:R>`,
|
||||||
|
inline: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Reason",
|
||||||
|
value: thisBan.reason,
|
||||||
|
inline: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Moderator",
|
||||||
|
value: thisBan.moderator,
|
||||||
|
inline: true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
embed.title = "Ban Removed"
|
embed.title = "Ban Removed"
|
||||||
embed.color = 0x00ff00
|
embed.color = 0x00ff00
|
||||||
channel.send({ embeds: [embed] })
|
channel.send({ embeds: [embed] })
|
||||||
|
|
Loading…
Reference in a new issue