Skip to content

Commit

Permalink
No changes lul
Browse files Browse the repository at this point in the history
release 1.5.11 fixed some bugs but still buggy as
- temporarily disabled useless module (discord commands)
EEEEEEEEEEEEEEEEE
  • Loading branch information
NotGhex committed Aug 1, 2021
1 parent a059e06 commit 9e029c2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 19 deletions.
2 changes: 1 addition & 1 deletion assets/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,5 @@
"connected": "Database connected!",
"connection_logged": "MySQL connection logged!"
},
"version": "1.5.10"
"version": "1.5.11"
}
4 changes: 2 additions & 2 deletions config.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,12 @@
"debug": {
"enabled": true,
"movements": false,
"discord_chats": true,
"discord_chats": false,
"minecraft_chats": true,
"prefix": "",
"suffix": ""
},
"messages": "assets/messages.json",
"responses": "assets/response.json",
"version": "1.5.10"
"version": "1.5.11"
}
19 changes: 3 additions & 16 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const mysql = require('mysql');

//Discord
const Discord = require('discord.js');
const DiscordInteractions = require("discord-slash-commands-client");
// const DiscordInteractions = require("discord-slash-commands-client"); Disable temporarily

//configuration file
let conf = fs.readFileSync('config.json');
Expand Down Expand Up @@ -135,7 +135,7 @@ function parse (url = null){

//Create discord client
const client = new Discord.Client();
client.interactions = new DiscordInteractions.Client(config['discord']['token'], config['discord']['user_id']);
// client.interactions = new DiscordInteractions.Client(config['discord']['token'], config['discord']['user_id']);

//debug mode enabled/disabled log
if(debug) console.log('[Log - Debug Mode] '+messages['logging']['enabled']);
Expand Down Expand Up @@ -334,7 +334,7 @@ function newBot(){
if(command == ''){
//invalid command: null
bot.chat(messages['minecraft_bot']['chats']['command_invalid']);
} else if (admin && command == 'reloadonlineconfig' || admin && command == 'restartconfig'){
} else if (admin && command == 'reloadconfig' || admin && command == 'reload' || admin && command == 'restartconfig'){
//reload config
bot.chat("Reloading Bot Config");

Expand Down Expand Up @@ -649,14 +649,6 @@ function DiscordBot(){
factslist = JSON.parse(factslist);
}

//create commands
client.interactions.createCommand({
name: "example",
description: "description for this command",
})
.catch(console.error("-"))
.then(console.log("+"));

//on message
client.on('message', function(message) {
//disconnect if bot was disabled
Expand Down Expand Up @@ -1149,11 +1141,6 @@ function DiscordBot(){
//console.log('[Log - Discord Bot] Raw Message: '+limitText(rawMessage)+'; LowerRemoveMensions: '+limitText(removeMensions(lowerMessage))+'; BotFind: '+limitText(findName(lowerMessage)));
}
});

//on command interact
client.on("interactionCreate", (interaction) => {
console.log(interaction);
});
});
}

Expand Down

0 comments on commit 9e029c2

Please sign in to comment.