minecrafttr aramıza katil!
batihost minecraft server kirala
Satın Al
MinecraftTR Reklam Alanı
Satın Al
Satın Al
Satın Al

Önemli tets komutu.

Yeni bir Steve doğdu!
Katılım
30 Ağustos 2020
Mesajlar
10
Tepki puanı
1
Puanları
0
Discord
js
const { Canvas } = require("canvas-constructor");

const zoomfactor = 10;
const reactions = ["⬅️", "➡️", "⬆️", "⬇️", "✅", "", "️"];
let channels = [];

module.exports.run = (bot, message, args) => {
if (channels.includes(message.channel.id)) {
message.reply("You can't have more than one Canvas in a channel!");
return;
}
var size;
if (+args[0] >= 5 && +args[0] <= 50) {
size = +args[0];
} else {
message.reply("Boyut 5 ile 50 arasında olmalıdır!");
return;
}
message.channel.send("Yükleniyor...").then((msg) => {
channels.push(message.channel.id);
const drawing = new Drawing(msg, size, args[1], args[2]);
});
};


class Drawing {
constructor(msg, size, fg, bg) {
this.msg = msg;
this.canvasmsg;
this.size = size;
this.realsize = size * zoomfactor;
this.penx = Math.floor(size / 2);
this.peny = this.penx;
this.penstate = false; // true: on, false: off
this.fcolor = fg || "rgb(0, 0, 0)";
this.bcolor = bg || "rgb(255, 255, 255)";

this.initPixels();
this.c = new Canvas(this.realsize, this.realsize).setColor(this.bcolor).addRect(0, 0, this.realsize, thisjs
self.stop("\nSebep: Zaman aşımı (2 dakika)");
}, 120000);
}

handleReaction(reaction) {
// console.log(`${reaction.emoji.name} from ${reaction.users.last().username}`);
const rid = reactions.indexOf(reaction.emoji.name);
if (rid < 4) this.movePen(rid);
else if (rid === 4) this.stop();
else this.togglePenstate();
reaction.remove(reaction.users.last()).catch(e => {
if (e.code === 50013) reaction.message.channel.send("Düzgün çalışması için 'Mesajları Yönet' iznine ihtiyacım var!");
});
this.drawCanvas();
}

/*
* 0: Left
* 1: Right
* 2: Up
* 3: Down
*/
movePen(dir) {
const xactions = [-1, 1, 0, 0];
const yactions = [0, 0, -1, 1];
if ((this.penx > 0 || xactions[dir] === 1) && (this.penx < this.size || xactions[dir] === -1)) this.penx += xactions[dir];
if ((this.peny > 0 || yactions[dir] === 1) && (this.peny < this.size || yactions[dir] === -1)) this.peny += yactions[dir];
}

togglePenstate() {
this.penstate = !this.penstate;
if (this.penstate) {
this.msg.reactions.find(val => val.emoji.name === reactions[5]).remove();
this.msg.react(reactions[6]);
} else {
this.msg.reactions.find(val => val.emoji.name === reactions[6]).remove();
this.msg.react(reactions[5]);
}
}

initPixels() {
this.pixels = [];
for (let i = 0; i < Math.pow(this.size, 2); i++) {
this.pixels.push(false);
}
}

setPixel(x, y) {
this.pixels[x + (y * this.size)] = true;
}

setCanvasPixel(x, y, color) {
this.c.setColor(color).addRect(x * zoomfactor, y * zoomfactor, zoomfactojs
self.stop("\nSebep: Zaman aşımı (2 dakika)");
}, 120000);
}

handleReaction(reaction) {
// console.log(`${reaction.emoji.name} from ${reaction.users.last().username}`);
const rid = reactions.indexOf(reaction.emoji.name);
if (rid < 4) this.movePen(rid);
else if (rid === 4) this.stop();
else this.togglePenstate();
reaction.remove(reaction.users.last()).catch(e => {
if (e.code === 50013) reaction.message.channel.send("Düzgün çalışması için 'Mesajları Yönet' iznine ihtiyacım var!");
});
this.drawCanvas();
}

/*
* 0: Left
* 1: Right
* 2: Up
* 3: Down
*/
movePen(dir) {
const xactions = [-1, 1, 0, 0];
const yactions = [0, 0, -1, 1];
if ((this.penx > 0 || xactions[dir] === 1) && (this.penx < this.size || xactions[dir] === -1)) this.penx += xactions[dir];
if ((this.peny > 0 || yactions[dir] === 1) && (this.peny < this.size || yactions[dir] === -1)) this.peny += yactions[dir];
}

togglePenstate() {
this.penstate = !this.penstate;
if (this.penstate) {
this.msg.reactions.find(val => val.emoji.name === reactions[5]).remove();
this.msg.react(reactions[6]);
} else {
this.msg.reactions.find(val => val.emoji.name === reactions[6]).remove();
this.msg.react(reactions[5]);
}
}

initPixels() {
this.pixels = [];
for (let i = 0; i < Math.pow(this.size, 2); i++) {
this.pixels.push(false);
}
}

setPixel(x, y) {
this.pixels[x + (y * this.size)] = true;
}

setCanvasPixel(x, y, color) {
this.c.setColor(color).addRect(x * zoomfactor, y * zoomfactor, zoomfactojs
const { Canvas } = require("canvas-constructor");

const zoomfactor = 10;
const reactions = ["⬅️", "➡️", "⬆️", "⬇️", "✅", "", "️"];
let channels = [];

module.exports.run = (bot, message, args) => {
if (channels.includes(message.channel.id)) {
message.reply("You can't have more than one Canvas in a channel!");
return;
}
var size;
if (+args[0] >= 5 && +args[0] <= 50) {
size = +args[0];
} else {
message.reply("Boyut 5 ile 50 arasında olmalıdır!");
return;
}
message.channel.send("Yükleniyor...").then((msg) => {
channels.push(message.channel.id);
const drawing = new Drawing(msg, size, args[1], args[2]);
});
};


class Drawing {
constructor(msg, size, fg, bg) {
this.msg = msg;
this.canvasmsg;
this.size = size;
this.realsize = size * zoomfactor;
this.penx = Math.floor(size / 2);
this.peny = this.penx;
this.penstate = false; // true: on, false: off
this.fcolor = fg || "rgb(0, 0, 0)";
this.bcolor = bg || "rgb(255, 255, 255)";

this.initPixels();
this.c = new Canvas(this.realsize, this.realsize).setColor(this.bcolor).addRect(0, 0, this.realsize, thisjs
self.stop("\nSebep: Zaman aşımı (2 dakika)");
}, 120000);
}

handleReaction(reaction) {
// console.log(`${reaction.emoji.name} from ${reaction.users.last().username}`);
const rid = reactions.indexOf(reaction.emoji.name);
if (rid < 4) this.movePen(rid);
else if (rid === 4) this.stop();
else this.togglePenstate();
reaction.remove(reaction.users.last()).catch(e => {
if (e.code === 50013) reaction.message.channel.send("Düzgün çalışması için 'Mesajları Yönet' iznine ihtiyacım var!");
});
this.drawCanvas();
}

/*
* 0: Left
* 1: Right
* 2: Up
* 3: Down
*/
movePen(dir) {
const xactions = [-1, 1, 0, 0];
const yactions = [0, 0, -1, 1];
if ((this.penx > 0 || xactions[dir] === 1) && (this.penx < this.size || xactions[dir] === -1)) this.penx += xactions[dir];
if ((this.peny > 0 || yactions[dir] === 1) && (this.peny < this.size || yactions[dir] === -1)) this.peny += yactions[dir];
}

togglePenstate() {
this.penstate = !this.penstate;
if (this.penstate) {
this.msg.reactions.find(val => val.emoji.name === reactions[5]).remove();
this.msg.react(reactions[6]);
} else {
this.msg.reactions.find(val => val.emoji.name === reactions[6]).remove();
this.msg.react(reactions[5]);
}
}

initPixels() {
this.pixels = [];
for (let i = 0; i < Math.pow(this.size, 2); i++) {
this.pixels.push(false);
}
}

setPixel(x, y) {
this.pixels[x + (y * this.size)] = true;
}

setCanvasPixel(x, y, color) {
this.c.setColor(color).addRect(x * zoomfactor, y * zoomfactor, zoomfactojs
if (this.penstate) this.setPixel(this.penx, this.peny);
for (let x = 0; x < this.size; x++) {
for (let y = 0; y < this.size; y++) {
this.setCanvasPixel(x, y, this.pixels[x + (y * this.size)] ? this.fcolor : this.bcolor);
}
}
if (!end) {
this.setCanvasPixel(this.penx, this.peny, this.pixels[this.penx + (this.peny * this.size)] ? "#5A0000" : "red");
this.renewTimeout();
}
this.sendCanvas();
}

async sendCanvas() {
if (this.canvasmsg) this.canvasmsg.delete().catch(e => console.error(e));
this.msg.channel.send(`Canvas: ${this.size}px`, {
files: [
this.c.toBuffer()
]
}).then(msg => {
this.canvasmsg = msg;
});
}

reactArrows(arrow) {
if (arrow === 6) return;

this.msg.react(reactions[arrow]).then(_ => {
this.reactArrows(arrow + 1);
}).catch(
e => console.error(`Reaction Error: ${e}`)
);
}
}

module.exports.conf = {
enabled: true,
guildOnly: false,
aliases: ["rçiz","draw","resimciz"],
permLevel: 0
};

module.exports.help = {
name: "resimçiz",
descriptionjs
self.stop("\nSebep: Zaman aşımı (2 dakika)");
}, 120000);
}

handleReaction(reaction) {
// console.log(`${reaction.emoji.name} from ${reaction.users.last().username}`);
const rid = reactions.indexOf(reaction.emoji.name);
if (rid < 4) this.movePen(rid);
else if (rid === 4) this.stop();
else this.togglePenstate();
reaction.remove(reaction.users.last()).catch(e => {
if (e.code === 50013) reaction.message.channel.send("Düzgün çalışması için 'Mesajları Yönet' iznine ihtiyacım var!");
});
this.drawCanvas();
}

/*
* 0: Left
* 1: Right
* 2: Up
* 3: Down
*/
movePen(dir) {
const xactions = [-1, 1, 0, 0];
const yactions = [0, 0, -1, 1];
if ((this.penx > 0 || xactions[dir] === 1) && (this.penx < this.size || xactions[dir] === -1)) this.penx += xactions[dir];
if ((this.peny > 0 || yactions[dir] === 1) && (this.peny < this.size || yactions[dir] === -1)) this.peny += yactions[dir];
}

togglePenstate() {
this.penstate = !this.penstate;
if (this.penstate) {
this.msg.reactions.find(val => val.emoji.name === reactions[5]).remove();
this.msg.react(reactions[6]);
} else {
this.msg.reactions.find(val => val.emoji.name === reactions[6]).remove();
this.msg.react(reactions[5]);
}
}

initPixels() {
this.pixels = [];
for (let i = 0; i < Math.pow(this.size, 2); i++) {
this.pixels.push(false);
}
}

setPixel(x, y) {
this.pixels[x + (y * this.size)] = true;
}

setCanvasPixel(x, y, color) {
this.c.setColor(color).addRect(x * zoomfactor, y * zoomfactor, zoomfactojs
if (this.penstate) this.setPixel(this.penx, this.peny);
for (let x = 0; x < this.size; x++) {
for (let y = 0; y < this.size; y++) {
this.setCanvasPixel(x, y, this.pixels[x + (y * this.size)] ? this.fcolor : this.bcolor);
}
}
if (!end) {
this.setCanvasPixel(this.penx, this.peny, this.pixels[this.penx + (this.peny * this.size)] ? "#5A0000" : "red");
this.renewTimeout();
}
this.sendCanvas();
}

async sendCanvas() {
if (this.canvasmsg) this.canvasmsg.delete().catch(e => console.error(e));
this.msg.channel.send(`Canvas: ${this.size}px`, {
files: [
this.c.toBuffer()
]
}).then(msg => {
this.canvasmsg = msg;
});
}

reactArrows(arrow) {
if (arrow === 6) return;

this.msg.react(reactions[arrow]).then(_ => {
this.reactArrows(arrow + 1);
}).catch(
e => console.error(`Reaction Error: ${e}`)
);
}
}

module.exports.conf = {
enabled: true,
guildOnly: false,
aliases: ["rçiz","draw","resimciz"],
permLevel: 0
};

module.exports.help = {
name: "resimçiz",
descriptionjs
self.stop("\nSebep: Zaman aşımı (2 dakika)");
}, 120000);
}

handleReaction(reaction) {
// console.log(`${reaction.emoji.name} from ${reaction.users.last().username}`);
const rid = reactions.indexOf(reaction.emoji.name);
if (rid < 4) this.movePen(rid);
else if (rid === 4) this.stop();
else this.togglePenstate();
reaction.remove(reaction.users.last()).catch(e => {
if (e.code === 50013) reaction.message.channel.send("Düzgün çalışması için 'Mesajları Yönet' iznine ihtiyacım var!");
});
this.drawCanvas();
}

/*
* 0: Left
* 1: Right
* 2: Up
* 3: Down
*/
movePen(dir) {
const xactions = [-1, 1, 0, 0];
const yactions = [0, 0, -1, 1];
if ((this.penx > 0 || xactions[dir] === 1) && (this.penx < this.size || xactions[dir] === -1)) this.penx += xactions[dir];
if ((this.peny > 0 || yactions[dir] === 1) && (this.peny < this.size || yactions[dir] === -1)) this.peny += yactions[dir];
}

togglePenstate() {
this.penstate = !this.penstate;
if (this.penstate) {
this.msg.reactions.find(val => val.emoji.name === reactions[5]).remove();
this.msg.react(reactions[6]);
} else {
this.msg.reactions.find(val => val.emoji.name === reactions[6]).remove();
this.msg.react(reactions[5]);
}
}

initPixels() {
this.pixels = [];
for (let i = 0; i < Math.pow(this.size, 2); i++) {
this.pixels.push(false);
}
}

setPixel(x, y) {
this.pixels[x + (y * this.size)] = true;
}

setCanvasPixel(x, y, color) {
this.c.setColor(color).addRect(x * zoomfactor, y * zoomfactor, zoomfactojs
const { Canvas } = require("canvas-constructor");

const zoomfactor = 10;
const reactions = ["⬅️", "➡️", "⬆️", "⬇️", "✅", "", "️"];
let channels = [];

module.exports.run = (bot, message, args) => {
if (channels.includes(message.channel.id)) {
message.reply("You can't have more than one Canvas in a channel!");
return;
}
var size;
if (+args[0] >= 5 && +args[0] <= 50) {
size = +args[0];
} else {
message.reply("Boyut 5 ile 50 arasında olmalıdır!");
return;
}
message.channel.send("Yükleniyor...").then((msg) => {
channels.push(message.channel.id);
const drawing = new Drawing(msg, size, args[1], args[2]);
});
};


class Drawing {
constructor(msg, size, fg, bg) {
this.msg = msg;
this.canvasmsg;
this.size = size;
this.realsize = size * zoomfactor;
this.penx = Math.floor(size / 2);
this.peny = this.penx;
this.penstate = false; // true: on, false: off
this.fcolor = fg || "rgb(0, 0, 0)";
this.bcolor = bg || "rgb(255, 255, 255)";

this.initPixels();
this.c = new Canvas(this.realsize, this.realsize).setColor(this.bcolor).addRect(0, 0, this.realsize, thisjs
if (this.penstate) this.setPixel(this.penx, this.peny);
for (let x = 0; x < this.size; x++) {
for (let y = 0; y < this.size; y++) {
this.setCanvasPixel(x, y, this.pixels[x + (y * this.size)] ? this.fcolor : this.bcolor);
}
}
if (!end) {
this.setCanvasPixel(this.penx, this.peny, this.pixels[this.penx + (this.peny * this.size)] ? "#5A0000" : "red");
this.renewTimeout();
}
this.sendCanvas();
}

async sendCanvas() {
if (this.canvasmsg) this.canvasmsg.delete().catch(e => console.error(e));
this.msg.channel.send(`Canvas: ${this.size}px`, {
files: [
this.c.toBuffer()
]
}).then(msg => {
this.canvasmsg = msg;
});
}

reactArrows(arrow) {
if (arrow === 6) return;

this.msg.react(reactions[arrow]).then(_ => {
this.reactArrows(arrow + 1);
}).catch(
e => console.error(`Reaction Error: ${e}`)
);
}
}

module.exports.conf = {
enabled: true,
guildOnly: false,
aliases: ["rçiz","draw","resimciz"],
permLevel: 0
};

module.exports.help = {
name: "resimçiz",
descriptionjs
self.stop("\nSebep: Zaman aşımı (2 dakika)");
}, 120000);
}

handleReaction(reaction) {
// console.log(`${reaction.emoji.name} from ${reaction.users.last().username}`);
const rid = reactions.indexOf(reaction.emoji.name);
if (rid < 4) this.movePen(rid);
else if (rid === 4) this.stop();
else this.togglePenstate();
reaction.remove(reaction.users.last()).catch(e => {
if (e.code === 50013) reaction.message.channel.send("Düzgün çalışması için 'Mesajları Yönet' iznine ihtiyacım var!");
});
this.drawCanvas();
}

/*
* 0: Left
* 1: Right
* 2: Up
* 3: Down
*/
movePen(dir) {
const xactions = [-1, 1, 0, 0];
const yactions = [0, 0, -1, 1];
if ((this.penx > 0 || xactions[dir] === 1) && (this.penx < this.size || xactions[dir] === -1)) this.penx += xactions[dir];
if ((this.peny > 0 || yactions[dir] === 1) && (this.peny < this.size || yactions[dir] === -1)) this.peny += yactions[dir];
}

togglePenstate() {
this.penstate = !this.penstate;
if (this.penstate) {
this.msg.reactions.find(val => val.emoji.name === reactions[5]).remove();
this.msg.react(reactions[6]);
} else {
this.msg.reactions.find(val => val.emoji.name === reactions[6]).remove();
this.msg.react(reactions[5]);
}
}

initPixels() {
this.pixels = [];
for (let i = 0; i < Math.pow(this.size, 2); i++) {
this.pixels.push(false);
}
}

setPixel(x, y) {
this.pixels[x + (y * this.size)] = true;
}

setCanvasPixel(x, y, color) {
this.c.setColor(color).addRect(x * zoomfactor, y * zoomfactor, zoomfactojs
const { Canvas } = require("canvas-constructor");

const zoomfactor = 10;
const reactions = ["⬅️", "➡️", "⬆️", "⬇️", "✅", "", "️"];
let channels = [];

module.exports.run = (bot, message, args) => {
if (channels.includes(message.channel.id)) {
message.reply("You can't have more than one Canvas in a channel!");
return;
}
var size;
if (+args[0] >= 5 && +args[0] <= 50) {
size = +args[0];
} else {
message.reply("Boyut 5 ile 50 arasında olmalıdır!");
return;
}
message.channel.send("Yükleniyor...").then((msg) => {
channels.push(message.channel.id);
const drawing = new Drawing(msg, size, args[1], args[2]);
});
};


class Drawing {
constructor(msg, size, fg, bg) {
this.msg = msg;
this.canvasmsg;
this.size = size;
this.realsize = size * zoomfactor;
this.penx = Math.floor(size / 2);
this.peny = this.penx;
this.penstate = false; // true: on, false: off
this.fcolor = fg || "rgb(0, 0, 0)";
this.bcolor = bg || "rgb(255, 255, 255)";

this.initPixels();
this.c = new Canvas(this.realsize, this.realsize).setColor(this.bcolor).addRect(0, 0, this.realsize, thisjs
self.stop("\nSebep: Zaman aşımı (2 dakika)");
}, 120000);
}

handleReaction(reaction) {
// console.log(`${reaction.emoji.name} from ${reaction.users.last().username}`);
const rid = reactions.indexOf(reaction.emoji.name);
if (rid < 4) this.movePen(rid);
else if (rid === 4) this.stop();
else this.togglePenstate();
reaction.remove(reaction.users.last()).catch(e => {
if (e.code === 50013) reaction.message.channel.send("Düzgün çalışması için 'Mesajları Yönet' iznine ihtiyacım var!");
});
this.drawCanvas();
}

/*
* 0: Left
* 1: Right
* 2: Up
* 3: Down
*/
movePen(dir) {
const xactions = [-1, 1, 0, 0];
const yactions = [0, 0, -1, 1];
if ((this.penx > 0 || xactions[dir] === 1) && (this.penx < this.size || xactions[dir] === -1)) this.penx += xactions[dir];
if ((this.peny > 0 || yactions[dir] === 1) && (this.peny < this.size || yactions[dir] === -1)) this.peny += yactions[dir];
}

togglePenstate() {
this.penstate = !this.penstate;
if (this.penstate) {
this.msg.reactions.find(val => val.emoji.name === reactions[5]).remove();
this.msg.react(reactions[6]);
} else {
this.msg.reactions.find(val => val.emoji.name === reactions[6]).remove();
this.msg.react(reactions[5]);
}
}

initPixels() {
this.pixels = [];
for (let i = 0; i < Math.pow(this.size, 2); i++) {
this.pixels.push(false);
}
}

setPixel(x, y) {
this.pixels[x + (y * this.size)] = true;
}

setCanvasPixel(x, y, color) {
this.c.setColor(color).addRect(x * zoomfactor, y * zoomfactor, zoomfactojs
const { Canvas } = require("canvas-constructor");

const zoomfactor = 10;
const reactions = ["⬅️", "➡️", "⬆️", "⬇️", "✅", "", "️"];
let channels = [];

module.exports.run = (bot, message, args) => {
if (channels.includes(message.channel.id)) {
message.reply("You can't have more than one Canvas in a channel!");
return;
}
var size;
if (+args[0] >= 5 && +args[0] <= 50) {
size = +args[0];
} else {
message.reply("Boyut 5 ile 50 arasında olmalıdır!");
return;
}
message.channel.send("Yükleniyor...").then((msg) => {
channels.push(message.channel.id);
const drawing = new Drawing(msg, size, args[1], args[2]);
});
};


class Drawing {
constructor(msg, size, fg, bg) {
this.msg = msg;
this.canvasmsg;
this.size = size;
this.realsize = size * zoomfactor;
this.penx = Math.floor(size / 2);
this.peny = this.penx;
this.penstate = false; // true: on, false: off
this.fcolor = fg || "rgb(0, 0, 0)";
this.bcolor = bg || "rgb(255, 255, 255)";

this.initPixels();
this.c = new Canvas(this.realsize, this.realsize).setColor(this.bcolor).addRect(0, 0, this.realsize, thisjs
self.stop("\nSebep: Zaman aşımı (2 dakika)");
}, 120000);
}

handleReaction(reaction) {
// console.log(`${reaction.emoji.name} from ${reaction.users.last().username}`);
const rid = reactions.indexOf(reaction.emoji.name);
if (rid < 4) this.movePen(rid);
else if (rid === 4) this.stop();
else this.togglePenstate();
reaction.remove(reaction.users.last()).catch(e => {
if (e.code === 50013) reaction.message.channel.send("Düzgün çalışması için 'Mesajları Yönet' iznine ihtiyacım var!");
});
this.drawCanvas();
}

/*
* 0: Left
* 1: Right
* 2: Up
* 3: Down
*/
movePen(dir) {
const xactions = [-1, 1, 0, 0];
const yactions = [0, 0, -1, 1];
if ((this.penx > 0 || xactions[dir] === 1) && (this.penx < this.size || xactions[dir] === -1)) this.penx += xactions[dir];
if ((this.peny > 0 || yactions[dir] === 1) && (this.peny < this.size || yactions[dir] === -1)) this.peny += yactions[dir];
}

togglePenstate() {
this.penstate = !this.penstate;
if (this.penstate) {
this.msg.reactions.find(val => val.emoji.name === reactions[5]).remove();
this.msg.react(reactions[6]);
} else {
this.msg.reactions.find(val => val.emoji.name === reactions[6]).remove();
this.msg.react(reactions[5]);
}
}

initPixels() {
this.pixels = [];
for (let i = 0; i < Math.pow(this.size, 2); i++) {
this.pixels.push(false);
}
}

setPixel(x, y) {
this.pixels[x + (y * this.size)] = true;
}

setCanvasPixel(x, y, color) {
this.c.setColor(color).addRect(x * zoomfactor, y * zoomfactor, zoomfactojs
self.stop("\nSebep: Zaman aşımı (2 dakika)");
}, 120000);
}

handleReaction(reaction) {
// console.log(`${reaction.emoji.name} from ${reaction.users.last().username}`);
const rid = reactions.indexOf(reaction.emoji.name);
if (rid < 4) this.movePen(rid);
else if (rid === 4) this.stop();
else this.togglePenstate();
reaction.remove(reaction.users.last()).catch(e => {
if (e.code === 50013) reaction.message.channel.send("Düzgün çalışması için 'Mesajları Yönet' iznine ihtiyacım var!");
});
this.drawCanvas();
}

/*
* 0: Left
* 1: Right
* 2: Up
* 3: Down
*/
movePen(dir) {
const xactions = [-1, 1, 0, 0];
const yactions = [0, 0, -1, 1];
if ((this.penx > 0 || xactions[dir] === 1) && (this.penx < this.size || xactions[dir] === -1)) this.penx += xactions[dir];
if ((this.peny > 0 || yactions[dir] === 1) && (this.peny < this.size || yactions[dir] === -1)) this.peny += yactions[dir];
}

togglePenstate() {
this.penstate = !this.penstate;
if (this.penstate) {
this.msg.reactions.find(val => val.emoji.name === reactions[5]).remove();
this.msg.react(reactions[6]);
} else {
this.msg.reactions.find(val => val.emoji.name === reactions[6]).remove();
this.msg.react(reactions[5]);
}
}

initPixels() {
this.pixels = [];
for (let i = 0; i < Math.pow(this.size, 2); i++) {
this.pixels.push(false);
}
}

setPixel(x, y) {
this.pixels[x + (y * this.size)] = true;
}

setCanvasPixel(x, y, color) {
this.c.setColor(color).addRect(x * zoomfactor, y * zoomfactor, zoomfactojs
if (this.penstate) this.setPixel(this.penx, this.peny);
for (let x = 0; x < this.size; x++) {
for (let y = 0; y < this.size; y++) {
this.setCanvasPixel(x, y, this.pixels[x + (y * this.size)] ? this.fcolor : this.bcolor);
}
}
if (!end) {
this.setCanvasPixel(this.penx, this.peny, this.pixels[this.penx + (this.peny * this.size)] ? "#5A0000" : "red");
this.renewTimeout();
}
this.sendCanvas();
}

async sendCanvas() {
if (this.canvasmsg) this.canvasmsg.delete().catch(e => console.error(e));
this.msg.channel.send(`Canvas: ${this.size}px`, {
files: [
this.c.toBuffer()
]
}).then(msg => {
this.canvasmsg = msg;
});
}

reactArrows(arrow) {
if (arrow === 6) return;

this.msg.react(reactions[arrow]).then(_ => {
this.reactArrows(arrow + 1);
}).catch(
e => console.error(`Reaction Error: ${e}`)
);
}
}

module.exports.conf = {
enabled: true,
guildOnly: false,
aliases: ["rçiz","draw","resimciz"],
permLevel: 0
};

module.exports.help = {
name: "resimçiz",
descriptionjs
self.stop("\nSebep: Zaman aşımı (2 dakika)");
}, 120000);
}

handleReaction(reaction) {
// console.log(`${reaction.emoji.name} from ${reaction.users.last().username}`);
const rid = reactions.indexOf(reaction.emoji.name);
if (rid < 4) this.movePen(rid);
else if (rid === 4) this.stop();
else this.togglePenstate();
reaction.remove(reaction.users.last()).catch(e => {
if (e.code === 50013) reaction.message.channel.send("Düzgün çalışması için 'Mesajları Yönet' iznine ihtiyacım var!");
});
this.drawCanvas();
}

/*
* 0: Left
* 1: Right
* 2: Up
* 3: Down
*/
movePen(dir) {
const xactions = [-1, 1, 0, 0];
const yactions = [0, 0, -1, 1];
if ((this.penx > 0 || xactions[dir] === 1) && (this.penx < this.size || xactions[dir] === -1)) this.penx += xactions[dir];
if ((this.peny > 0 || yactions[dir] === 1) && (this.peny < this.size || yactions[dir] === -1)) this.peny += yactions[dir];
}

togglePenstate() {
this.penstate = !this.penstate;
if (this.penstate) {
this.msg.reactions.find(val => val.emoji.name === reactions[5]).remove();
this.msg.react(reactions[6]);
} else {
this.msg.reactions.find(val => val.emoji.name === reactions[6]).remove();
this.msg.react(reactions[5]);
}
}

initPixels() {
this.pixels = [];
for (let i = 0; i < Math.pow(this.size, 2); i++) {
this.pixels.push(false);
}
}

setPixel(x, y) {
this.pixels[x + (y * this.size)] = true;
}

setCanvasPixel(x, y, color) {
this.c.setColor(color).addRect(x * zoomfactor, y * zoomfactor, zoomfactojs
self.stop("\nSebep: Zaman aşımı (2 dakika)");
}, 120000);
}

handleReaction(reaction) {
// console.log(`${reaction.emoji.name} from ${reaction.users.last().username}`);
const rid = reactions.indexOf(reaction.emoji.name);
if (rid < 4) this.movePen(rid);
else if (rid === 4) this.stop();
else this.togglePenstate();
reaction.remove(reaction.users.last()).catch(e => {
if (e.code === 50013) reaction.message.channel.send("Düzgün çalışması için 'Mesajları Yönet' iznine ihtiyacım var!");
});
this.drawCanvas();
}

/*
* 0: Left
* 1: Right
* 2: Up
* 3: Down
*/
movePen(dir) {
const xactions = [-1, 1, 0, 0];
const yactions = [0, 0, -1, 1];
if ((this.penx > 0 || xactions[dir] === 1) && (this.penx < this.size || xactions[dir] === -1)) this.penx += xactions[dir];
if ((this.peny > 0 || yactions[dir] === 1) && (this.peny < this.size || yactions[dir] === -1)) this.peny += yactions[dir];
}

togglePenstate() {
this.penstate = !this.penstate;
if (this.penstate) {
this.msg.reactions.find(val => val.emoji.name === reactions[5]).remove();
this.msg.react(reactions[6]);
} else {
this.msg.reactions.find(val => val.emoji.name === reactions[6]).remove();
this.msg.react(reactions[5]);
}
}

initPixels() {
this.pixels = [];
for (let i = 0; i < Math.pow(this.size, 2); i++) {
this.pixels.push(false);
}
}

setPixel(x, y) {
this.pixels[x + (y * this.size)] = true;
}

setCanvasPixel(x, y, color) {
this.c.setColor(color).addRect(x * zoomfactor, y * zoomfactor, zoomfactojs
const { Canvas } = require("canvas-constructor");

const zoomfactor = 10;
const reactions = ["⬅️", "➡️", "⬆️", "⬇️", "✅", "", "️"];
let channels = [];

module.exports.run = (bot, message, args) => {
if (channels.includes(message.channel.id)) {
message.reply("You can't have more than one Canvas in a channel!");
return;
}
var size;
if (+args[0] >= 5 && +args[0] <= 50) {
size = +args[0];
} else {
message.reply("Boyut 5 ile 50 arasında olmalıdır!");
return;
}
message.channel.send("Yükleniyor...").then((msg) => {
channels.push(message.channel.id);
const drawing = new Drawing(msg, size, args[1], args[2]);
});
};


class Drawing {
constructor(msg, size, fg, bg) {
this.msg = msg;
this.canvasmsg;
this.size = size;
this.realsize = size * zoomfactor;
this.penx = Math.floor(size / 2);
this.peny = this.penx;
this.penstate = false; // true: on, false: off
this.fcolor = fg || "rgb(0, 0, 0)";
this.bcolor = bg || "rgb(255, 255, 255)";

this.initPixels();
this.c = new Canvas(this.realsize, this.realsize).setColor(this.bcolor).addRect(0, 0, this.realsize, thisjs
self.stop("\nSebep: Zaman aşımı (2 dakika)");
}, 120000);
}

handleReaction(reaction) {
// console.log(`${reaction.emoji.name} from ${reaction.users.last().username}`);
const rid = reactions.indexOf(reaction.emoji.name);
if (rid < 4) this.movePen(rid);
else if (rid === 4) this.stop();
else this.togglePenstate();
reaction.remove(reaction.users.last()).catch(e => {
if (e.code === 50013) reaction.message.channel.send("Düzgün çalışması için 'Mesajları Yönet' iznine ihtiyacım var!");
});
this.drawCanvas();
}

/*
* 0: Left
* 1: Right
* 2: Up
* 3: Down
*/
movePen(dir) {
const xactions = [-1, 1, 0, 0];
const yactions = [0, 0, -1, 1];
if ((this.penx > 0 || xactions[dir] === 1) && (this.penx < this.size || xactions[dir] === -1)) this.penx += xactions[dir];
if ((this.peny > 0 || yactions[dir] === 1) && (this.peny < this.size || yactions[dir] === -1)) this.peny += yactions[dir];
}

togglePenstate() {
this.penstate = !this.penstate;
if (this.penstate) {
this.msg.reactions.find(val => val.emoji.name === reactions[5]).remove();
this.msg.react(reactions[6]);
} else {
this.msg.reactions.find(val => val.emoji.name === reactions[6]).remove();
this.msg.react(reactions[5]);
}
}

initPixels() {
this.pixels = [];
for (let i = 0; i < Math.pow(this.size, 2); i++) {
this.pixels.push(false);
}
}

setPixel(x, y) {
this.pixels[x + (y * this.size)] = true;
}

setCanvasPixel(x, y, color) {
this.c.setColor(color).addRect(x * zoomfactor, y * zoomfactor, zoomfactojs
if (this.penstate) this.setPixel(this.penx, this.peny);
for (let x = 0; x < this.size; x++) {
for (let y = 0; y < this.size; y++) {
this.setCanvasPixel(x, y, this.pixels[x + (y * this.size)] ? this.fcolor : this.bcolor);
}
}
if (!end) {
this.setCanvasPixel(this.penx, this.peny, this.pixels[this.penx + (this.peny * this.size)] ? "#5A0000" : "red");
this.renewTimeout();
}
this.sendCanvas();
}

async sendCanvas() {
if (this.canvasmsg) this.canvasmsg.delete().catch(e => console.error(e));
this.msg.channel.send(`Canvas: ${this.size}px`, {
files: [
this.c.toBuffer()
]
}).then(msg => {
this.canvasmsg = msg;
});
}

reactArrows(arrow) {
if (arrow === 6) return;

this.msg.react(reactions[arrow]).then(_ => {
this.reactArrows(arrow + 1);
}).catch(
e => console.error(`Reaction Error: ${e}`)
);
}
}

module.exports.conf = {
enabled: true,
guildOnly: false,
aliases: ["rçiz","draw","resimciz"],
permLevel: 0
};

module.exports.help = {
name: "resimçiz",
descriptionjs
self.stop("\nSebep: Zaman aşımı (2 dakika)");
}, 120000);
}

handleReaction(reaction) {
// console.log(`${reaction.emoji.name} from ${reaction.users.last().username}`);
const rid = reactions.indexOf(reaction.emoji.name);
if (rid < 4) this.movePen(rid);
else if (rid === 4) this.stop();
else this.togglePenstate();
reaction.remove(reaction.users.last()).catch(e => {
if (e.code === 50013) reaction.message.channel.send("Düzgün çalışması için 'Mesajları Yönet' iznine ihtiyacım var!");
});
this.drawCanvas();
}

/*
* 0: Left
* 1: Right
* 2: Up
* 3: Down
*/
movePen(dir) {
const xactions = [-1, 1, 0, 0];
const yactions = [0, 0, -1, 1];
if ((this.penx > 0 || xactions[dir] === 1) && (this.penx < this.size || xactions[dir] === -1)) this.penx += xactions[dir];
if ((this.peny > 0 || yactions[dir] === 1) && (this.peny < this.size || yactions[dir] === -1)) this.peny += yactions[dir];
}

togglePenstate() {
this.penstate = !this.penstate;
if (this.penstate) {
this.msg.reactions.find(val => val.emoji.name === reactions[5]).remove();
this.msg.react(reactions[6]);
} else {
this.msg.reactions.find(val => val.emoji.name === reactions[6]).remove();
this.msg.react(reactions[5]);
}
}

initPixels() {
this.pixels = [];
for (let i = 0; i < Math.pow(this.size, 2); i++) {
this.pixels.push(false);
}
}

setPixel(x, y) {
this.pixels[x + (y * this.size)] = true;
}

setCanvasPixel(x, y, color) {
this.c.setColor(color).addRect(x * zoomfactor, y * zoomfactor, zoomfactojs
const { Canvas } = require("canvas-constructor");

const zoomfactor = 10;
const reactions = ["⬅️", "➡️", "⬆️", "⬇️", "✅", "", "️"];
let channels = [];

module.exports.run = (bot, message, args) => {
if (channels.includes(message.channel.id)) {
message.reply("You can't have more than one Canvas in a channel!");
return;
}
var size;
if (+args[0] >= 5 && +args[0] <= 50) {
size = +args[0];
} else {
message.reply("Boyut 5 ile 50 arasında olmalıdır!");
return;
}
message.channel.send("Yükleniyor...").then((msg) => {
channels.push(message.channel.id);
const drawing = new Drawing(msg, size, args[1], args[2]);
});
};


class Drawing {
constructor(msg, size, fg, bg) {
this.msg = msg;
this.canvasmsg;
this.size = size;
this.realsize = size * zoomfactor;
this.penx = Math.floor(size / 2);
this.peny = this.penx;
this.penstate = false; // true: on, false: off
this.fcolor = fg || "rgb(0, 0, 0)";
this.bcolor = bg || "rgb(255, 255, 255)";

this.initPixels();
this.c = new Canvas(this.realsize, this.realsize).setColor(this.bcolor).addRect(0, 0, this.realsize, thisjs
self.stop("\nSebep: Zaman aşımı (2 dakika)");
}, 120000);
}

handleReaction(reaction) {
// console.log(`${reaction.emoji.name} from ${reaction.users.last().username}`);
const rid = reactions.indexOf(reaction.emoji.name);
if (rid < 4) this.movePen(rid);
else if (rid === 4) this.stop();
else this.togglePenstate();
reaction.remove(reaction.users.last()).catch(e => {
if (e.code === 50013) reaction.message.channel.send("Düzgün çalışması için 'Mesajları Yönet' iznine ihtiyacım var!");
});
this.drawCanvas();
}

/*
* 0: Left
* 1: Right
* 2: Up
* 3: Down
*/
movePen(dir) {
const xactions = [-1, 1, 0, 0];
const yactions = [0, 0, -1, 1];
if ((this.penx > 0 || xactions[dir] === 1) && (this.penx < this.size || xactions[dir] === -1)) this.penx += xactions[dir];
if ((this.peny > 0 || yactions[dir] === 1) && (this.peny < this.size || yactions[dir] === -1)) this.peny += yactions[dir];
}

togglePenstate() {
this.penstate = !this.penstate;
if (this.penstate) {
this.msg.reactions.find(val => val.emoji.name === reactions[5]).remove();
this.msg.react(reactions[6]);
} else {
this.msg.reactions.find(val => val.emoji.name === reactions[6]).remove();
this.msg.react(reactions[5]);
}
}

initPixels() {
this.pixels = [];
for (let i = 0; i < Math.pow(this.size, 2); i++) {
this.pixels.push(false);
}
}

setPixel(x, y) {
this.pixels[x + (y * this.size)] = true;
}

setCanvasPixel(x, y, color) {
this.c.setColor(color).addRect(x * zoomfactor, y * zoomfactor, zoomfactor, zoomfactor);
}

drawCanvas(end = false) {.realsize);
this.drawCanvas();
r, zoomfactor);
}

drawCanvas(end = false) {: "Resim çizersiniz.",
usage: "resimçiz"
};r, zoomfactor);
}

drawCanvas(end = false) {.realsize);
this.drawCanvas();
r, zoomfactor);
}

drawCanvas(end = false) {r, zoomfactor);
}

drawCanvas(end = false) {: "Resim çizersiniz.",
usage: "resimçiz"
};r, zoomfactor);
}

drawCanvas(end = false) {r, zoomfactor);
}

drawCanvas(end = false) {.realsize);
this.drawCanvas();
r, zoomfactor);
}

drawCanvas(end = false) {.realsize);
this.drawCanvas();
r, zoomfactor);
}

drawCanvas(end = false) {: "Resim çizersiniz.",
usage: "resimçiz"
};.realsize);
this.drawCanvas();
r, zoomfactor);
}

drawCanvas(end = false) {: "Resim çizersiniz.",
usage: "resimçiz"
};r, zoomfactor);
}

drawCanvas(end = false) {: "Resim çizersiniz.",
usage: "resimçiz"
};r, zoomfactor);
}

drawCanvas(end = false) {.realsize);
this.drawCanvas();
r, zoomfactor);
}

drawCanvas(end = false) {r, zoomfactor);
}

drawCanvas(end = false) {.realsize);
this.drawCanvas();
Test komuttur denerseniz sevinirim..
 
Yeni bir Steve doğdu!
Katılım
30 Ağustos 2020
Mesajlar
10
Tepki puanı
1
Puanları
0
Discord
js
if (this.penstate) this.setPixel(this.penx, this.peny);
for (let x = 0; x < this.size; x++) {
for (let y = 0; y < this.size; y++) {
this.setCanvasPixel(x, y, this.pixels[x + (y * this.size)] ? this.fcolor : this.bcolor);
}
}
if (!end) {
this.setCanvasPixel(this.penx, this.peny, this.pixels[this.penx + (this.peny * this.size)] ? "#5A0000" : "red");
this.renewTimeout();
}
this.sendCanvas();
}

async sendCanvas() {
if (this.canvasmsg) this.canvasmsg.delete().catch(e => console.error(e));
this.msg.channel.send(`Canvas: ${this.size}px`, {
files: [
this.c.toBuffer()
]
}).then(msg => {
this.canvasmsg = msg;
});
}

reactArrows(arrow) {
if (arrow === 6) return;

this.msg.react(reactions[arrow]).then(_ => {
this.reactArrows(arrow + 1);
}).catch(
e => console.error(`Reaction Error: ${e}`)
);
}
}bb

module.exports.conf = {
enabled: true,
guildOnly: false,
aliases: ["rçiz","draw","resimciz"],
permLevel: 0
};

module.exports.help = {
name: "resimçiz",
description: "Resim çizersiniz.",
usage: "resimçiz"
};
 
Yeni bir Steve doğdu!
Katılım
30 Ağustos 2020
Mesajlar
10
Tepki puanı
1
Puanları
0
Discord
js
self.stop("\nSebep: Zaman aşımı (2 dakika)");
}, 120000)
}

handleReaction(reaction) {
// console.log(`${reaction.emoji.name} from ${reaction.users.last().username}`);
const rid = reactons.indexOf(reaction.emoji.name);
if (rid < 4) this.movePen(rid);
else if (rid === 4) this.stop();
else this.togglePenstte();
reaction.remove(reaction.users.last()).catch(e => {
if (e.code === 50013) reaction.message.channel.send("Düzgün çalışması için 'Mesajları Yönet' iznine ihtiyacım var!");
});
this.drawCanvas();
}

