Skip to content
This repository has been archived by the owner on Feb 26, 2019. It is now read-only.

Commit

Permalink
Merge pull request #27 from Disconnect24/tweaks
Browse files Browse the repository at this point in the history
v1.4.4 Merge
  • Loading branch information
mbrkhrdt authored Dec 27, 2018
2 parents b4b7fdf + d851b63 commit 0a57969
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 22 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
Settings/auth.json
Settings/mail-db.json
Settings/config.json
node_modules
package-lock.json
40 changes: 23 additions & 17 deletions Commands/info.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
module.exports = {

run: function(bot, config, msg, args, suffix, Discord, color) {

let embed = new Discord.RichEmbed()
.setTitle(`Disconnect24 Bot - Information`)
.setDescription(`**[GitHub page](https://github.com/Disconnect24/DC24-bot)**
Developed by: **<@${config.creatorID}>**\n
Contributors: **Wiiの間** (Error Suggestions), **CornierKhan1** (VPS), **Apfel** (Bot improvements)
Running since: **${bot.readyAt}**`)
.addField(`Links`, `**[Bot Invite](${config.botInvite})**\n**[Disconnect24 Invite](${config.serverInvite})**`)
.setFooter(`Become a Contributor by submitting an important pull request to our GitHub page!`)
.setColor(color)

msg.channel.send(embed)
}
}
module.exports = {

run: function(bot, config, msg, args, suffix, Discord, color) {
bot.generateInvite(['VIEW_CHANNEL', 'SEND_MESSAGES', 'MANAGE_MESSAGES',
'EMBED_LINKS', 'ATTACH_FILES', 'READ_MESSAGE_HISTORY',
'USE_EXTERNAL_EMOJIS', 'ADD_REACTIONS'])
.then(function(link){
let embed = new Discord.RichEmbed()
.setTitle(`Disconnect24 Bot - Information`)
.setDescription(`**[GitHub page](https://github.com/Disconnect24/DC24-bot)**
Developed by: **<@${config.creatorID}>**\n
Contributors: **Wiiの間** (Error Suggestions), **CornierKhan1** (VPS), **Apfel** (Bot improvements), Spotlight (Minor Tweaks)
Running since: **${bot.readyAt}**`)
.addField(`Links`, `**[Bot Invite](${link})**\n**[Disconnect24 Invite](${config.serverInvite})**`)
.setFooter(`Become a Contributor by submitting an important pull request to our GitHub page!`)
.setColor(color)

msg.channel.send(embed)
}, function(error) {
console.error;
});
}
}
5 changes: 2 additions & 3 deletions Commands/patch.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@ module.exports = {

let userConfig = request.get(url);

request.post({url:'https://mail.service.dc24.xyz/patch', headers: { 'Content-Type': 'multipart/form-data; boundary=----WebKitFormBoundarytUArugCRlbmMdP4C
' }, formData: {uploaded_config: userConfig}}, function optionalCallback(err, httpResponse, body) {
request.post({url:'https://mail.service.dc24.xyz/patch', headers: { 'Content-Type': 'multipart/form-data', 'boundary': 'dc24bot' }, formData: {uploaded_config: userConfig}}, function optionalCallback(err, httpResponse, body) {
if (err) {
return msg.channel.send(`upload failed: ${err}`);
return msg.channel.send(`Upload failed: ${err}`);
}
var buffer = Buffer.from(JSON.stringify(body));
const attachment = new Discord.Attachment(buffer, 'nwc24msg.cfg');
Expand Down
1 change: 0 additions & 1 deletion Settings/config.json.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@
"creatorID": "275775739998240769",
"khanID": "203447413644460034",
"prefix": "d!",
"botInvite":"https://discordapp.com/oauth2/authorize?client_id=397033022844567554&scope=bot&permissions=8",
"serverInvite":"https://discord.gg/2BvqG9S"
}
2 changes: 1 addition & 1 deletion bot.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const auth = JSON.parse(fs.readFileSync("./Settings/auth.json", "utf8"))

bot.login(auth.token)

var status = `Use ${config.prefix}help | DC24 Bot v1.4.3`
var status = `Use ${config.prefix}help | DC24 Bot v1.4.4`
var color = `#BA68C8`

bot.on('ready', async function() {
Expand Down

0 comments on commit 0a57969

Please sign in to comment.