Compare commits

...

6 commits

Author SHA1 Message Date
2afbca10ec Show architechture 2024-07-04 19:16:00 +02:00
5e012e0701 ignore no matter the extension 2024-07-04 19:15:46 +02:00
3f28a897b4 Replace "assert" with "with" 2024-07-04 19:15:29 +02:00
4a236497bd Update for new HandBrakeCLI 2024-07-04 05:53:54 +02:00
09a180e36e Fix for windows 2024-07-04 05:53:39 +02:00
0d4b88c465 Update dependencies 2024-07-04 05:53:27 +02:00
10 changed files with 918 additions and 3559 deletions

4
.gitignore vendored
View file

@ -6,8 +6,8 @@ unloaded/
database.sqlite3 database.sqlite3
tmp/*.js tmp/*.js
bin/yt-dlp bin/yt-dlp*
bin/HandBrakeCLI bin/HandBrakeCLI*
bin/upload.sh bin/upload.sh
bin/dectalk bin/dectalk

View file

@ -4,7 +4,7 @@ import TurndownService from 'turndown';
const turndown = new TurndownService(); const turndown = new TurndownService();
import fetch from 'node-fetch'; import fetch from 'node-fetch';
import fourChan from '../../json/4chan.json' assert {type: 'json'}; import fourChan from '../../json/4chan.json' with {type: 'json'};
export default { export default {
data: new SlashCommandBuilder() data: new SlashCommandBuilder()

View file

@ -8,7 +8,7 @@ import util from 'node:util';
import stream from 'node:stream'; import stream from 'node:stream';
import db from '../../models/index.js'; import db from '../../models/index.js';
import wordToCensor from '../../json/censor.json' assert {type: 'json'}; import wordToCensor from '../../json/censor.json' with {type: 'json'};
const { twiConsumer, twiConsumerSecret, twiToken, twiTokenSecret, twiChannel, twiLogChannel } = process.env; const { twiConsumer, twiConsumerSecret, twiToken, twiTokenSecret, twiChannel, twiLogChannel } = process.env;
const Blacklists = db.Blacklists; const Blacklists = db.Blacklists;

View file

@ -1,6 +1,6 @@
import { SlashCommandBuilder } from 'discord.js'; import { SlashCommandBuilder } from 'discord.js';
import { EmbedBuilder } from 'discord.js'; import { EmbedBuilder } from 'discord.js';
import donations from '../../json/donations.json' assert {type: 'json'}; import donations from '../../json/donations.json' with {type: 'json'};
export default { export default {
data: new SlashCommandBuilder() data: new SlashCommandBuilder()

View file

@ -152,7 +152,7 @@ async function download(url, interaction, originalInteraction, format = undefine
const compressInteraction = originalInteraction ? originalInteraction : interaction; const compressInteraction = originalInteraction ? originalInteraction : interaction;
if (compressInteraction.doCompress) { if (compressInteraction.doCompress) {
const presets = [ 'Social 8 MB 3 Minutes 360p30', 'Social 50 MB 10 Minutes 480p30', 'Social 50 MB 5 Minutes 720p30', 'Social 100 MB 5 Minutes 1080p30' ]; const presets = [ 'Social 25 MB 5 Minutes 360p60', 'Social 25 MB 2 Minutes 540p60', 'Social 25 MB 1 Minute 720p60', 'Social 25 MB 30 Seconds 1080p60' ];
const options = []; const options = [];
presets.forEach(p => { presets.forEach(p => {

View file

@ -42,7 +42,7 @@ export default {
{ name: 'Channels', value: client.channels.cache.size.toString(), inline: true }, { name: 'Channels', value: client.channels.cache.size.toString(), inline: true },
{ name: 'Users', value: client.users.cache.size.toString(), inline: true }, { name: 'Users', value: client.users.cache.size.toString(), inline: true },
{ name: 'Ram usage', value: `${bytesToSize(process.memoryUsage().heapUsed)}/${bytesToSize(os.totalmem)}`, inline: true }, { name: 'Ram usage', value: `${bytesToSize(process.memoryUsage().heapUsed)}/${bytesToSize(os.totalmem)}`, inline: true },
{ name: 'CPU', value: `${os.cpus()[0].model} (${os.cpus().length} core)`, inline: true }, { name: 'CPU', value: `${os.cpus()[0].model} (${os.cpus().length} core) (${os.arch()})`, inline: true },
{ name: 'OS', value: `${os.platform()} ${os.release()}`, inline: true }, { name: 'OS', value: `${os.platform()} ${os.release()}`, inline: true },
{ name: 'Nodejs version', value: process.version, inline: true }, { name: 'Nodejs version', value: process.version, inline: true },
{ name: 'Discord.js version', value: version, inline: true }, { name: 'Discord.js version', value: version, inline: true },

View file

@ -1,7 +1,7 @@
import { ActivityType } from 'discord.js'; import { ActivityType } from 'discord.js';
import game from '../../json/playing.json' assert {type: 'json'}; import game from '../../json/playing.json' with {type: 'json'};
import music from '../../json/listening.json' assert {type: 'json'}; import music from '../../json/listening.json' with {type: 'json'};
import watch from '../../json/watching.json' assert {type: 'json'}; import watch from '../../json/watching.json' with {type: 'json'};
export default { export default {
name: 'ready', name: 'ready',

View file

@ -1,6 +1,6 @@
import fs from 'node:fs'; import fs from 'node:fs';
import path from 'node:path'; import path from 'node:path';
import { fileURLToPath } from 'node:url'; import { fileURLToPath, pathToFileURL } from 'node:url';
import { Client, Collection, GatewayIntentBits, Partials } from 'discord.js'; import { Client, Collection, GatewayIntentBits, Partials } from 'discord.js';
import dotenv from 'dotenv'; import dotenv from 'dotenv';
dotenv.config(); dotenv.config();
@ -41,7 +41,7 @@ async function loadCommandFromDir(dir) {
for (const file of commandFiles) { for (const file of commandFiles) {
const filePath = path.join(commandsPath, file); const filePath = path.join(commandsPath, file);
import(filePath) import(pathToFileURL(filePath))
.then(importedCommand => { .then(importedCommand => {
const command = importedCommand.default; const command = importedCommand.default;
client.commands.set(command.data.name, command); client.commands.set(command.data.name, command);
@ -57,7 +57,7 @@ async function loadEventFromDir(dir, listener) {
for (const file of eventFiles) { for (const file of eventFiles) {
const filePath = path.join(eventsPath, file); const filePath = path.join(eventsPath, file);
import(filePath) import(pathToFileURL(filePath))
.then(importedEvent => { .then(importedEvent => {
const event = importedEvent.default; const event = importedEvent.default;
if (event.once) { if (event.once) {

4431
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -17,17 +17,15 @@
"homepage": "https://libtar.de", "homepage": "https://libtar.de",
"license": "AGPL", "license": "AGPL",
"dependencies": { "dependencies": {
"@discordjs/rest": "^0.4.1", "@discordjs/rest": "^2.3.0",
"discord-api-types": "^0.33.5", "discord-api-types": "^0.37.91",
"discord.js": "^14.9.0", "discord.js": "^14.15.3",
"dotenv": "^16.0.1", "dotenv": "^16.0.1",
"mariadb": "^3.0.1", "mariadb": "^3.3.1",
"mysql2": "^2.3.3", "node-fetch": "^3.3.2",
"node-fetch": "^3.2.6", "sequelize": "^6.37.3",
"safe-regex": "github:davisjam/safe-regex", "turndown": "^7.2.0",
"sequelize": "^6.21.3", "twitter-api-v2": "^1.17.1",
"turndown": "^7.1.1",
"twitter-api-v2": "^1.15.0",
"ytpplus-node": "github:Supositware/ytpplus-node" "ytpplus-node": "github:Supositware/ytpplus-node"
}, },
"devDependencies": { "devDependencies": {
@ -36,6 +34,6 @@
"@types/node": "^18.7.3", "@types/node": "^18.7.3",
"eslint": "^8.16.0", "eslint": "^8.16.0",
"sequelize-cli": "^6.4.1", "sequelize-cli": "^6.4.1",
"sqlite3": "^5.1.6" "sqlite3": "^5.1.7"
} }
} }