lib.utils: restore old hastebin function
This commit is contained in:
parent
185c5d8774
commit
977fd48023
1 changed files with 3 additions and 4 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue