Фиксы

This commit is contained in:
JonnyBro 2022-02-25 00:56:32 +05:00
parent 049d65b935
commit f96f9ba7e8
42 changed files with 97 additions and 82 deletions

View file

@ -33,6 +33,7 @@ class Divorce extends Command {
message.success("economy/divorce:DIVORCED", {
username: user.username
});
user.send({
content: message.translate("economy/divorce:DIVORCED_U", {
username: message.author.username

View file

@ -25,7 +25,7 @@ class Ascii extends Command {
const rendered = await figletAsync(text);
message.channel.send({
message.reply({
content: "```" + rendered + "```"
});
}

View file

@ -20,7 +20,7 @@ class Lmg extends Command {
const question = args.join(" ");
if (!question) return message.error("fun/lmg:MISSING");
const encodedQuestion = question.replace(/[' '_]/g, "+");
await message.channel.send({
await message.reply({
content: `https://google.gik-team.com/?q=${encodedQuestion}`
});
message.delete().catch(() => {});

View file

@ -41,7 +41,7 @@ class Permissions extends Command {
});
text += `\n${total.allowed} ✅ | ${total.denied}`;
message.channel.send({
message.reply({
content: text
});
}

View file

@ -18,7 +18,7 @@ class Report extends Command {
}
async run(message, args, data) {
if (message.author.id === "285109105717280768") return message.channel.send({ content: "Пошёл нахуй фахон" });
if (message.author.id === "285109105717280768") return message.reply({ content: "Пошёл нахуй фахон" });
const repChannel = message.guild.channels.cache.get(data.guild.plugins.reports);
if (!repChannel) return message.error("general/report:MISSING_CHANNEL");

View file

@ -18,7 +18,7 @@ class Suggest extends Command {
}
async run(message, args, data) {
if (message.author.id === "285109105717280768") return message.channel.send({ content: "Пошёл нахуй фахон" });
if (message.author.id === "285109105717280768") return message.reply({ content: "Пошёл нахуй фахон" });
const suggChannel = message.guild.channels.cache.get(data.guild.plugins.suggestions);
if (!suggChannel) return message.error("general/suggest:MISSING_CHANNEL");

View file

@ -29,7 +29,7 @@ class Approved extends Command {
});
m.delete();
message.channel.send({
message.reply({
files: [{
name: "approved.png",
attachment: buffer

View file

@ -24,9 +24,9 @@ class Avatar extends Command {
size: 512
});
if (args[0] === "link") return message.channel.send({ content: `<${avatarURL}>` });
if (args[0] === "link") return message.reply({ content: `<${avatarURL}>` });
message.channel.send({
message.reply({
files: [{
attachment: avatarURL
}]

View file

@ -36,7 +36,7 @@ class BatSlap extends Command {
});
m.delete();
message.channel.send({
message.reply({
files: [{
name: "batslap.png",
attachment: buffer

View file

@ -29,7 +29,7 @@ class Beautiful extends Command {
});
m.delete();
message.channel.send({
message.reply({
files: [{
name: "beautiful.png",
attachment: buffer

View file

@ -34,7 +34,7 @@ class Bed extends Command {
}));
m.delete();
message.channel.send({
message.reply({
files: [{
name: "bed.png",
attachment: buffer

View file

@ -29,7 +29,7 @@ class Brazzers extends Command {
});
m.delete();
message.channel.send({
message.reply({
files: [{
name: "brazzers.png",
attachment: buffer

View file

@ -29,7 +29,7 @@ class Burn extends Command {
});
m.delete();
message.channel.send({
message.reply({
files: [{
name: "burn.png",
attachment: buffer

View file

@ -27,7 +27,7 @@ class Captcha extends Command {
const json = await res.json();
m.delete();
message.channel.send({
message.reply({
files: [{
name: "captcha.png",
attachment: json.message

View file

@ -29,7 +29,7 @@ class Challenger extends Command {
});
m.delete();
message.channel.send({
message.reply({
files: [{
name: "challenger.png",
attachment: buffer

View file

@ -28,7 +28,7 @@ class Clyde extends Command {
try {
const res = await fetch(encodeURI(`https://nekobot.xyz/api/imagegen?type=clyde&text=${text}`));
const json = await res.json();
message.channel.send({
message.reply({
files: [{
name: "clyde.png",
attachment: json.message

View file

@ -29,7 +29,7 @@ class Crush extends Command {
});
m.delete();
message.channel.send({
message.reply({
files: [{
name: "crush.png",
attachment: buffer

View file

@ -29,7 +29,7 @@ class Dictator extends Command {
});
m.delete();
message.channel.send({
message.reply({
files: [{
name: "dictator.png",
attachment: buffer

View file

@ -43,7 +43,7 @@ class Facepalm extends Command {
m.delete();
message.channel.send({
message.reply({
files: [{
name: "facepalm.png",
attachment: canvas.toBuffer()

View file

@ -29,7 +29,7 @@ class Fire extends Command {
});
m.delete();
message.channel.send({
message.reply({
files: [{
name: "fire.png",
attachment: buffer

View file

@ -29,7 +29,7 @@ class Jail extends Command {
});
m.delete();
message.channel.send({
message.reply({
files: [{
name: "jail.png",
attachment: buffer

View file

@ -29,7 +29,7 @@ class Love extends Command {
try {
const res = await fetch(encodeURI(`https://nekobot.xyz/api/imagegen?type=ship&user1=${users[0].displayAvatarURL({ format: "png", size: 512 })}&user2=${users[1].displayAvatarURL({ format: "png", size: 512 })}`));
const json = await res.json();
message.channel.send({
message.reply({
files: [{
name: "love.png",
attachment: json.message

View file

@ -29,7 +29,7 @@ class Magik extends Command {
});
m.delete();
message.channel.send({
message.reply({
files: [{
name: "magik.png",
attachment: buffer

View file

@ -29,7 +29,7 @@ class Mission extends Command {
});
m.delete();
message.channel.send({
message.reply({
files: [{
name: "mission.png",
attachment: buffer

View file

@ -40,7 +40,7 @@ class Phcomment extends Command {
});
m.delete();
message.channel.send({
message.reply({
files: [{
name: "phcomment.png",
attachment: buffer

View file

@ -29,7 +29,7 @@ class Ps4 extends Command {
});
m.delete();
message.channel.send({
message.reply({
files: [{
name: "ps4.png",
attachment: buffer

View file

@ -29,7 +29,7 @@ class Rip extends Command {
});
m.delete();
message.channel.send({
message.reply({
files: [{
name: "rip.png",
attachment: buffer

View file

@ -29,7 +29,7 @@ class Scary extends Command {
});
m.delete();
message.channel.send({
message.reply({
files: [{
name: "scary.png",
attachment: buffer

View file

@ -33,7 +33,7 @@ class SteamCard extends Command {
});
m.delete();
message.channel.send({
message.reply({
files: [{
name: "steamcard.png",
attachment: buffer

View file

@ -29,7 +29,7 @@ class Tobecontinued extends Command {
});
m.delete();
message.channel.send({
message.reply({
files: [{
name: "tobecontinued.png",
attachment: buffer

View file

@ -28,7 +28,7 @@ class Trash extends Command {
}));
m.delete();
message.channel.send({
message.reply({
files: [{
name: "trash.png",
attachment: buffer

View file

@ -29,7 +29,7 @@ class Triggered extends Command {
});
m.delete();
message.channel.send({
message.reply({
files: [{
name: "triggered.gif",
attachment: buffer

View file

@ -29,7 +29,7 @@ class Wanted extends Command {
});
m.delete();
message.channel.send({
message.reply({
files: [{
name: "wanted.png",
attachment: buffer

View file

@ -29,7 +29,7 @@ class Wasted extends Command {
});
m.delete();
message.channel.send({
message.reply({
files: [{
name: "wasted.png",
attachment: buffer

View file

@ -38,7 +38,7 @@ class Ytcomment extends Command {
});
m.delete();
message.channel.send({
message.reply({
files: [{
name: "ytcomment.png",
attachment: image

View file

@ -23,7 +23,7 @@ class Announcement extends Command {
if (text.length > 1030) return message.error("moderation/announcement:TOO_LONG");
let mention = null;
const msg = await message.channel.send(message.translate("moderation/announcement:MENTION_PROMPT"));
const msg = await message.sendT("moderation/announcement:MENTION_PROMPT");
const filter = m => m.author.id === message.author.id;
const collector = new Discord.MessageCollector(message.channel, {

View file

@ -58,12 +58,14 @@ class Ban extends Command {
reason
}).then(() => {
// Send a success message in the current channel
message.channel.send(message.translate("moderation/ban:BANNED", {
message.reply({
content: message.translate("moderation/ban:BANNED", {
username: user.tag,
server: message.guild.name,
moderator: message.author.tag,
reason
}));
})
});
const caseInfo = {
channel: message.channel.id,

View file

@ -37,22 +37,26 @@ class Kick extends Command {
if (message.member.ownerId !== message.author.id && !(moderationPosition > memberPosition)) return message.error("moderation/ban:SUPERIOR");
if (!member.kickable) return message.error("moderation/kick:MISSING_PERM");
await member.send(message.translate("moderation/kick:KICKED_DM", {
await member.send({
content: message.translate("moderation/kick:KICKED_DM", {
username: member.user.tag,
server: message.guild.name,
moderator: message.author.tag,
reason
})).catch(() => {});
})
});
// Kick the user
member.kick(reason).then(() => {
// Send a success message in the current channel
message.channel.send(message.translate("moderation/kick:KICKED", {
message.reply({
content: message.translate("moderation/kick:KICKED", {
username: member.user.tag,
server: message.guild.name,
moderator: message.author.tag,
reason
}));
})
});
data.guild.casesCount++;
data.guild.save();

View file

@ -45,13 +45,15 @@ class Mute extends Command {
}).catch(() => {});
});
member.send(message.translate("moderation/mute:MUTED_DM", {
member.send({
content: message.translate("moderation/mute:MUTED_DM", {
username: member.user.username,
server: message.guild.name,
moderator: message.author.tag,
time,
reason
}));
})
});
message.success("moderation/mute:MUTED", {
username: member.user.tag,

View file

@ -22,7 +22,7 @@ class Poll extends Command {
if (!question) return message.error("moderation/poll:MISSING_QUESTION");
let mention = null;
const msg = await message.channel.send(message.translate("moderation/announcement:MENTION_PROMPT"));
const msg = await message.sendT("moderation/announcement:MENTION_PROMPT");
const filter = m => m.author.id === message.author.id;
const collector = new Discord.MessageCollector(message.channel, {

View file

@ -60,12 +60,14 @@ class Warn extends Command {
if (banCount) {
if (sanctions >= banCount) {
member.send(message.translate("moderation/ban:BANNED_DM", {
member.send({
content: message.translate("moderation/ban:BANNED_DM", {
username: member.user,
moderator: message.author.tag,
server: message.guild.name,
reason
}));
})
});
caseInfo.type = "ban";
embed.setAuthor({
name: message.translate("moderation/ban:CASE", {
@ -83,12 +85,14 @@ class Warn extends Command {
if (kickCount) {
if (sanctions >= kickCount) {
member.send(message.translate("moderation/kick:KICKED_DM", {
member.send({
content: message.translate("moderation/kick:KICKED_DM", {
username: member.user,
moderator: message.author.tag,
server: message.guild.name,
reason
}));
})
});
caseInfo.type = "kick";
embed.setAuthor({
name: message.translate("moderation/kick:CASE", {
@ -104,12 +108,14 @@ class Warn extends Command {
}
}
member.send(message.translate("moderation/warn:WARNED_DM", {
member.send({
content: message.translate("moderation/warn:WARNED_DM", {
username: member.user.tag,
server: message.guild.name,
moderator: message.author.tag,
reason
}));
})
});
caseInfo.type = "warn";
embed.setAuthor({
name: message.translate("moderation/warn:CASE", {

View file

@ -26,14 +26,14 @@ class Eval extends Command {
depth: 0
});
if (output.includes(this.client.token)) output = output.replace(this.client.token, "T0K3N");
message.channel.send({
message.reply({
content: "```js\n" + output + "```"
});
}).catch((err) => {
console.error(err);
err = err.toString();
if (err.includes(this.client.token)) err = err.replace(this.client.token, "T0K3N");
message.channel.send({
message.reply({
content: "```js\n" + err + "```"
});
});