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

Service Unavilable (error message, discord.js) #202

Open
SurgicalCrow opened this issue Sep 26, 2020 · 5 comments
Open

Service Unavilable (error message, discord.js) #202

SurgicalCrow opened this issue Sep 26, 2020 · 5 comments

Comments

@SurgicalCrow
Copy link

SurgicalCrow commented Sep 26, 2020

Hello

try { const haste = await hastebin("MY CDE", { extension: "txt" })
  message.reply(haste)
    } catch (err) {  message.channel.send(err.message) 

  }

This returns Service Unavailable

@Blessedwasnotfat
Copy link

i'm getting that too. you should make sure you're using the correct usage though.

@tandpfun
Copy link

#33 mentions it as well, but hastebin isn't down.

@kynooo
Copy link

kynooo commented Mar 31, 2022

still having this issue

@dubfib
Copy link

dubfib commented Apr 3, 2022

#33 mentions it as well, but hastebin isn't down.

the api has been moved

@dubfib
Copy link

dubfib commented May 14, 2022

Hello

try { const haste = await hastebin("MY CDE", { extension: "txt" })
  message.reply(haste)
    } catch (err) {  message.channel.send(err.message) 

  }

This returns Service Unavailable

Since hastebin was acquired by topal the API has changed and the package owner hasn't changed it. Although the package owner allowed it so then you can pick the url which fixes the problem. I will list a example below.

const hastebin = require("hastebin-gen");

try {
    const haste = await hastebin("MY CDE", { url: "https://www.toptal.com/developers/hastebin", extension: "txt" });
    //discord.js v13 code although if your on v12 use message.reply(haste);
    message.reply({ content: haste });
} catch (err) {
    message.reply({ content: err.message });
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants