Skip to content

Commit

Permalink
Merge pull request #27 from Antares-Network/development
Browse files Browse the repository at this point in the history
Update version to 1.3.3
  • Loading branch information
nathen418 authored Feb 11, 2021
2 parents 257e0d0 + 1064735 commit 42eaeb5
Show file tree
Hide file tree
Showing 8 changed files with 46 additions and 22 deletions.
10 changes: 0 additions & 10 deletions actions/logToConsole.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,10 @@ module.exports = {

memberJoin: async function (member) {
console.log(`MEMBER JOIN`.blue, `[${member.guild.name}]`.green, `[${member.user.username}]`.yellow)
try {
bot.channels.cache.get(process.env.REPORTING_CHANNEL).send(`**MEMBER JOIN** - [${member.guild.name}] [${member.user.username}]`)
} catch (e) {
console.log(e);
}
},

memberLeave: async function (member) {
console.log(`MEMBER LEAVE`.blue, `[${member.guild.name}]`.green, `[${member.user.username}]`.yellow)
try {
bot.channels.cache.get(process.env.REPORTING_CHANNEL).send(`**MEMBER LEAVE** - [${member.guild.name}] [${member.user.username}]`)
} catch (e) {
console.log(e);
}
},

guildUpdate: async function (oldGuild, newGuild) {
Expand Down
34 changes: 34 additions & 0 deletions commands/admin/adminHelp.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
const { Command } = require('discord.js-commando');
const { MessageEmbed } = require('discord.js');
const channelCheck = require('../../functions/channelCheck')
const logToConsole = require('../../actions/logToConsole')

module.exports = class AdminHelpCommand extends Command {
constructor(client) {
super(client, {
name: 'adminhelp',
group: 'admin',
memberName: 'adminhelp',
description: 'Shows the bot\'s admin help embed',
examples: ['adminhelp'],
guildOnly: true,
userPermissions: ['MANAGE_MESSAGES']
});
}

async run(message) {
const Embed = new MessageEmbed()
.setColor('#ff3505')
.setURL('https://discord.gg/6pZ2wtGANP')
.setTitle("Admin Help, a list of commands")
.setDescription("**defaultchannel**: Sets the channel the bot will talk in" +
"\n\n **adminchannel**: Sets the channel the bot will send admin messages in" +
"\n\n **dm**: Dm\'s a user that is mentioned. Careful, this is monitored for abuse" +
"\n\n **remove**: Removes all data for the server this command is run in" +
"\n\n **say** or **echo**: Lets you make the bot say something. Careful, this is monitored for abuse" +
"\n\nJoin our support server: https://discord.gg/KKYw763")
.setFooter(`Delivered in: ${Date.now() - message.createdTimestamp}ms | Antares Bot | ${botVersion}`, 'https://cdn.discordapp.com/icons/649703068799336454/1a7ef8f706cd60d62547d2c7dc08d6f0.png');
message.channel.send(Embed);
logToConsole.command(message.guild, message);
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ const logToConsole = require('../../actions/logToConsole')
module.exports = class DefaultChannelCommand extends Command {
constructor(client) {
super(client, {
name: 'adefaultchannel',
name: 'defaultchannel',
group: 'admin',
memberName: 'adefaultchannel',
memberName: 'defaultchannel',
description: 'Sets the admin channel for the guild.',
examples: ['adefaultchannel "CHANNELID"'],
examples: ['defaultchannel "CHANNELID"'],
args: [
{
key: 'text',
Expand Down
6 changes: 2 additions & 4 deletions commands/admin/dm.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,10 @@ module.exports = class DmCommand extends Command {
usages: 1,
duration: 3600,
},
guildOnly: true
guildOnly: true,
userPermissions: ['ADMINISTRATOR']
});
}
hasPermission(msg) {
return this.client.isOwner(msg.author);
}

run(message, { user, content }) {
message.delete();
Expand Down
4 changes: 3 additions & 1 deletion commands/user/help.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module.exports = class HelpCommand extends Command {
group: 'user',
memberName: 'help',
description: 'Shows the bot help embed',
examples: ['privacy'],
examples: ['help'],
guildOnly: true
});
}
Expand All @@ -22,6 +22,7 @@ module.exports = class HelpCommand extends Command {
.setURL('https://discord.gg/6pZ2wtGANP')
.setTitle("Help, a list of commands")
.setDescription("**ip**: Sends in a dm, the Minecraft server run by the bot Developer." +
"\n\n **8ball** or **ask**: Ask the bot a question and have it respond" +
"\n\n **random**: Sends a random *thing*. Send *random* for more details" +
"\n\n **cat**: Sends a random picture of a cat." +
"\n\n **dog**: Sends a random picture of a dog." +
Expand All @@ -31,6 +32,7 @@ module.exports = class HelpCommand extends Command {
"\n\n **prefix**: Shows the Prefix for the bot." +
"\n\n **invite**: Sends an invite for the bot and the support server." +
"\n\n **ping**: Sends the ping time of the bot." +
"\n\n **uptime**: Sends the uptime of the bot" +
"\n\n **privacy**: Sends in a dm, the privacy policy for the bot." +
"\n\nJoin our support server: https://discord.gg/KKYw763")
.setFooter(`Delivered in: ${Date.now() - message.createdTimestamp}ms | Antares Bot | ${botVersion}`, 'https://cdn.discordapp.com/icons/649703068799336454/1a7ef8f706cd60d62547d2c7dc08d6f0.png');
Expand Down
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const piiCreate = require('./actions/piiCreate');
const counting = require('./functions/counting');
const messageLog = require('./actions/messageLog')
const logToConsole = require('./actions/logToConsole')
global.botVersion = "1.3.2";
global.botVersion = "1.3.3";


global.bot = new CommandoClient({
Expand Down Expand Up @@ -139,4 +139,4 @@ bot.on("warn", (e) => console.warn(e));
console.log('Trying to login to the Discord API\nPlease wait for a connection'.yellow);
bot.login(process.env.BOT_TOKEN).catch(e => console.error(e));
console.log("Logged into the Discord API".green.bold);
})()
})() //idk why these () are needed but they are
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "antaresbot",
"version": "1.3.2",
"version": "1.3.3",
"description": "A rewrite of the Antares bot ",
"main": "index.js",
"dependencies": {
Expand Down

0 comments on commit 42eaeb5

Please sign in to comment.