add some checks, more work on price estimating
All checks were successful
Deploy bot / build-and-deploy (push) Successful in 13s
All checks were successful
Deploy bot / build-and-deploy (push) Successful in 13s
This commit is contained in:
16
index.js
16
index.js
@ -35,13 +35,17 @@ fs.readdir("./commands/", (err, files) => {
|
||||
const url = "https://drive.overflow.fun/public/react.json";
|
||||
client.usersToReactTo = [];
|
||||
client.once(Events.ClientReady, async (readyClient) => {
|
||||
const res = await fetch(url);
|
||||
const data = await res.json();
|
||||
try {
|
||||
const res = await fetch(url);
|
||||
const data = await res.json();
|
||||
|
||||
client.usersToReactTo = data.map((entry) => {
|
||||
const [userId, emoji] = entry.split(":");
|
||||
return { userId, emoji };
|
||||
});
|
||||
client.usersToReactTo = data.map((entry) => {
|
||||
const [userId, emoji] = entry.split(":");
|
||||
return { userId, emoji };
|
||||
});
|
||||
} catch (e) {
|
||||
console.warn("copyparty is offline, wont work.");
|
||||
}
|
||||
console.log(`Ready! Logged in as ${readyClient.user.tag}`);
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user