Skip to content

Commit

Permalink
😍 [1.1.3] - Working voting channel
Browse files Browse the repository at this point in the history
- Fixed voting channel
- Added version of project command (only dm)
  • Loading branch information
PetyXbronCZ committed Jul 16, 2021
1 parent b451768 commit 1e18256
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
14 changes: 13 additions & 1 deletion events/message.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,27 @@
const ms = require('ms')
const version = require('../package.json').version

module.exports = async (bot, message) => {
if(message.author.bot) return;
if(message.channel.type === "dm") {
if(message.content.includes('minecraft-bot version')) {
message.channel.startTyping();
setTimeout(function(){
message.channel.stopTyping();
message.channel.send(version);
}, ms('1,5s'));
return;
}
return;
}

const { prefix, server, config } = bot;

const messageArray = message.content.split(' ');
const cmd = messageArray[0];
const args = messageArray.slice(1);

if(config.settings.votingCH) {
if(config.settings.votingCH && message.channel.id === config.votingCH.channel.id) {
if(message.content.startsWith(prefix)) return;

message.react(config.votingCH.reactions.first)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "minecraft-bot",
"version": "1.1.2",
"version": "1.1.3",
"description": "Discord minecraft bot, with which you can check your minecraft server status (online players, version, online status etc.)",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 1e18256

Please sign in to comment.