initial commit
This commit is contained in:
commit
e536d6b61c
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
config.json
|
||||
node_modules
|
||||
.vscode
|
22
bot.js
Normal file
22
bot.js
Normal 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
4
example_config.json
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"token": "",
|
||||
"cookie": ""
|
||||
}
|
1953
package-lock.json
generated
Normal file
1953
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
6
package.json
Normal file
6
package.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"discord.js": "^13.6.0",
|
||||
"noblox.js": "^4.13.1"
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user