more more
All checks were successful
Deploy bot / build-and-deploy (push) Successful in 14s

This commit is contained in:
2025-08-07 23:56:07 +02:00
parent 2594991b21
commit dfc14f7f33
8 changed files with 38 additions and 7 deletions

20
commands/refetch.js Normal file
View File

@ -0,0 +1,20 @@
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)
);
};