bug fixes
This commit is contained in:
parent
49e5bee0d4
commit
b946d5f411
6 changed files with 98 additions and 13 deletions
|
@ -1,5 +1,4 @@
|
||||||
const { Client, Message, MessageEmbed } = require("discord.js");
|
const { Client, Message, MessageEmbed } = require("discord.js");
|
||||||
const { Suggestion } = require("../../config.json");
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: "accept",
|
name: "accept",
|
||||||
category: "Owner",
|
category: "Owner",
|
||||||
|
@ -14,11 +13,13 @@ module.exports = {
|
||||||
run: async (client, message, args) => {
|
run: async (client, message, args) => {
|
||||||
const MessageID = args[0];
|
const MessageID = args[0];
|
||||||
const acceptQuery =
|
const acceptQuery =
|
||||||
args.slice(1).join(" ") || `Night doesn't leave any message.`;
|
args.slice(1).join(" ") || `They didn't leave any message.`;
|
||||||
|
|
||||||
if (!MessageID) return message.reply("Please specify a valid ID");
|
if (!MessageID) return message.reply("Please specify a valid ID");
|
||||||
try {
|
try {
|
||||||
const suggestionChannel = message.guild.channels.cache.get(Suggestion);
|
const suggestionChannel = message.guild.channels.cache.get(
|
||||||
|
client.SuggestionLog
|
||||||
|
);
|
||||||
const suggestEmbed = await suggestionChannel.messages.fetch(MessageID);
|
const suggestEmbed = await suggestionChannel.messages.fetch(MessageID);
|
||||||
console.log(suggestEmbed);
|
console.log(suggestEmbed);
|
||||||
const data = suggestEmbed.embeds[0];
|
const data = suggestEmbed.embeds[0];
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
const { Client, Message, MessageEmbed } = require("discord.js");
|
const { Client, Message, MessageEmbed } = require("discord.js");
|
||||||
const { Suggestion } = require("../../config.json");
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: "deny",
|
name: "deny",
|
||||||
category: "Owner",
|
category: "Owner",
|
||||||
|
@ -14,11 +13,13 @@ module.exports = {
|
||||||
run: async (client, message, args) => {
|
run: async (client, message, args) => {
|
||||||
const MessageID = args[0];
|
const MessageID = args[0];
|
||||||
const denyQuery =
|
const denyQuery =
|
||||||
args.slice(1).join(" ") || `Night doesn't leave any message.`;
|
args.slice(1).join(" ") || `They didn't leave any message.`;
|
||||||
|
|
||||||
if (!MessageID) return message.reply("Please specify a valid ID");
|
if (!MessageID) return message.reply("Please specify a valid ID");
|
||||||
try {
|
try {
|
||||||
const suggestionChannel = message.guild.channels.cache.get(Suggestion);
|
const suggestionChannel = message.guild.channels.cache.get(
|
||||||
|
client.SuggestionLog
|
||||||
|
);
|
||||||
const suggestEmbed = await suggestionChannel.messages.fetch(MessageID);
|
const suggestEmbed = await suggestionChannel.messages.fetch(MessageID);
|
||||||
console.log(suggestEmbed);
|
console.log(suggestEmbed);
|
||||||
const data = suggestEmbed.embeds[0];
|
const data = suggestEmbed.embeds[0];
|
||||||
|
|
|
@ -49,7 +49,7 @@ module.exports = {
|
||||||
new MessageEmbed()
|
new MessageEmbed()
|
||||||
.setTitle("SUCCESS!")
|
.setTitle("SUCCESS!")
|
||||||
.setDescription(
|
.setDescription(
|
||||||
"You have reported the bug.\nPlease wait for Night to solve it"
|
"You have reported a bug.\nPlease wait for us to solve it"
|
||||||
)
|
)
|
||||||
.setColor("GREEN")
|
.setColor("GREEN")
|
||||||
);
|
);
|
||||||
|
@ -57,7 +57,7 @@ module.exports = {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const appsChannel = client.channels.cache.get("808200253261611018");
|
const appsChannel = client.channels.cache.get(client.ReportLog);
|
||||||
collector.on("end", (collected, reason) => {
|
collector.on("end", (collected, reason) => {
|
||||||
if (reason === "fulfilled") {
|
if (reason === "fulfilled") {
|
||||||
let index = 1;
|
let index = 1;
|
||||||
|
@ -73,8 +73,7 @@ module.exports = {
|
||||||
message.author.tag,
|
message.author.tag,
|
||||||
message.author.displayAvatarURL({ dynamic: true })
|
message.author.displayAvatarURL({ dynamic: true })
|
||||||
)
|
)
|
||||||
.setTitle("New Apllication")
|
.setTitle("New Bug")
|
||||||
|
|
||||||
.setDescription(mapedResponses)
|
.setDescription(mapedResponses)
|
||||||
.setColor("ORANGE")
|
.setColor("ORANGE")
|
||||||
.setTimestamp()
|
.setTimestamp()
|
||||||
|
|
82
commands/Utilities/suggest.js
Normal file
82
commands/Utilities/suggest.js
Normal file
|
@ -0,0 +1,82 @@
|
||||||
|
const { Client, Message, MessageEmbed } = require("discord.js");
|
||||||
|
module.exports = {
|
||||||
|
name: "suggest",
|
||||||
|
description: "Make a suggestion of the bot",
|
||||||
|
category: "Utilities",
|
||||||
|
/**
|
||||||
|
* @param {Client} client
|
||||||
|
* @param {Message} message
|
||||||
|
* @param {String[]} args
|
||||||
|
*/
|
||||||
|
run: async (client, message, args) => {
|
||||||
|
const questions = [
|
||||||
|
"Describe the suggestion",
|
||||||
|
//"question 2"
|
||||||
|
];
|
||||||
|
|
||||||
|
let collectCounter = 0;
|
||||||
|
let endCounter = 0;
|
||||||
|
|
||||||
|
const filter = m => m.author.id === message.author.id;
|
||||||
|
message.inlineReply("Check your dm.");
|
||||||
|
const appStart = await message.author.send(
|
||||||
|
new MessageEmbed()
|
||||||
|
.setAuthor(message.author.username, message.author.displayAvatarURL())
|
||||||
|
.setDescription(questions[collectCounter++])
|
||||||
|
.setFooter(client.user.username)
|
||||||
|
.setTimestamp()
|
||||||
|
);
|
||||||
|
const channel = appStart.channel;
|
||||||
|
|
||||||
|
const collector = channel.createMessageCollector(filter);
|
||||||
|
|
||||||
|
collector.on("collect", () => {
|
||||||
|
if (collectCounter < questions.length) {
|
||||||
|
channel.send(
|
||||||
|
new MessageEmbed()
|
||||||
|
.setAuthor(
|
||||||
|
message.author.username,
|
||||||
|
message.author.displayAvatarURL()
|
||||||
|
)
|
||||||
|
.setDescription(questions[collectCounter++])
|
||||||
|
.setFooter(client.user.username)
|
||||||
|
.setTimestamp()
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
channel.send(
|
||||||
|
new MessageEmbed()
|
||||||
|
.setTitle("SUCCESS!")
|
||||||
|
.setDescription(
|
||||||
|
"You have sent a suggestion.\nPlease wait for us to review it"
|
||||||
|
)
|
||||||
|
.setColor("GREEN")
|
||||||
|
);
|
||||||
|
collector.stop("fulfilled");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const appsChannel = client.channels.cache.get(client.ReportLog);
|
||||||
|
collector.on("end", (collected, reason) => {
|
||||||
|
if (reason === "fulfilled") {
|
||||||
|
let index = 1;
|
||||||
|
const mapedResponses = collected
|
||||||
|
.map(msg => {
|
||||||
|
return `${questions[endCounter++]}**\n->** ${msg.content}`;
|
||||||
|
})
|
||||||
|
.join("\n\n");
|
||||||
|
|
||||||
|
appsChannel.send(
|
||||||
|
new MessageEmbed()
|
||||||
|
.setAuthor(
|
||||||
|
message.author.tag,
|
||||||
|
message.author.displayAvatarURL({ dynamic: true })
|
||||||
|
)
|
||||||
|
.setTitle("New Suggestion")
|
||||||
|
.setDescription(mapedResponses)
|
||||||
|
.setColor("ORANGE")
|
||||||
|
.setTimestamp()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
};
|
|
@ -6,7 +6,7 @@
|
||||||
"soundcloud": "dmDh7QSlmGpzH9qQoH1YExYCGcyYeYYC",
|
"soundcloud": "dmDh7QSlmGpzH9qQoH1YExYCGcyYeYYC",
|
||||||
"ca": "**[Invite](https://discord.com/api/oauth2/authorize?client_id=800966959268364288&permissions=4231314550&scope=bot%20applications.commands) | [Support](https://discord.gg/SbQHChmGcp) | [YouTube](https://youtube.com/Kirito01) | [Website](https://www.cath.gq)**",
|
"ca": "**[Invite](https://discord.com/api/oauth2/authorize?client_id=800966959268364288&permissions=4231314550&scope=bot%20applications.commands) | [Support](https://discord.gg/SbQHChmGcp) | [YouTube](https://youtube.com/Kirito01) | [Website](https://www.cath.gq)**",
|
||||||
"cat": "**[Invite](https://discord.com/api/oauth2/authorize?client_id=800966959268364288&permissions=4231314550&scope=bot%20applications.commands) | [Support](https://discord.gg/SbQHChmGcp) | [YouTube](https://youtube.com/Kirito01) | [Website](https://www.cath.gq)**\n\n",
|
"cat": "**[Invite](https://discord.com/api/oauth2/authorize?client_id=800966959268364288&permissions=4231314550&scope=bot%20applications.commands) | [Support](https://discord.gg/SbQHChmGcp) | [YouTube](https://youtube.com/Kirito01) | [Website](https://www.cath.gq)**\n\n",
|
||||||
"Suggestion": "837870173376741387",
|
"Suggestion": "853319776034226186",
|
||||||
"Report": "837870173376741387",
|
"Report": "853319776034226186",
|
||||||
"Welcome": "837913442228371456"
|
"Welcome": "837913442228371456"
|
||||||
}
|
}
|
||||||
|
|
4
index.js
4
index.js
|
@ -51,6 +51,7 @@ process.on("unhandledRejection", async err => {
|
||||||
return console.log(err);
|
return console.log(err);
|
||||||
});
|
});
|
||||||
client.SuggestionLog = config.Suggestion;
|
client.SuggestionLog = config.Suggestion;
|
||||||
|
client.ReportLog = config.Report;
|
||||||
client.commands = new Collection();
|
client.commands = new Collection();
|
||||||
client.aliases = new Collection();
|
client.aliases = new Collection();
|
||||||
client.events = new Collection();
|
client.events = new Collection();
|
||||||
|
@ -72,6 +73,7 @@ client.owners = [
|
||||||
"749692825402212494",
|
"749692825402212494",
|
||||||
"766645910087139338",
|
"766645910087139338",
|
||||||
"755476040029306952",
|
"755476040029306952",
|
||||||
|
"534027706325532694",
|
||||||
];
|
];
|
||||||
client.currency = "<:cp:836630372661329990>";
|
client.currency = "<:cp:836630372661329990>";
|
||||||
client.path = [
|
client.path = [
|
||||||
|
@ -81,7 +83,7 @@ client.path = [
|
||||||
"718762019586572341",
|
"718762019586572341",
|
||||||
"784052348561522730",
|
"784052348561522730",
|
||||||
"840225563193114624",
|
"840225563193114624",
|
||||||
"800396461229080619"
|
"800396461229080619",
|
||||||
];
|
];
|
||||||
client.xp = [
|
client.xp = [
|
||||||
"749135655350697986",
|
"749135655350697986",
|
||||||
|
|
Loading…
Reference in a new issue