Skip to content

Commit

Permalink
Merge pull request #180 from unf6/main
Browse files Browse the repository at this point in the history
Forgot to remove pastebin transcript in some file and changed to new one
  • Loading branch information
elbkr authored Sep 27, 2023
2 parents 2d13324 + 8e892f0 commit 28a08ee
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 18 deletions.
41 changes: 24 additions & 17 deletions src/commands/ticket/open.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,14 +240,19 @@ export default class Open extends Interaction {
.reverse()
.join("\n");
if (b.length < 1) b = "No messages sent";
await client.createPaste({
code: `${b}`,
expireDate: ExpireDate.Never,
publicity: Publicity.Unlisted,
name: `${int.channel.name}`,
})
.then(async (res) => {
let urlToPaste = res;

const options = {
method: "POST",
body: b,
headers: {
"Content-Type": "application/json",
},
};
const res = await (
await fetch("https://hastebin.blackforthosting.com/documents", options)
).json();
const urlToPaste = `https://hastebin.blackforthosting.com/${res.key}`

let row = new ActionRowBuilder().addComponents(
new ButtonBuilder()
.setLabel("View transcript")
Expand Down Expand Up @@ -349,15 +354,17 @@ export default class Open extends Interaction {
.reverse()
.join("\n");
if (b.length < 1) b = "No messages sent";
await client
.createPaste({
code: `${b}`,
expireDate: ExpireDate.Never,
publicity: Publicity.Unlisted,
name: `${int.channel.name}`,
})
.then(async (res) => {
let urlToPaste = res;
const options = {
method: "POST",
body: b,
headers: {
"Content-Type": "application/json",
},
};
const res = await (
await fetch("https://hastebin.blackforthosting.com/documents", options)
).json();
const urlToPaste = `https://hastebin.blackforthosting.com/${res.key}`
let row = new ActionRowBuilder().addComponents(
new ButtonBuilder()
.setLabel("View transcript")
Expand Down
1 change: 0 additions & 1 deletion src/commands/ticket/transcript.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import tickets from "../../models/Tickets.js";
import { EmbedBuilder, ButtonBuilder, ActionRowBuilder, ButtonStyle, PermissionFlagsBits } from "discord.js";
import { PasteClient, ExpireDate, Publicity } from "pastebin-api";

export default class Transcript extends Interaction {
constructor() {
Expand Down

0 comments on commit 28a08ee

Please sign in to comment.