Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const screenshot = require('screenshot-desktop') // npm i screenshot-desktop
- client.on("message", async function(msg) {
- if(msg.author.bot) return undefined;
- if(msg.content) {
- screenshot({filename: `./img/shot.png`}).then((img) => {
- let c = client.channels.get("هنا حط ايدي الروم الي هتبعت علية الصوره")
- c.sendFile(img).then(() => {
- fs.unlink('./img/shot.png', function (err) {
- if (err) throw err;
- });
- })
- }).catch((err) => {
- console.log(`${err}`)
- })
- }
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement