Compare commits

..

No commits in common. "2afbca10eccef823c8e9edf3d424c4cfd4785b93" and "49c756bd62d3cfad644fc590553c50eadb00f548" have entirely different histories.

10 changed files with 3566 additions and 925 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' with {type: 'json'}; import fourChan from '../../json/4chan.json' assert {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' with {type: 'json'}; import wordToCensor from '../../json/censor.json' assert {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' with {type: 'json'}; import donations from '../../json/donations.json' assert {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 25 MB 5 Minutes 360p60', 'Social 25 MB 2 Minutes 540p60', 'Social 25 MB 1 Minute 720p60', 'Social 25 MB 30 Seconds 1080p60' ]; 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 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) (${os.arch()})`, inline: true }, { name: 'CPU', value: `${os.cpus()[0].model} (${os.cpus().length} core)`, 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' with {type: 'json'}; import game from '../../json/playing.json' assert {type: 'json'};
import music from '../../json/listening.json' with {type: 'json'}; import music from '../../json/listening.json' assert {type: 'json'};
import watch from '../../json/watching.json' with {type: 'json'}; import watch from '../../json/watching.json' assert {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, pathToFileURL } from 'node:url'; import { fileURLToPath } 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(pathToFileURL(filePath)) import(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(pathToFileURL(filePath)) import(filePath)
.then(importedEvent => { .then(importedEvent => {
const event = importedEvent.default; const event = importedEvent.default;
if (event.once) { if (event.once) {

4445
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

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