auto update

This commit is contained in:
root 2025-03-29 19:11:13 +00:00
commit a9ca78ae6a
3 changed files with 498 additions and 1 deletions

383
discord/index.js Normal file
View file

@ -0,0 +1,383 @@
require("dotenv").config();
const {
Client,
GatewayIntentBits,
REST,
Routes,
ApplicationCommandOptionType,
ApplicationCommandType
} = require("discord.js");
const axios = require("axios");
const ping = require("ping");
const client = new Client({
intents: [GatewayIntentBits.Guilds, GatewayIntentBits.DirectMessages],
});
// Original slash commands
const slashCommands = [
{
name: "fetch_data",
description: "Fetches data from an API",
type: ApplicationCommandType.ChatInput,
options: [
{
name: "url",
description: "The URL to fetch data from",
type: ApplicationCommandOptionType.String,
required: true,
},
],
},
{
name: "ping",
description: "Pings a remote server.",
type: ApplicationCommandType.ChatInput,
options: [
{
name: "ip",
description: "The IP Adress to ping.",
type: ApplicationCommandOptionType.String,
required: true,
},
],
},
{
name: "server_status",
description: "Fetches data from an API",
type: ApplicationCommandType.ChatInput,
options: [
{
name: "raw",
description: "Display raw JSON data",
type: ApplicationCommandOptionType.Boolean,
required: false,
},
],
},
// Add Cody command
{
name: "cody",
description: "Ask Cody (Sourcegraph AI) a coding question",
type: ApplicationCommandType.ChatInput,
options: [
{
name: "question",
description: "Your coding question",
type: ApplicationCommandOptionType.String,
required: true,
},
],
},
// Add Weather command
{
name: "weather",
description: "Get current weather for a location",
type: ApplicationCommandType.ChatInput,
options: [
{
name: "location",
description: "City name or postal code",
type: ApplicationCommandOptionType.String,
required: true,
},
],
},
];
// User context menu commands
const userCommands = [
{
name: "User Info",
type: ApplicationCommandType.User,
},
];
const commands = [...slashCommands, ...userCommands];
async function updateCommands() {
if (!process.env.DISCORD_TOKEN || !process.env.CLIENT_ID) {
console.error("Missing required environment variables: DISCORD_TOKEN or CLIENT_ID");
return;
}
const rest = new REST({ version: "10" }).setToken(process.env.DISCORD_TOKEN);
try {
console.log("Fetching existing commands...");
const existingCommands = await rest.get(Routes.applicationCommands(process.env.CLIENT_ID));
// Delete all existing commands if needed
// for (const command of existingCommands) {
// await rest.delete(`${Routes.applicationCommands(process.env.CLIENT_ID)}/${command.id}`);
// console.log(`Deleted command: ${command.name}`);
// }
// Register new commands (slash + user commands)
console.log("Registering new commands...");
await rest.put(Routes.applicationCommands(process.env.CLIENT_ID), { body: commands });
console.log("Commands updated successfully!");
} catch (error) {
console.error("Error updating commands:", error);
}
}
// Function to ask Cody a question and parse the streaming response
async function askCody(question) {
if (!process.env.SOURCEGRAPH_API_KEY) {
throw new Error("SOURCEGRAPH_API_KEY is not set in environment variables");
}
try {
const response = await axios({
method: 'post',
url: 'https://sourcegraph.com/.api/completions/stream',
data: {
messages: [
{
speaker: "human",
text: question
}
],
temperature: 0.3,
maxTokensToSample: 2000,
topK: 50,
topP: 0.95
},
headers: {
'Content-Type': 'application/json',
'Authorization': `token ${process.env.SOURCEGRAPH_API_KEY}`
},
responseType: 'text'
});
// Parse the streaming response
const events = response.data.split('\n\n').filter(line => line.trim() !== '');
let fullCompletion = '';
for (const event of events) {
const lines = event.split('\n');
const eventType = lines[0].replace('event: ', '');
if (eventType === 'completion') {
const dataLine = lines[1];
if (dataLine && dataLine.startsWith('data: ')) {
try {
const jsonData = JSON.parse(dataLine.substring(6));
if (jsonData.completion) {
// This is the full completion up to this point, not just an increment
fullCompletion = jsonData.completion;
}
} catch (e) {
console.error('Error parsing JSON from Cody response:', e);
}
}
}
}
return fullCompletion;
} catch (error) {
console.error('Error calling Cody API:', error.message);
if (error.response) {
console.error('Response data:', error.response.data);
console.error('Response status:', error.response.status);
}
throw error;
}
}
client.once("ready", async () => {
console.log(`Logged in as ${client.user.tag}`);
await updateCommands();
});
client.on("interactionCreate", async (interaction) => {
// Handle slash commands
if (interaction.isChatInputCommand()) {
switch (interaction.commandName) {
case "fetch_data":
try {
const url = interaction.options.getString("url");
if (!url.startsWith("http://") && !url.startsWith("https://")) {
await interaction.reply({
content: "Please provide a valid URL starting with http:// or https://",
ephemeral: true,
});
return;
}
const response = await axios.get(url);
await interaction.reply({
content: `\`\`\`json\n${JSON.stringify(response.data, null, 2)}\n\`\`\``,
});
} catch (error) {
console.error(error);
await interaction.reply({ content: "Failed to fetch data.", ephemeral: true });
}
break;
case "ping":
try {
await interaction.deferReply();
const ip = interaction.options.getString("ip");
const pingResult = await ping.promise.probe(ip);
if (pingResult.time == "unknown") {
await interaction.editReply({
content: "Unable to ping the IP address.",
ephemeral: true,
});
return;
}
await interaction.editReply({ content: `Ping: ${pingResult.time}ms` });
} catch (error) {
console.error(error);
await interaction.editReply({ content: "Failed to ping.", ephemeral: true });
}
break;
case "server_status":
try {
const response = await axios.get("https://blahaj.tr:2589/status");
const isRaw = interaction.options.getBoolean("raw") ?? false;
if (isRaw) {
await interaction.reply({
content: `\`\`\`json\n${JSON.stringify(response.data, null, 2)}\n\`\`\``,
});
} else {
let formattedResponse = "";
for (const [server, data] of Object.entries(response.data)) {
const status = data.online ? "online" : "offline";
const responseTime = data.responseTime.toFixed(2);
formattedResponse += `${server}: ${status}, response time: ${responseTime}ms\n`;
}
await interaction.reply({ content: formattedResponse });
}
} catch (error) {
console.error(error);
await interaction.reply({ content: "Failed to get status.", ephemeral: true });
}
break;
case "cody":
try {
await interaction.deferReply();
const question = interaction.options.getString("question");
if (!process.env.SOURCEGRAPH_API_KEY) {
await interaction.editReply({
content: "Sourcegraph API key not configured. Please add SOURCEGRAPH_API_KEY to your environment variables.",
ephemeral: true
});
return;
}
console.log(`Asking Cody: ${question}`);
// Call Cody API
const codyResponse = await askCody(question);
console.log(`Cody response received: ${codyResponse ? 'yes' : 'no'}`);
// Format the response
let formattedResponse = codyResponse || "No response received from Cody.";
// If the response is too long for Discord (which has a 2000 character limit)
if (formattedResponse.length > 1900) {
formattedResponse = formattedResponse.substring(0, 1900) + "...\n(Response truncated due to Discord's character limit)";
}
await interaction.editReply({
content: `**Question:** ${question}\n\n**Cody's Answer:**\n${formattedResponse}`
});
} catch (error) {
console.error("Cody API error:", error);
await interaction.editReply({
content: "Sorry, I couldn't get an answer from Cody. Please try again later.",
ephemeral: true
});
}
break;
case "weather":
try {
await interaction.deferReply();
const location = interaction.options.getString("location");
// Make sure you have WEATHER_API_KEY in your .env file
if (!process.env.WEATHER_API_KEY) {
await interaction.editReply({
content: "Weather API key not configured. Please add WEATHER_API_KEY to your environment variables.",
ephemeral: true
});
return;
}
const weatherUrl = `https://api.weatherapi.com/v1/forecast.json?key=${process.env.WEATHER_API_KEY}&q=${encodeURIComponent(location)}&aqi=no&days=1`;
const response = await axios.get(weatherUrl);
const data = response.data;
const location_name = data.location.name;
const region = data.location.region;
const country = data.location.country;
const localTime = data.location.localtime;
const temp_c = data.current.temp_c;
const temp_f = data.current.temp_f;
const condition = data.current.condition.text;
const humidity = data.current.humidity;
const wind_kph = data.current.wind_kph;
const wind_mph = data.current.wind_mph;
const feelslike_c = data.current.feelslike_c;
const feelslike_f = data.current.feelslike_f;
const maxtemp_c = data.forecast.forecastday[0].day.maxtemp_c;
const maxtemp_f = data.forecast.forecastday[0].day.maxtemp_f;
const mintemp_c = data.forecast.forecastday[0].day.mintemp_c;
const mintemp_f = data.forecast.forecastday[0].day.mintemp_f;
const weatherEmbed = {
title: `Weather for ${location_name}, ${region}, ${country}`,
description: `Current condition: ${condition}\nLocal time: ${localTime}`,
fields: [
{ name: 'Temperature', value: `${temp_c}°C / ${temp_f}°F`, inline: true },
{ name: 'Feels Like', value: `${feelslike_c}°C / ${feelslike_f}°F`, inline: true },
{ name: 'Humidity', value: `${humidity}%`, inline: true },
{ name: 'Wind Speed', value: `${wind_kph} km/h / ${wind_mph} mph`, inline: true },
{ name: 'Max Temperature', value: `${maxtemp_c}°C / ${maxtemp_f}°F`, inline: true },
{ name: 'Min Temperature', value: `${mintemp_c}°C / ${mintemp_f}°F`, inline: true }
],
thumbnail: { url: `https:${data.current.condition.icon}` },
timestamp: new Date(),
footer: { text: 'Powered by WeatherAPI.com' }
};
await interaction.editReply({ embeds: [weatherEmbed] });
} catch (error) {
await interaction.editReply({
content: "Failed to fetch weather data. Please check the location name and try again.",
ephemeral: true
});
}
break;
}
}
// Handle user context menu commands
else if (interaction.isUserContextMenuCommand()) {
switch (interaction.commandName) {
case "User Info":
try {
const user = interaction.targetUser;
await interaction.reply({
content: `User info:\n• Tag: ${user.tag}\n• ID: ${user.id}`,
ephemeral: true,
});
} catch (error) {
console.error(error);
await interaction.reply({ content: "Failed to retrieve user info.", ephemeral: true });
}
break;
}
}
});
client.login(process.env.DISCORD_TOKEN);

