mirror of
https://github.com/arthur-pbty/selfbot-discord.git
synced 2026-06-19 21:40:12 +02:00
update
This commit is contained in:
@@ -138,6 +138,38 @@ module.exports = {
|
||||
}, 60000);
|
||||
|
||||
|
||||
let intervalTime = 10000;
|
||||
|
||||
setInterval(() => {
|
||||
db.get('SELECT value FROM config WHERE name = "timeRainbowRole"', (err: any, row: any) => {
|
||||
if (err) {
|
||||
console.error(err.message);
|
||||
}
|
||||
const time = row ? row.value : 10;
|
||||
intervalTime = time * 1000;
|
||||
});
|
||||
let roles: any = [];
|
||||
db.all('SELECT * FROM rainbowroles', (err: any, rows: any) => {
|
||||
if (err) {
|
||||
console.error(err.message);
|
||||
}
|
||||
rows.forEach((row: any) => {
|
||||
roles.push(row);
|
||||
});
|
||||
roles.forEach((role: any) => {
|
||||
const guilds = client.guilds.cache;
|
||||
guilds.forEach((guild: any) => {
|
||||
const roleToEdit = guild.roles.cache.get(role.roleID);
|
||||
if (roleToEdit) {
|
||||
const randomColor = Math.floor(Math.random() * 16777215).toString(16);
|
||||
roleToEdit.setColor(randomColor);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}, intervalTime);
|
||||
|
||||
|
||||
process.on('unhandledRejection', (reason, p) => {
|
||||
console.log(' [antiCrash] :: Unhandled Rejection/Catch');
|
||||
console.log(reason, p);
|
||||
|
||||
Reference in New Issue
Block a user