Skip to content

Commit

Permalink
a
Browse files Browse the repository at this point in the history
  • Loading branch information
eYuM-coder committed Feb 4, 2024
1 parent aabd5d6 commit 808759b
Show file tree
Hide file tree
Showing 6 changed files with 119 additions and 70 deletions.
36 changes: 18 additions & 18 deletions config.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
{
"clientId": "1168994296989483058",
"developers": ["969655699154042940"],
"clientId": "1135714988493910136",
"developers": ["1067137336674107453"],
"status": "!help | website here",
"discord": "https://discord.gg/",
"dashboard": "true",
"server": "",
"prefix": "!",
"webhooks": {
"logs": "https://discord.com/api/webhooks/1188279551881662534/J2qk9kiYkPRrGO9-8CpBd1tR3vDhggcYYsWYvTWcNRPWhsis9GW7vtbm1Kox14OGL7kJ",
"maintenance_logs": "https://discord.com/api/webhooks/1188279551881662534/J2qk9kiYkPRrGO9-8CpBd1tR3vDhggcYYsWYvTWcNRPWhsis9GW7vtbm1Kox14OGL7kJ",
"ratelimit_logs": "https://discord.com/api/webhooks/1188279551881662534/J2qk9kiYkPRrGO9-8CpBd1tR3vDhggcYYsWYvTWcNRPWhsis9GW7vtbm1Kox14OGL7kJ",
"blacklist": "https://discord.com/api/webhooks/1188279551881662534/J2qk9kiYkPRrGO9-8CpBd1tR3vDhggcYYsWYvTWcNRPWhsis9GW7vtbm1Kox14OGL7kJ",
"report": "https://discord.com/api/webhooks/1188279551881662534/J2qk9kiYkPRrGO9-8CpBd1tR3vDhggcYYsWYvTWcNRPWhsis9GW7vtbm1Kox14OGL7kJ",
"contact": "https://discord.com/api/webhooks/1188279551881662534/J2qk9kiYkPRrGO9-8CpBd1tR3vDhggcYYsWYvTWcNRPWhsis9GW7vtbm1Kox14OGL7kJ",
"bugs": "https://discord.com/api/webhooks/1188279551881662534/J2qk9kiYkPRrGO9-8CpBd1tR3vDhggcYYsWYvTWcNRPWhsis9GW7vtbm1Kox14OGL7kJ",
"premium": "https://discord.com/api/webhooks/1188279551881662534/J2qk9kiYkPRrGO9-8CpBd1tR3vDhggcYYsWYvTWcNRPWhsis9GW7vtbm1Kox14OGL7kJ",
"suggestions": "https://discord.com/api/webhooks/1188279551881662534/J2qk9kiYkPRrGO9-8CpBd1tR3vDhggcYYsWYvTWcNRPWhsis9GW7vtbm1Kox14OGL7kJ",
"votes": "https://discord.com/api/webhooks/1188279551881662534/J2qk9kiYkPRrGO9-8CpBd1tR3vDhggcYYsWYvTWcNRPWhsis9GW7vtbm1Kox14OGL7kJ",
"errors": "https://discord.com/api/webhooks/1188279551881662534/J2qk9kiYkPRrGO9-8CpBd1tR3vDhggcYYsWYvTWcNRPWhsis9GW7vtbm1Kox14OGL7kJ",
"auth": "https://discord.com/api/webhooks/1188279551881662534/J2qk9kiYkPRrGO9-8CpBd1tR3vDhggcYYsWYvTWcNRPWhsis9GW7vtbm1Kox14OGL7kJ",
"joinsPublic": "https://discord.com/api/webhooks/1188279551881662534/J2qk9kiYkPRrGO9-8CpBd1tR3vDhggcYYsWYvTWcNRPWhsis9GW7vtbm1Kox14OGL7kJ",
"joinsPrivate": "https://discord.com/api/webhooks/1188279551881662534/J2qk9kiYkPRrGO9-8CpBd1tR3vDhggcYYsWYvTWcNRPWhsis9GW7vtbm1Kox14OGL7kJ",
"leavesPublic": "https://discord.com/api/webhooks/1188279551881662534/J2qk9kiYkPRrGO9-8CpBd1tR3vDhggcYYsWYvTWcNRPWhsis9GW7vtbm1Kox14OGL7kJ",
"leavesPrivate": "https://discord.com/api/webhooks/1188279551881662534/J2qk9kiYkPRrGO9-8CpBd1tR3vDhggcYYsWYvTWcNRPWhsis9GW7vtbm1Kox14OGL7kJ"
"logs": "https://discord.com/api/webhooks/1191872792031932416/H2PmMiAF4ANN9XbGukEXQqHPBPFwIdCCiKGte3YCZeE0QO_My-8cbkvcw0Zw1_JNWn3T",
"maintenance_logs": "https://discord.com/api/webhooks/1191873962796392500/rB7t4OXNc4YAoRQBlBCPdtV1hRmr0wOmBVJb-4Q8b1oTyZpausXqACLDWsSFRXSNGi3B",
"ratelimit_logs": "https://discord.com/api/webhooks/1191874767704297593/AcMwK-t1kzEk6RFU-SmkQ7uIwf9dfHPu8JbuPJCkdQHAi17f7vZUB_iSc0XvnCQ1tN9r",
"blacklist": "https://discord.com/api/webhooks/1191875214368329809/5hkt3OXKkQuElqJEIQ6Tq-rxBDNz1MkGUKs7xTVkzJcAg53WvuO2jjQWcvLGSRKHYra6",
"report": "https://discord.com/api/webhooks/1191875430219776062/Kd_wqFD2I911e5fRew21E1_bNoFZAO29eJ6tdVSs0e0OnJMyK5EU-oeLpXJ50pYVhZPC",
"contact": "https://discord.com/api/webhooks/1191875563737067581/3Uib7OOD_y1MwVDlOUVu7B6DayFySZ5UAOUIhSxlBMNjWdSIdygWR-_Gs6-KdpzgvYoy",
"bugs": "https://discord.com/api/webhooks/1191875015319228456/q0Y8MCmtC6WCUzu3-Nk9ltc3By4oGSFnl8j-x4A8rtoVw4kjRyRHYLfH_oReFNOAp41n",
"premium": "https://discord.com/api/webhooks/1191874623776768142/7NW5AV84rIz4yC92aaZYYl0frdVQmJfNqzvRY3QglzBL_AkakjhhHf6KR-NTdhb-Jz7h",
"suggestions": "https://discord.com/api/webhooks/1191875689067061308/Aqt67syItFzuYR7XZqaRUMZlqumTfHz6Tyjg1P_hkYACgckq0JqvBRAWNJqu5uc9cPg2",
"votes": "https://discord.com/api/webhooks/1191875845271343144/vQ2TheQMXCT2aqR_hkoZKZZnrPRCQt640tI7zHYSJb3HDpyGZJKsOn44e9F42pgrHZ6B",
"errors": "https://discord.com/api/webhooks/1191876024607199403/t3MW9tGu4zliCbPSUY-ItHJVejPaNWjDD13afUnMbqSMrZtsOiMt4AoSY4bTH27dyM4v",
"auth": "https://discord.com/api/webhooks/1191876187421675701/1RiQKyKvR4Ise6d6J8suAf4piFSY0HkgDjVrr4x--chvnYFh0fYjwUPlzAhjhHFmOLOR",
"joinsPublic": "https://discord.com/api/webhooks/1191876306393108551/2tdtejyuGdfgZyA22wDsK-vG_bCcY6WBOReriE4DTCb5fAHbNLprwUs3r4DOOiWSn5jo",
"joinsPrivate": "https://discord.com/api/webhooks/1191876306393108551/2tdtejyuGdfgZyA22wDsK-vG_bCcY6WBOReriE4DTCb5fAHbNLprwUs3r4DOOiWSn5jo",
"leavesPublic": "https://discord.com/api/webhooks/1191876447091052655/7G1samQc5pPXnKy72MWX6ZFBc0dctsSsrlPFpP8pNx-ciXFmy81MZUxNqH4VBK09mrtm",
"leavesPrivate": "https://discord.com/api/webhooks/1191876447091052655/7G1samQc5pPXnKy72MWX6ZFBc0dctsSsrlPFpP8pNx-ciXFmy81MZUxNqH4VBK09mrtm"
},
"maintenance": "false",
"maintenance_threshold": "5",
Expand Down
47 changes: 1 addition & 46 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,51 +21,6 @@ jointocreate(client);
// end imports
const userData = require("./src/data/users.json");
// getPlayerData function with base64 encoding
async function getPlayerData(username) {
try {
console.log(`Fetching UUID for ${username}`);
const responseUUID = await axios.get(
`https://api.mojang.com/users/profiles/minecraft/${username}`
);

// Check if the player was found
if (!responseUUID.data) {
console.log("Player not found");
return null;
}

const uuid = responseUUID.data.id;
console.log(`UUID for ${username}: ${uuid}`);

console.log(`Fetching skin for UUID: ${uuid}`);
const responseSkin = await axios.get(
`https://api.mineatar.io/head/${uuid}`,
{ responseType: "arraybuffer" }
);

// Check if the skin was found
if (!responseSkin.data) {
console.log("Skin not found");
return null;
}

console.log("Skin found");
const skinUrl = `data:image/png;base64,${Buffer.from(
responseSkin.data,
"binary"
).toString("base64")}`;

return {
uuid,
skinUrl,
};
} catch (error) {
console.error("Error:", error.message);
return null;
}
}

// Load user data from the JSON file

// This assumes you have a function getGuildConfig defined in your levelUtils
client.on("messageCreate", async (message) => {
Expand All @@ -74,7 +29,7 @@ client.on("messageCreate", async (message) => {
} else {
let delay =
userData.guilds[message.guild.id].users[message.author.id].messageTimeout;
if (delay >= Date.now() + 60000) {
if (Date.now() - delay >= 60000 || delay == 0) {
if (message.author.bot) return;

const userId = message.author.id;
Expand Down
78 changes: 75 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,14 @@
"@discordjs/voice": "^0.16.1",
"@m3rcena/weky": "^4.3.1",
"@top-gg/sdk": "^3.0.8",
"avconv": "^3.1.0",
"axios": "^1.5.0",
"body-parser": "^1.19.0",
"canvacord": "^5.0.8",
"canvafy": "^7.0.4",
"canvas": "^2.11.2",
"chalk": "^4.1.0",
"channelsave-discord": "^1.5.0",
"cheerio": "^1.0.0-rc.12",
"colors": "^1.4.0",
"common-tags": "^1.8.0",
Expand All @@ -44,10 +46,12 @@
"express": "^4.17.1",
"express-session": "^1.17.1",
"falgames": "^1.0.1",
"ffmpeg": "^0.0.4",
"figlet": "^1.5.0",
"fs": "0.0.2",
"gamescord": "^1.0.4",
"generate-password": "^1.6.0",
"git-commits-npm": "^1.0.0",
"got": "^11.8.2",
"intl": "^1.2.5",
"logs.chat": "^1.0.3",
Expand Down Expand Up @@ -82,6 +86,7 @@
"voucher-code-generator": "^1.1.1",
"weky": "^3.1.8",
"winston": "^3.3.3",
"ytdl-core": "^4.11.5",
"zalgo": "0.0.1",
"zalgolize": "^1.2.4",
"zlib": "^1.0.5"
Expand All @@ -100,4 +105,4 @@
"url": "https://github.com/eYuM-coder/Pogy/issues"
},
"homepage": "https://github.com/eYuM-coder/Pogy#readme"
}
}
2 changes: 1 addition & 1 deletion src/commands/utility/invite.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const { MessageActionRow, MessageButton, MessageEmbed } = require("discord.js");
const Command = require("../../structures/Command");
const Guild = require("../../database/schemas/Guild");
const client = require("/home/vboxuser/Pogy-3/index.js");
const client = require("../../../index.js");

module.exports = class extends Command {
constructor(...args) {
Expand Down
19 changes: 18 additions & 1 deletion src/data/users.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
{
"guilds": {

"1147423890574934079": {
"users": {
"1067137336674107453": {
"xp": 96,
"level": 2,
"messageTimeout": 1705014434047,
"username": "theeyum",
"background": "https://img.freepik.com/premium-photo/abstract-blue-black-gradient-plain-studio-background_570543-8893.jpg"
},
"969655699154042940": {
"xp": 46,
"level": 1,
"messageTimeout": 1705014604473,
"username": "hotsuop",
"background": "https://img.freepik.com/premium-photo/abstract-blue-black-gradient-plain-studio-background_570543-8893.jpg"
}
}
}
}
}

0 comments on commit 808759b

Please sign in to comment.