lib.utils: restore old hastebin function

This commit is contained in:
Cynthia Foxwell 2022-10-09 12:05:30 -06:00
parent 185c5d8774
commit 977fd48023
1 changed files with 3 additions and 4 deletions

View File

@ -150,12 +150,11 @@ async function getImage(msg, str) {
}
async function hastebin(body) {
const res = await fetch(`https://nekobin.com/api/documents`, {
const res = await fetch(`${hf.config.haste_provider}/documents`, {
method: "POST",
headers: {"Content-Type": "application/json"},
body: JSON.stringify({content: body}),
body,
}).then((r) => r.json());
return "<https://nekobin.com/" + res.result.key + ">";
return `<${hf.config.haste_provider}/${res.key}>`;
}
hf.selectionMessages = hf.selectionMessages || new Collection();