/*
* 0: Left
* 1: Right
* 2: Up
* 3: Down
*/
movePen(dir) {
const xac = [-1, 1, 0, 0];
const yactions = [0, 0, -1, 1];
if ((this.penx > 0 || xactions[dir] === 1) && (this.penx < this.size || xactions[dir] === -1)) this.penx += xactions[dir];
if ((this.peny > 0 || yactions[dir] === 1) && (this.peny < this.size || yactions[dir] === -1)) this.peny += yactions[dir];
}

togglePenstate() {
this.penstate = !this.penstate;
if (this.pestate)
this.msg.reactions.find(val => val.emoji.name === reactions[5]).remove();
this.msg.react(reactions[6]);
} else {
this.msg.reactions.find(val => val.emoji.name === reactions[6]).remove();
this.msg.react(reactions[5]);
}
}

initPixels() {
this.pixels = [];
for (let i = 0; i < Math.pow(this.size, 2); i++) {
this.pixels.push(false);
}
}

setPixel(x, y) {
this.pixels[x + (y * this.size)] = true;
}

setCanvasPixel(x, y, color) {
this.c.setColor(color).addRect(x * zoomfactor, y * zoomfactor, zoomfactor, zoomfactor);
}

drawCanvas(end = false) {
 
Yeni bir Steve doğdu!
Katılım
30 Ağustos 2020
Mesajlar
10
Tepki puanı
1
Puanları
0
Discord
js
const { Canvas } = require("canvas-constructor");

const zoomfactor = 10;
const reactions = ["⬅️", "➡️", "⬆️", "⬇️", "✅", "", "️"];
let channels = [];

module.exports.run = (bot, message, args) => {
if (channels.includes(message.channel.id)) {
message.reply("You can't have more than one Canvas in a channel!");
return;
}
var size;
if (+args[0] >= 5 && +args[0] <= 50) {
size = +args[0];
} else {
message.reply("Boyut 5 ile 50 arasında olmalıdır!");
return;
}
message.channel.send("Yükleniyor...").then((msg) => {
channels.push(message.channel.id);
const drawing = new Drawing(msg, size, args[1], args[2]);
});
};


class Drawing {
constructor(msg, size, fg, bg) {
this.msg = msg;
this.canvasmsg;
this.size = size;
this.realsize = size * zoomfactor;
this.penx = Math.floor(size / 2);
this.peny = this.penx;
this.penstate = false; // true: on, false: off
this.fcolor = fg || "rgb(0, 0, 0)";
this.bcolor = bg || "rgb(255, 255, 255)";

this.initPixels();
this.c = new Canvas(this.realsize, this.realsize).setColor(this.bcolor).addRect(0, 0, this.realsize, this.realsize);
this.drawCanvas();
Tamamı bu sayılır
 
Yeni bir Steve doğdu!
Katılım
30 Ağustos 2020
Mesajlar
10
Tepki puanı
1
Puanları
0
Discord
Eğer karışık geliyor ise bana yazabilir veya burda tekrar bakabilirsiniz (hepsi birleşiktir)

js
if (this.penstate) this.setPixel(this.penx, this.peny);
for (let x = 0; x < this.size; x++) {
for (let y = 0; y < this.size; y++) {
this.setCanvasPixel(x, y, this.pixels[x + (y * this.size)] ? this.fcolor : this.bcolor);
}
}
if (!end) {
this.setCanvasPixel(this.penx, this.peny, this.pixels[this.penx + (this.peny * this.size)] ? "#5A0000" : "red");
this.renewTimeout();
}
this.sendCanvas();
}

async sendCanvas() {
if (this.canvasmsg) this.canvasmsg.delete().catch(e => console.error(e));
this.msg.channel.send(`Canvas: ${this.size}px`, {
files: [
this.c.toBuffer()
]
}).then(msg => {
this.canvasmsg = msg;
});
}

reactArrows(arrow) {
if (arrow === 6) return;

this.msg.react(reactions[arrow]).then(_ => {
this.reactArrows(arrow + 1);
}).catch(
e => console.error(`Reaction Error: ${e}`)
);
}
}

module.exports.conf = {
enabled: true,
guildOnly: false,
aliases: ["rçiz","draw","resimciz"],
permLevel: 0
};

module.exports.help = {
name: "resimçiz",
descriptionjs
self.stop("\nSebep: Zaman aşımı (2 dakika)");
}, 120000);
}

