Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forgot to remove pastebin transcript in some file and changed to new one #180

Merged
merged 2 commits into from
Sep 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading