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:
@ -4,17 +4,22 @@ exports.usage = "<<refetch";
|
||||
exports.example = "<<refetch";
|
||||
exports.hidden = true;
|
||||
exports.run = async (client, message, args) => {
|
||||
const url = "https://drive.overflow.fun/public/react.json";
|
||||
client.usersToReactTo = [];
|
||||
const res = await fetch(url);
|
||||
const data = await res.json();
|
||||
if (message.author.id != client.ownerID) return;
|
||||
try {
|
||||
const url = "https://drive.overflow.fun/public/react.json";
|
||||
client.usersToReactTo = [];
|
||||
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 };
|
||||
});
|
||||
|
||||
message.channel.send(
|
||||
"Refetched react data. " + JSON.stringify(client.usersToReactTo)
|
||||
);
|
||||
message.channel.send(
|
||||
"Refetched react data. " + JSON.stringify(client.usersToReactTo)
|
||||
);
|
||||
} catch (e) {
|
||||
message.channel.send("copyparty instance unreachable/offline...");
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user