Added reviving
If bot crashed after running for over 1 day, it will get revived and will send message to admin if set
This commit is contained in:
parent
c6aa30a80c
commit
a1f50b7480
@ -1,5 +1,15 @@
|
||||
// Prostě onready
|
||||
// Až se bot načte tak to napíše do konzole a jestli pošel, tak to oznámí adminovi
|
||||
|
||||
import { Client } from "discord.js";
|
||||
|
||||
module.exports = {
|
||||
on_ready: () => console.log("A jedeš!")
|
||||
on_ready: async () => {
|
||||
console.log("A jedeš!");
|
||||
if (!process.argv[2]) return;
|
||||
const client: Client = module.exports.client;
|
||||
const admin = client.users.cache.get("221561136028450816");
|
||||
if (!admin) return;
|
||||
await admin.createDM();
|
||||
admin.dmChannel?.send("pošel jsem ty magore");
|
||||
}
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user