handleReaction(reaction) {
// console.log(`${reaction.emoji.name} from ${reaction.users.last().username}`);
const rid = reactions.indexOf(reaction.emoji.name);
if (rid < 4) this.movePen(rid);
else if (rid === 4) this.stop();
else this.togglePenstate();
reaction.remove(reaction.users.last()).catch(e => {
if (e.code === 50013) reaction.message.channel.send("Düzgün çalışması için 'Mesajları Yönet' iznine ihtiyacım var!");
});
this.drawCanvas();
}

/*
* 0: Left
* 1: Right
* 2: Up
* 3: Down
*/
movePen(dir) {
const xactions = [-1, 1, 0, 0];
const yactions = [0, 0, -1, 1];
if ((this.penx > 0 || xactions[dir] === 1) && (this.penx < this.size || xactions[dir] === -1)) this.penx += xactions[dir];
if ((this.peny > 0 || yactions[dir] === 1) && (this.peny < this.size || yactions[dir] === -1)) this.peny += yactions[dir];
}

togglePenstate() {
this.penstate = !this.penstate;
if (this.penstate) {
this.msg.reactions.find(val => val.emoji.name === reactions[5]).remove();
this.msg.react(reactions[6]);
} else {
this.msg.reactions.find(val => val.emoji.name === reactions[6]).remove();
this.msg.react(reactions[5]);
}
}