113
package-lock.json generated
View file

@ -21,6 +21,10 @@
"version": "1.10.1", "version": "1.10.1",
"resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-1.10.1.tgz", "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-1.10.1.tgz",
"integrity": "sha512-OWo1fY4ztL1/M/DUyRPShB4d/EzVfuUvPTRRHRIt/YxBrUYSz0a+JicD5F5zHFoNs2oTuWavxCOVFV1UljHTng==", "integrity": "sha512-OWo1fY4ztL1/M/DUyRPShB4d/EzVfuUvPTRRHRIt/YxBrUYSz0a+JicD5F5zHFoNs2oTuWavxCOVFV1UljHTng==",
<<<<<<< HEAD
=======
"license": "Apache-2.0",
>>>>>>> d2e2f303490c6d71bcbf25725b444888f03eb19f
"dependencies": { "dependencies": {
"@discordjs/formatters": "^0.6.0", "@discordjs/formatters": "^0.6.0",
"@discordjs/util": "^1.1.1", "@discordjs/util": "^1.1.1",
@ -41,6 +45,10 @@
"version": "1.5.3", "version": "1.5.3",
"resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-1.5.3.tgz", "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-1.5.3.tgz",
"integrity": "sha512-SVb428OMd3WO1paV3rm6tSjM4wC+Kecaa1EUGX7vc6/fddvw/6lg90z4QtCqm21zvVe92vMMDt9+DkIvjXImQQ==", "integrity": "sha512-SVb428OMd3WO1paV3rm6tSjM4wC+Kecaa1EUGX7vc6/fddvw/6lg90z4QtCqm21zvVe92vMMDt9+DkIvjXImQQ==",
<<<<<<< HEAD
=======
"license": "Apache-2.0",
>>>>>>> d2e2f303490c6d71bcbf25725b444888f03eb19f
"engines": { "engines": {
"node": ">=16.11.0" "node": ">=16.11.0"
} }
@ -49,6 +57,10 @@
"version": "0.6.0", "version": "0.6.0",
"resolved": "https://registry.npmjs.org/@discordjs/formatters/-/formatters-0.6.0.tgz", "resolved": "https://registry.npmjs.org/@discordjs/formatters/-/formatters-0.6.0.tgz",
"integrity": "sha512-YIruKw4UILt/ivO4uISmrGq2GdMY6EkoTtD0oS0GvkJFRZbTSdPhzYiUILbJ/QslsvC9H9nTgGgnarnIl4jMfw==", "integrity": "sha512-YIruKw4UILt/ivO4uISmrGq2GdMY6EkoTtD0oS0GvkJFRZbTSdPhzYiUILbJ/QslsvC9H9nTgGgnarnIl4jMfw==",
<<<<<<< HEAD
=======
"license": "Apache-2.0",
>>>>>>> d2e2f303490c6d71bcbf25725b444888f03eb19f
"dependencies": { "dependencies": {
"discord-api-types": "^0.37.114" "discord-api-types": "^0.37.114"
}, },
@ -63,6 +75,10 @@
"version": "2.4.3", "version": "2.4.3",
"resolved": "https://registry.npmjs.org/@discordjs/rest/-/rest-2.4.3.tgz", "resolved": "https://registry.npmjs.org/@discordjs/rest/-/rest-2.4.3.tgz",
"integrity": "sha512-+SO4RKvWsM+y8uFHgYQrcTl/3+cY02uQOH7/7bKbVZsTfrfpoE62o5p+mmV+s7FVhTX82/kQUGGbu4YlV60RtA==", "integrity": "sha512-+SO4RKvWsM+y8uFHgYQrcTl/3+cY02uQOH7/7bKbVZsTfrfpoE62o5p+mmV+s7FVhTX82/kQUGGbu4YlV60RtA==",
<<<<<<< HEAD
=======
"license": "Apache-2.0",
>>>>>>> d2e2f303490c6d71bcbf25725b444888f03eb19f
"dependencies": { "dependencies": {
"@discordjs/collection": "^2.1.1", "@discordjs/collection": "^2.1.1",
"@discordjs/util": "^1.1.1", "@discordjs/util": "^1.1.1",
@ -85,6 +101,10 @@
"version": "2.1.1", "version": "2.1.1",
"resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-2.1.1.tgz", "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-2.1.1.tgz",
"integrity": "sha512-LiSusze9Tc7qF03sLCujF5iZp7K+vRNEDBZ86FT9aQAv3vxMLihUvKvpsCWiQ2DJq1tVckopKm1rxomgNUc9hg==", "integrity": "sha512-LiSusze9Tc7qF03sLCujF5iZp7K+vRNEDBZ86FT9aQAv3vxMLihUvKvpsCWiQ2DJq1tVckopKm1rxomgNUc9hg==",
<<<<<<< HEAD
=======
"license": "Apache-2.0",
>>>>>>> d2e2f303490c6d71bcbf25725b444888f03eb19f
"engines": { "engines": {
"node": ">=18" "node": ">=18"
}, },
@ -96,6 +116,10 @@
"version": "1.1.1", "version": "1.1.1",
"resolved": "https://registry.npmjs.org/@discordjs/util/-/util-1.1.1.tgz", "resolved": "https://registry.npmjs.org/@discordjs/util/-/util-1.1.1.tgz",
"integrity": "sha512-eddz6UnOBEB1oITPinyrB2Pttej49M9FZQY8NxgEvc3tq6ZICZ19m70RsmzRdDHk80O9NoYN/25AqJl8vPVf/g==", "integrity": "sha512-eddz6UnOBEB1oITPinyrB2Pttej49M9FZQY8NxgEvc3tq6ZICZ19m70RsmzRdDHk80O9NoYN/25AqJl8vPVf/g==",
<<<<<<< HEAD
=======
"license": "Apache-2.0",
>>>>>>> d2e2f303490c6d71bcbf25725b444888f03eb19f
"engines": { "engines": {
"node": ">=18" "node": ">=18"
}, },
@ -107,6 +131,10 @@
"version": "1.2.1", "version": "1.2.1",
"resolved": "https://registry.npmjs.org/@discordjs/ws/-/ws-1.2.1.tgz", "resolved": "https://registry.npmjs.org/@discordjs/ws/-/ws-1.2.1.tgz",
"integrity": "sha512-PBvenhZG56a6tMWF/f4P6f4GxZKJTBG95n7aiGSPTnodmz4N5g60t79rSIAq7ywMbv8A4jFtexMruH+oe51aQQ==", "integrity": "sha512-PBvenhZG56a6tMWF/f4P6f4GxZKJTBG95n7aiGSPTnodmz4N5g60t79rSIAq7ywMbv8A4jFtexMruH+oe51aQQ==",
<<<<<<< HEAD
=======
"license": "Apache-2.0",
>>>>>>> d2e2f303490c6d71bcbf25725b444888f03eb19f
"dependencies": { "dependencies": {
"@discordjs/collection": "^2.1.0", "@discordjs/collection": "^2.1.0",
"@discordjs/rest": "^2.4.3", "@discordjs/rest": "^2.4.3",
@ -129,6 +157,10 @@
"version": "2.1.1", "version": "2.1.1",
"resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-2.1.1.tgz", "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-2.1.1.tgz",
"integrity": "sha512-LiSusze9Tc7qF03sLCujF5iZp7K+vRNEDBZ86FT9aQAv3vxMLihUvKvpsCWiQ2DJq1tVckopKm1rxomgNUc9hg==", "integrity": "sha512-LiSusze9Tc7qF03sLCujF5iZp7K+vRNEDBZ86FT9aQAv3vxMLihUvKvpsCWiQ2DJq1tVckopKm1rxomgNUc9hg==",
<<<<<<< HEAD
=======
"license": "Apache-2.0",
>>>>>>> d2e2f303490c6d71bcbf25725b444888f03eb19f
"engines": { "engines": {
"node": ">=18" "node": ">=18"
}, },
@ -140,6 +172,10 @@
"version": "1.5.5", "version": "1.5.5",
"resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.5.5.tgz", "resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.5.5.tgz",
"integrity": "sha512-cvGzxbba6sav2zZkH8GPf2oGk9yYoD5qrNWdu9fRehifgnFZJMV+nuy2nON2roRO4yQQ+v7MK/Pktl/HgfsUXg==", "integrity": "sha512-cvGzxbba6sav2zZkH8GPf2oGk9yYoD5qrNWdu9fRehifgnFZJMV+nuy2nON2roRO4yQQ+v7MK/Pktl/HgfsUXg==",
<<<<<<< HEAD
=======
"license": "MIT",
>>>>>>> d2e2f303490c6d71bcbf25725b444888f03eb19f
"engines": { "engines": {
"node": ">=v14.0.0", "node": ">=v14.0.0",
"npm": ">=7.0.0" "npm": ">=7.0.0"
@ -149,6 +185,10 @@
"version": "4.0.0", "version": "4.0.0",
"resolved": "https://registry.npmjs.org/@sapphire/shapeshift/-/shapeshift-4.0.0.tgz", "resolved": "https://registry.npmjs.org/@sapphire/shapeshift/-/shapeshift-4.0.0.tgz",
"integrity": "sha512-d9dUmWVA7MMiKobL3VpLF8P2aeanRTu6ypG2OIaEv/ZHH/SUQ2iHOVyi5wAPjQ+HmnMuL0whK9ez8I/raWbtIg==", "integrity": "sha512-d9dUmWVA7MMiKobL3VpLF8P2aeanRTu6ypG2OIaEv/ZHH/SUQ2iHOVyi5wAPjQ+HmnMuL0whK9ez8I/raWbtIg==",
<<<<<<< HEAD
=======
"license": "MIT",
>>>>>>> d2e2f303490c6d71bcbf25725b444888f03eb19f
"dependencies": { "dependencies": {
"fast-deep-equal": "^3.1.3", "fast-deep-equal": "^3.1.3",
"lodash": "^4.17.21" "lodash": "^4.17.21"
@ -161,6 +201,10 @@
"version": "3.5.3", "version": "3.5.3",
"resolved": "https://registry.npmjs.org/@sapphire/snowflake/-/snowflake-3.5.3.tgz", "resolved": "https://registry.npmjs.org/@sapphire/snowflake/-/snowflake-3.5.3.tgz",
"integrity": "sha512-jjmJywLAFoWeBi1W7994zZyiNWPIiqRRNAmSERxyg93xRGzNYvGjlZ0gR6x0F4gPRi2+0O6S71kOZYyr3cxaIQ==", "integrity": "sha512-jjmJywLAFoWeBi1W7994zZyiNWPIiqRRNAmSERxyg93xRGzNYvGjlZ0gR6x0F4gPRi2+0O6S71kOZYyr3cxaIQ==",
<<<<<<< HEAD
=======
"license": "MIT",
>>>>>>> d2e2f303490c6d71bcbf25725b444888f03eb19f
"engines": { "engines": {
"node": ">=v14.0.0", "node": ">=v14.0.0",
"npm": ">=7.0.0" "npm": ">=7.0.0"
@ -170,6 +214,10 @@
"version": "22.13.14", "version": "22.13.14",
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.14.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.14.tgz",
"integrity": "sha512-Zs/Ollc1SJ8nKUAgc7ivOEdIBM8JAKgrqqUYi2J997JuKO7/tpQC+WCetQ1sypiKCQWHdvdg9wBNpUPEWZae7w==", "integrity": "sha512-Zs/Ollc1SJ8nKUAgc7ivOEdIBM8JAKgrqqUYi2J997JuKO7/tpQC+WCetQ1sypiKCQWHdvdg9wBNpUPEWZae7w==",
<<<<<<< HEAD
=======
"license": "MIT",
>>>>>>> d2e2f303490c6d71bcbf25725b444888f03eb19f
"dependencies": { "dependencies": {
"undici-types": "~6.20.0" "undici-types": "~6.20.0"
} }
@ -178,6 +226,10 @@
"version": "8.18.0", "version": "8.18.0",
"resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.18.0.tgz", "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.18.0.tgz",
"integrity": "sha512-8svvI3hMyvN0kKCJMvTJP/x6Y/EoQbepff882wL+Sn5QsXb3etnamgrJq4isrBxSJj5L2AuXcI0+bgkoAXGUJw==", "integrity": "sha512-8svvI3hMyvN0kKCJMvTJP/x6Y/EoQbepff882wL+Sn5QsXb3etnamgrJq4isrBxSJj5L2AuXcI0+bgkoAXGUJw==",
<<<<<<< HEAD
=======
"license": "MIT",
>>>>>>> d2e2f303490c6d71bcbf25725b444888f03eb19f
"dependencies": { "dependencies": {
"@types/node": "*" "@types/node": "*"
} }
@ -186,6 +238,10 @@
"version": "2.4.6", "version": "2.4.6",
"resolved": "https://registry.npmjs.org/@vladfrangu/async_event_emitter/-/async_event_emitter-2.4.6.tgz", "resolved": "https://registry.npmjs.org/@vladfrangu/async_event_emitter/-/async_event_emitter-2.4.6.tgz",
"integrity": "sha512-RaI5qZo6D2CVS6sTHFKg1v5Ohq/+Bo2LZ5gzUEwZ/WkHhwtGTCB/sVLw8ijOkAUxasZ+WshN/Rzj4ywsABJ5ZA==", "integrity": "sha512-RaI5qZo6D2CVS6sTHFKg1v5Ohq/+Bo2LZ5gzUEwZ/WkHhwtGTCB/sVLw8ijOkAUxasZ+WshN/Rzj4ywsABJ5ZA==",
<<<<<<< HEAD
=======
"license": "MIT",
>>>>>>> d2e2f303490c6d71bcbf25725b444888f03eb19f
"engines": { "engines": {
"node": ">=v14.0.0", "node": ">=v14.0.0",
"npm": ">=7.0.0" "npm": ">=7.0.0"
@ -217,6 +273,7 @@
"version": "1.8.4", "version": "1.8.4",
"resolved": "https://registry.npmjs.org/axios/-/axios-1.8.4.tgz", "resolved": "https://registry.npmjs.org/axios/-/axios-1.8.4.tgz",
"integrity": "sha512-eBSYY4Y68NNlHbHBMdeDmKNtDgXWhQsJcGqzO3iLUM0GraQFSS9cVgPX5I9b3lbdFKyYoAEGAZF1DwhTaljNAw==", "integrity": "sha512-eBSYY4Y68NNlHbHBMdeDmKNtDgXWhQsJcGqzO3iLUM0GraQFSS9cVgPX5I9b3lbdFKyYoAEGAZF1DwhTaljNAw==",
"license": "MIT",
"dependencies": { "dependencies": {
"follow-redirects": "^1.15.6", "follow-redirects": "^1.15.6",
"form-data": "^4.0.0", "form-data": "^4.0.0",
@ -372,12 +429,21 @@
"node_modules/discord-api-types": { "node_modules/discord-api-types": {
"version": "0.37.119", "version": "0.37.119",
"resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.119.tgz", "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.119.tgz",
<<<<<<< HEAD
"integrity": "sha512-WasbGFXEB+VQWXlo6IpW3oUv73Yuau1Ig4AZF/m13tXcTKnMpc/mHjpztIlz4+BM9FG9BHQkEXiPto3bKduQUg==" "integrity": "sha512-WasbGFXEB+VQWXlo6IpW3oUv73Yuau1Ig4AZF/m13tXcTKnMpc/mHjpztIlz4+BM9FG9BHQkEXiPto3bKduQUg=="
=======
"integrity": "sha512-WasbGFXEB+VQWXlo6IpW3oUv73Yuau1Ig4AZF/m13tXcTKnMpc/mHjpztIlz4+BM9FG9BHQkEXiPto3bKduQUg==",
"license": "MIT"
>>>>>>> d2e2f303490c6d71bcbf25725b444888f03eb19f
}, },
"node_modules/discord.js": { "node_modules/discord.js": {
"version": "14.18.0", "version": "14.18.0",
"resolved": "https://registry.npmjs.org/discord.js/-/discord.js-14.18.0.tgz", "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-14.18.0.tgz",
"integrity": "sha512-SvU5kVUvwunQhN2/+0t55QW/1EHfB1lp0TtLZUSXVHDmyHTrdOj5LRKdR0zLcybaA15F+NtdWuWmGOX9lE+CAw==", "integrity": "sha512-SvU5kVUvwunQhN2/+0t55QW/1EHfB1lp0TtLZUSXVHDmyHTrdOj5LRKdR0zLcybaA15F+NtdWuWmGOX9lE+CAw==",
<<<<<<< HEAD
=======
"license": "Apache-2.0",
>>>>>>> d2e2f303490c6d71bcbf25725b444888f03eb19f
"dependencies": { "dependencies": {
"@discordjs/builders": "^1.10.1", "@discordjs/builders": "^1.10.1",
"@discordjs/collection": "1.5.3", "@discordjs/collection": "1.5.3",
@ -403,6 +469,10 @@
"version": "16.4.7", "version": "16.4.7",
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.7.tgz", "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.7.tgz",
"integrity": "sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==", "integrity": "sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==",
<<<<<<< HEAD
=======
"license": "BSD-2-Clause",
>>>>>>> d2e2f303490c6d71bcbf25725b444888f03eb19f
"engines": { "engines": {
"node": ">=12" "node": ">=12"
}, },
@ -538,7 +608,12 @@
"node_modules/fast-deep-equal": { "node_modules/fast-deep-equal": {
"version": "3.1.3", "version": "3.1.3",
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
<<<<<<< HEAD
"integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="
=======
"integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
"license": "MIT"
>>>>>>> d2e2f303490c6d71bcbf25725b444888f03eb19f
}, },
"node_modules/finalhandler": { "node_modules/finalhandler": {
"version": "1.3.1", "version": "1.3.1",
@ -738,17 +813,32 @@
"node_modules/lodash": { "node_modules/lodash": {
"version": "4.17.21", "version": "4.17.21",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
<<<<<<< HEAD
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
=======
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
"license": "MIT"
>>>>>>> d2e2f303490c6d71bcbf25725b444888f03eb19f
}, },
"node_modules/lodash.snakecase": { "node_modules/lodash.snakecase": {
"version": "4.1.1", "version": "4.1.1",
"resolved": "https://registry.npmjs.org/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz", "resolved": "https://registry.npmjs.org/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz",
<<<<<<< HEAD
"integrity": "sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw==" "integrity": "sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw=="
=======
"integrity": "sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw==",
"license": "MIT"
>>>>>>> d2e2f303490c6d71bcbf25725b444888f03eb19f
}, },
"node_modules/magic-bytes.js": { "node_modules/magic-bytes.js": {
"version": "1.10.0", "version": "1.10.0",
"resolved": "https://registry.npmjs.org/magic-bytes.js/-/magic-bytes.js-1.10.0.tgz", "resolved": "https://registry.npmjs.org/magic-bytes.js/-/magic-bytes.js-1.10.0.tgz",
<<<<<<< HEAD
"integrity": "sha512-/k20Lg2q8LE5xiaaSkMXk4sfvI+9EGEykFS4b0CHHGWqDYU0bGUFSwchNOMA56D7TCs9GwVTkqe9als1/ns8UQ==" "integrity": "sha512-/k20Lg2q8LE5xiaaSkMXk4sfvI+9EGEykFS4b0CHHGWqDYU0bGUFSwchNOMA56D7TCs9GwVTkqe9als1/ns8UQ=="
=======
"integrity": "sha512-/k20Lg2q8LE5xiaaSkMXk4sfvI+9EGEykFS4b0CHHGWqDYU0bGUFSwchNOMA56D7TCs9GwVTkqe9als1/ns8UQ==",
"license": "MIT"
>>>>>>> d2e2f303490c6d71bcbf25725b444888f03eb19f
}, },
"node_modules/math-intrinsics": { "node_modules/math-intrinsics": {
"version": "1.1.0", "version": "1.1.0",
@ -1095,12 +1185,22 @@
"node_modules/ts-mixer": { "node_modules/ts-mixer": {
"version": "6.0.4", "version": "6.0.4",
"resolved": "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.4.tgz", "resolved": "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.4.tgz",
<<<<<<< HEAD
"integrity": "sha512-ufKpbmrugz5Aou4wcr5Wc1UUFWOLhq+Fm6qa6P0w0K5Qw2yhaUoiWszhCVuNQyNwrlGiscHOmqYoAox1PtvgjA==" "integrity": "sha512-ufKpbmrugz5Aou4wcr5Wc1UUFWOLhq+Fm6qa6P0w0K5Qw2yhaUoiWszhCVuNQyNwrlGiscHOmqYoAox1PtvgjA=="
=======
"integrity": "sha512-ufKpbmrugz5Aou4wcr5Wc1UUFWOLhq+Fm6qa6P0w0K5Qw2yhaUoiWszhCVuNQyNwrlGiscHOmqYoAox1PtvgjA==",
"license": "MIT"
>>>>>>> d2e2f303490c6d71bcbf25725b444888f03eb19f
}, },
"node_modules/tslib": { "node_modules/tslib": {
"version": "2.8.1", "version": "2.8.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
<<<<<<< HEAD
"integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="
=======
"integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==",
"license": "0BSD"
>>>>>>> d2e2f303490c6d71bcbf25725b444888f03eb19f
}, },
"node_modules/type-is": { "node_modules/type-is": {
"version": "1.6.18", "version": "1.6.18",
@ -1118,6 +1218,10 @@
"version": "6.21.1", "version": "6.21.1",
"resolved": "https://registry.npmjs.org/undici/-/undici-6.21.1.tgz", "resolved": "https://registry.npmjs.org/undici/-/undici-6.21.1.tgz",
"integrity": "sha512-q/1rj5D0/zayJB2FraXdaWxbhWiNKDvu8naDT2dl1yTlvJp4BLtOcp2a5BvgGNQpYYJzau7tf1WgKv3b+7mqpQ==", "integrity": "sha512-q/1rj5D0/zayJB2FraXdaWxbhWiNKDvu8naDT2dl1yTlvJp4BLtOcp2a5BvgGNQpYYJzau7tf1WgKv3b+7mqpQ==",
<<<<<<< HEAD
=======
"license": "MIT",
>>>>>>> d2e2f303490c6d71bcbf25725b444888f03eb19f
"engines": { "engines": {
"node": ">=18.17" "node": ">=18.17"
} }
@ -1125,7 +1229,12 @@
"node_modules/undici-types": { "node_modules/undici-types": {
"version": "6.20.0", "version": "6.20.0",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz",
<<<<<<< HEAD
"integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==" "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg=="
=======
"integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==",
"license": "MIT"
>>>>>>> d2e2f303490c6d71bcbf25725b444888f03eb19f
}, },
"node_modules/unpipe": { "node_modules/unpipe": {
"version": "1.0.0", "version": "1.0.0",
@ -1155,6 +1264,10 @@
"version": "8.18.1", "version": "8.18.1",
"resolved": "https://registry.npmjs.org/ws/-/ws-8.18.1.tgz", "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.1.tgz",
"integrity": "sha512-RKW2aJZMXeMxVpnZ6bck+RswznaxmzdULiBr6KY7XkTnW8uvt0iT9H5DkHUChXrc+uurzwa0rVI16n/Xzjdz1w==", "integrity": "sha512-RKW2aJZMXeMxVpnZ6bck+RswznaxmzdULiBr6KY7XkTnW8uvt0iT9H5DkHUChXrc+uurzwa0rVI16n/Xzjdz1w==",
<<<<<<< HEAD
=======
"license": "MIT",
>>>>>>> d2e2f303490c6d71bcbf25725b444888f03eb19f
"engines": { "engines": {
"node": ">=10.0.0" "node": ">=10.0.0"
}, },

View file

@ -4,3 +4,4 @@ git commit -a -m "auto update"
git pull origin main git pull origin main
chown -R www-data:www-data /var/server/blahaj-srv chown -R www-data:www-data /var/server/blahaj-srv
pm2 restart node-api pm2 restart node-api
pm2 restart blahaj-discord