initial commit

This commit is contained in:
Carter Penterman 2022-05-12 13:47:56 -05:00
commit e536d6b61c
5 changed files with 1988 additions and 0 deletions

3
.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
config.json
node_modules
.vscode

22
bot.js Normal file
View File

@ -0,0 +1,22 @@
const noblox = require("noblox.js");
const { Client, Intents } = require("discord.js");
const {cookie, token} = require("./config.json");
function buyAsset(id) {
noblox.setCookie(cookie)
.then(async () => {
noblox.buy(921233306, 0)
.catch(async (error) => {
console.log("Could not purchase, error: ")
console.log(error)
});
});
}
const client = new Client({ intents: [Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES]});
client.once("ready", () => {
console.log("Ready");
});
client.login(token);

4
example_config.json Normal file
View File

@ -0,0 +1,4 @@
{
"token": "",
"cookie": ""
}

1953
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

6
package.json Normal file
View File

@ -0,0 +1,6 @@
{
"dependencies": {
"discord.js": "^13.6.0",
"noblox.js": "^4.13.1"
}
}