forked from amanv8060/DSCKIIT-BOT
-
Notifications
You must be signed in to change notification settings - Fork 0
/
askQuestion.js
29 lines (27 loc) · 896 Bytes
/
askQuestion.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/*
Copyright 2021 Aman Verma. All rights reserved.
Use of this source code is governed by a MIT license that can be
found in the LICENSE file.
*/
const data = require("../../../data/data.json");
module.exports = {
name: "askQuestion",
description: "Asks a question",
run: async (client, message, args) => {
if (!message.member.permissions.has("ADMINISTRATOR")) {
return message.reply("Become a admin MAN");
}
const questionChannel = message.guild.channels.cache.find(
(channel) => channel.id === data["questionChannelId"]
);
console.log(args.length);
if (!questionChannel) {
message.channel.send("Question Channel Not Found");
} else {
questionChannel.send(
"**Question**\n" + message.content.substr(12).trim()
);
}
},
aliases: []
};