forked from Supositware/Haha-Yes
updated
This commit is contained in:
parent
505cd1c2b2
commit
6080d91bcd
1 changed files with 8 additions and 4 deletions
|
@ -4,11 +4,11 @@ const fs = require('fs');
|
||||||
module.exports = class CustomResponseCommand extends Command {
|
module.exports = class CustomResponseCommand extends Command {
|
||||||
constructor(client) {
|
constructor(client) {
|
||||||
super(client, {
|
super(client, {
|
||||||
name: 'customresponse',
|
name: 'tag',
|
||||||
group: 'admin',
|
group: 'admin',
|
||||||
memberName: 'customresponse',
|
memberName: 'tag',
|
||||||
userPermissions: ['ADMINISTRATOR'],
|
userPermissions: ['ADMINISTRATOR'],
|
||||||
description: `Can disable autoresponse in the channel (you can add "ALL" like this "haha enable/disable all" to enable/disable in every channel (EXPERIMENTAL))`,
|
description: `Custom auto response`,
|
||||||
args: [
|
args: [
|
||||||
{
|
{
|
||||||
key: 'trigger',
|
key: 'trigger',
|
||||||
|
@ -30,10 +30,14 @@ module.exports = class CustomResponseCommand extends Command {
|
||||||
|
|
||||||
trigger = trigger.toLowerCase();
|
trigger = trigger.toLowerCase();
|
||||||
response = response.toLowerCase()
|
response = response.toLowerCase()
|
||||||
trigger = trigger.replace('--', ' ')
|
do {
|
||||||
|
trigger = trigger.replace('--', ' ')
|
||||||
|
} while (trigger.includes('--'))
|
||||||
|
|
||||||
let customresponse = {}
|
let customresponse = {}
|
||||||
let json = JSON.stringify(customresponse)
|
let json = JSON.stringify(customresponse)
|
||||||
|
|
||||||
|
|
||||||
fs.readFile('./json/customresponse.json', 'utf8', function readFileCallback(err, data){
|
fs.readFile('./json/customresponse.json', 'utf8', function readFileCallback(err, data){
|
||||||
if (err){
|
if (err){
|
||||||
console.log(err);
|
console.log(err);
|
Loading…
Reference in a new issue