Add some little details
This commit is contained in:
parent
90727e4988
commit
0252321d10
12
index.js
12
index.js
|
@ -30,10 +30,15 @@ __**Grand Total: ${currency}${total.toLocaleString()}**__`;
|
|||
const updateWebhook = async function () {
|
||||
const fundsSummaryEmbeds = {
|
||||
title: `Funds Summary for ${groupData.name}`,
|
||||
url: `https://www.roblox.com/groups/${process.env.GROUPID}`,
|
||||
color: 0x00ff00,
|
||||
thumbnail: {
|
||||
url: groupLogoUrl
|
||||
},
|
||||
author: {
|
||||
name: `Group Owner, ${groupData.owner.displayName}`,
|
||||
icon_url: groupData.owner.avatar
|
||||
},
|
||||
timestamp: new Date(),
|
||||
footer: {
|
||||
text: "Last updated"
|
||||
|
@ -86,8 +91,11 @@ discord.on('ready', async () => {
|
|||
noblox.setCookie(process.env.ROBLOSECURITY).then(async (current) => {
|
||||
console.log(`${colors.cyan("[ROBLOX]")} Logged in as ${current.displayName}`);
|
||||
console.log(`${colors.cyan("[ROBLOX]")} Fetching group data...`);
|
||||
groupData = await noblox.getGroup(process.env.GROUPID)
|
||||
groupLogoUrl = await noblox.getLogo(process.env.GROUPID)
|
||||
groupData = await noblox.getGroup(process.env.GROUPID);
|
||||
await fetch(`https://thumbnails.roblox.com/v1/users/avatar-bust?userIds=${groupData.owner.userId}&size=420x420&format=Png&isCircular=true`).then(async res => {
|
||||
groupData.owner.avatar = (await res.json()).data[0].imageUrl
|
||||
})
|
||||
groupLogoUrl = await noblox.getLogo(process.env.GROUPID);
|
||||
console.log(`${colors.cyan("[ROBLOX]")} Fetched group data for ${groupData.name}`);
|
||||
const transactionEvent = noblox.onGroupTransaction(process.env.GROUPID, "Sale")
|
||||
transactionEvent.on("data", async function (data) {
|
||||
|
|
Loading…
Reference in a new issue