mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2024-12-22 15:53:08 +02:00
refactor: remove pad
dependency
because it can be done in vanilla JS just as easily
This commit is contained in:
parent
725fdf5ac5
commit
7b632ec54b
@ -65,7 +65,6 @@
|
|||||||
"node-dir": "^0.1.17",
|
"node-dir": "^0.1.17",
|
||||||
"node-emoji": "^1.11.0",
|
"node-emoji": "^1.11.0",
|
||||||
"object-diffy": "^1.0.4",
|
"object-diffy": "^1.0.4",
|
||||||
"pad": "^3.2.0",
|
|
||||||
"prisma": "^4.10.1",
|
"prisma": "^4.10.1",
|
||||||
"semver": "^7.3.8",
|
"semver": "^7.3.8",
|
||||||
"terminal-link": "^2.1.1",
|
"terminal-link": "^2.1.1",
|
||||||
|
@ -37,7 +37,6 @@ specifiers:
|
|||||||
node-emoji: ^1.11.0
|
node-emoji: ^1.11.0
|
||||||
nodemon: ^2.0.20
|
nodemon: ^2.0.20
|
||||||
object-diffy: ^1.0.4
|
object-diffy: ^1.0.4
|
||||||
pad: ^3.2.0
|
|
||||||
prisma: ^4.10.1
|
prisma: ^4.10.1
|
||||||
semver: ^7.3.8
|
semver: ^7.3.8
|
||||||
terminal-link: ^2.1.1
|
terminal-link: ^2.1.1
|
||||||
@ -71,7 +70,6 @@ dependencies:
|
|||||||
node-dir: 0.1.17
|
node-dir: 0.1.17
|
||||||
node-emoji: 1.11.0
|
node-emoji: 1.11.0
|
||||||
object-diffy: 1.0.4
|
object-diffy: 1.0.4
|
||||||
pad: 3.2.0
|
|
||||||
prisma: 4.10.1
|
prisma: 4.10.1
|
||||||
semver: 7.3.8
|
semver: 7.3.8
|
||||||
terminal-link: 2.1.1
|
terminal-link: 2.1.1
|
||||||
@ -1106,11 +1104,6 @@ packages:
|
|||||||
wrap-ansi: 7.0.0
|
wrap-ansi: 7.0.0
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/clone/1.0.4:
|
|
||||||
resolution: {integrity: sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==}
|
|
||||||
engines: {node: '>=0.8'}
|
|
||||||
dev: false
|
|
||||||
|
|
||||||
/clsx/1.2.1:
|
/clsx/1.2.1:
|
||||||
resolution: {integrity: sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg==}
|
resolution: {integrity: sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg==}
|
||||||
engines: {node: '>=6'}
|
engines: {node: '>=6'}
|
||||||
@ -1460,12 +1453,6 @@ packages:
|
|||||||
resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==}
|
resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/defaults/1.0.4:
|
|
||||||
resolution: {integrity: sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==}
|
|
||||||
dependencies:
|
|
||||||
clone: 1.0.4
|
|
||||||
dev: false
|
|
||||||
|
|
||||||
/depd/2.0.0:
|
/depd/2.0.0:
|
||||||
resolution: {integrity: sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==}
|
resolution: {integrity: sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==}
|
||||||
engines: {node: '>= 0.8'}
|
engines: {node: '>= 0.8'}
|
||||||
@ -3061,13 +3048,6 @@ packages:
|
|||||||
engines: {node: '>=6'}
|
engines: {node: '>=6'}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/pad/3.2.0:
|
|
||||||
resolution: {integrity: sha512-2u0TrjcGbOjBTJpyewEl4hBO3OeX5wWue7eIFPzQTg6wFSvoaHcBTTUY5m+n0hd04gmTCPuY0kCpVIVuw5etwg==}
|
|
||||||
engines: {node: '>= 4.0.0'}
|
|
||||||
dependencies:
|
|
||||||
wcwidth: 1.0.1
|
|
||||||
dev: false
|
|
||||||
|
|
||||||
/parent-module/1.0.1:
|
/parent-module/1.0.1:
|
||||||
resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==}
|
resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==}
|
||||||
engines: {node: '>=6'}
|
engines: {node: '>=6'}
|
||||||
@ -4125,12 +4105,6 @@ packages:
|
|||||||
engines: {node: '>= 0.8'}
|
engines: {node: '>= 0.8'}
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/wcwidth/1.0.1:
|
|
||||||
resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==}
|
|
||||||
dependencies:
|
|
||||||
defaults: 1.0.4
|
|
||||||
dev: false
|
|
||||||
|
|
||||||
/webidl-conversions/3.0.1:
|
/webidl-conversions/3.0.1:
|
||||||
resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==}
|
resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==}
|
||||||
dev: true
|
dev: true
|
||||||
|
@ -6,7 +6,6 @@ const Mustache = require('mustache');
|
|||||||
const { AttachmentBuilder } = require('discord.js');
|
const { AttachmentBuilder } = require('discord.js');
|
||||||
const Cryptr = require('cryptr');
|
const Cryptr = require('cryptr');
|
||||||
const { decrypt } = new Cryptr(process.env.ENCRYPTION_KEY);
|
const { decrypt } = new Cryptr(process.env.ENCRYPTION_KEY);
|
||||||
const pad = require('pad');
|
|
||||||
|
|
||||||
module.exports = class TranscriptSlashCommand extends SlashCommand {
|
module.exports = class TranscriptSlashCommand extends SlashCommand {
|
||||||
constructor(client, options) {
|
constructor(client, options) {
|
||||||
@ -84,7 +83,7 @@ module.exports = class TranscriptSlashCommand extends SlashCommand {
|
|||||||
message.text = message.content.content?.replace(/\n/g, '\n\t') ?? '';
|
message.text = message.content.content?.replace(/\n/g, '\n\t') ?? '';
|
||||||
message.content.attachments?.forEach(a => (message.text += '\n\t' + a.url));
|
message.content.attachments?.forEach(a => (message.text += '\n\t' + a.url));
|
||||||
message.content.embeds?.forEach(() => (message.text += '\n\t[embedded content]'));
|
message.content.embeds?.forEach(() => (message.text += '\n\t[embedded content]'));
|
||||||
message.number = 'M' + pad(String(ticket.archivedMessages.length).length, i + 1, '0');
|
message.number = 'M' + String(i + 1).padStart(ticket.archivedMessages.length.toString().length, '0');
|
||||||
ticket.archivedMessages[i] = message;
|
ticket.archivedMessages[i] = message;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user