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
Booru is not a constructor? #40
Comments
It's an issue with how typescript is compiling the package, so instead of the intended I will see how I can force typescript to not do that (or expose a |
great, but now i get this (unrelated to bot code) const Booru = require('booru'); // load the fucking uhh client.on("message", (message) => { if (message.content.startsWith(prefix + "imgtest")) { client.login("NO TOKEN HERE EHEHEH"); gives: |
It's a separate issue, |
Let me know if that works for you |
so here's my code.
const Booru = require('booru') // load the fucking uhh
const sb = new Booru("sb")
const Discord = require('discord.js'); // make discord actually need discord.js
const client = new Discord.Client(); // make bot do a fucking exist
const prefix = "#"; // prefix what the fuck else to say
const version = "3.1 alpha";
const botname = "MSPABot";
const hostsys = "Debian 10 using Windows 10 Home"
const imgsfw = sb.search(['homestuck'])
client.on("message", (message) => {
// Exit and stop if it's not there
if (!message.content.startsWith(prefix)) return;
if (message.content.startsWith(prefix + "imgtest")) {
message.channel.send(botname + " " + version + " " + hostsys + "\n" + imgsfw[0].postView);
} else
if (message.content.startsWith(prefix + "foo")) {
message.channel.send("bar!");
}
});
client.login("mmm im not putting the token on git ;)");
every run though i get the following:
/home/saiko/MSPABot/main.js:2
const sb = new Booru("sb")
^
TypeError: Booru is not a constructor
clearly booru is a constructor. what
The text was updated successfully, but these errors were encountered: