This repository has been archived on 2025-08-25. You can view files and clone it, but cannot push or open issues or pull requests.
Files
shiro-calculator/commands/refetch.js
koneko dfc14f7f33
All checks were successful
Deploy bot / build-and-deploy (push) Successful in 14s
more more
2025-08-07 23:56:07 +02:00

21 lines
634 B
JavaScript

exports.name = "refetch";
exports.description = ":ninja: Refetch user react data.";
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();
client.usersToReactTo = data.map((entry) => {
const [userId, emoji] = entry.split(":");
return { userId, emoji };
});
message.channel.send(
"Refetched react data. " + JSON.stringify(client.usersToReactTo)
);
};