Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

218
Views
Banner Changer is not working. How to solve?

I want to make bot which is changing banner, but this code is not working. Who can help?

        if (updateBanner == true) {
            var userCount = client.guilds.cache.get('866048794272595999').memberCount;
            var canvas = Canvas.createCanvas(960, 540);
            var ctx = canvas.getContext('2d');

            var Image = Canvas.Image;
            var img = new Image();
            img.src = 'dm.png';

            ctx.clearRect(0, 0, canvas.width, canvas.height);
            ctx.drawImage(img, 0, 0, canvas.width, canvas.height);
            ctx.fillStyle = 'white';
            ctx.textAlign = 'center';
            ctx.font = '40pt Acrom Light';
            ctx.fillText(userCount, 500, 500)
            canvas.createPNGStream().pipe(fs.createWriteStream(path.join(__dirname, 'font.png')))
            client.guilds.cache.get('866048794272595999').setBanner("font.png");
            console.log(`Загрузка изображения`);
            updateBanner = false;
        } else console.log('Обновление не требуется!');
    }, 600000);```

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!