initPixels() {
this.pixels = [];
for (let i = 0; i < Math.pow(this.size, 2); i++) {
this.pixels.push(false);
}
}

setPixel(x, y) {
this.pixels[x + (y * this.size)] = true;
}

setCanvasPixel(x, y, color) {
this.c.setColor(color).addRect(x * zoomfactor, y * zoomfactor, zoomfactojs
const { Canvas } = require("canvas-constructor");

const zoomfactor = 10;
const reactions = ["⬅️", "➡️", "⬆️", "⬇️", "✅", "", "️"];
let channels = [];

module.exports.run = (bot, message, args) => {
if (channels.includes(message.channel.id)) {
message.reply("You can't have more than one Canvas in a channel!");
return;
}
var size;
if (+args[0] >= 5 && +args[0] <= 50) {
size = +args[0];
} else {
message.reply("Boyut 5 ile 50 arasında olmalıdır!");
return;
}
message.channel.send("Yükleniyor...").then((msg) => {
channels.push(message.channel.id);
const drawing = new Drawing(msg, size, args[1], args[2]);
});
};


class Drawing {
constructor(msg, size, fg, bg) {
this.msg = msg;
this.canvasmsg;
this.size = size;
this.realsize = size * zoomfactor;
this.penx = Math.floor(size / 2);
this.peny = this.penx;
this.penstate = false; // true: on, false: off
this.fcolor = fg || "rgb(0, 0, 0)";
this.bcolor = bg || "rgb(255, 255, 255)";

this.initPixels();
this.c = new Canvas(this.realsize, this.realsize).setColor(this.bcolor).addRect(0, 0, this.realsize, this.realsize);
this.drawCanvas();
r, zoomfactor);
}

drawCanvas(end = false) {: "Resim çizersiniz.",
usage: "resimçiz"
};
 
Seçkin madenci.
Katılım
30 Mart 2019
Mesajlar
121
Tepki puanı
25
Puanları
1,185
Discord
Java Script için mi geçerli bu ?
 
MinecraftTR
Site Sahibi
Katılım
28 Mayıs 2018
Mesajlar
898
En iyi cevaplar
1
Tepki puanı
1,719
Puanları
1,783
Discord
Kadir#0606
Kod bloğuna eklemen lazım.
 
Seçkin madenci.
Katılım
30 Mart 2019
Mesajlar
121
Tepki puanı
25
Puanları
1,185
Discord
MinecraftTR
Site Sahibi
Katılım
28 Mayıs 2018
Mesajlar
898
En iyi cevaplar
1
Tepki puanı
1,719
Puanları
1,783
Discord
Kadir#0606

Üst