Skip to content

Commit

Permalink
Merge pull request #13 from Discord-Bot-Maker-Mods/beta-1.8.3
Browse files Browse the repository at this point in the history
Changed version number - Ready for release
  • Loading branch information
LunaNiermann authored Jan 20, 2018
2 parents e901cef + ff59549 commit 7bcbcdd
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 17 deletions.
Binary file removed actions/dbm_music_fix_UNZIP_THIS.zip
Binary file not shown.
4 changes: 2 additions & 2 deletions actions/mod_info_MOD.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ subtitle: function(data) {
author: "Lasse",

// The version of the mod (Defaults to 1.0.0)
version: "1.8.2",
version: "1.8.3",

// A short description to show on the mod line for this mod (Must be on a single line)
short_description: "Information about the Mod Collection.",
Expand Down Expand Up @@ -94,7 +94,7 @@ html: function(isEvent, data) {
Join the Discord Guild to stay updated and be able to suggest things.<br>
<a href="https://discord.gg/Y4fPBnZ" target="_blank">Join now</a><br>
<u>Your version:</u><br>
1.8.3-beta<br>
1.8.3<br>
<u>Changelog:</u><br>
Click here to see the latest updates:<br>
<a href="https://github.com/Discord-Bot-Maker-Mods/DBM-Mods/releases" target="_blank">Open Changelog</a><br>
Expand Down
32 changes: 17 additions & 15 deletions actions/set_bot_activity_MOD.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ section: "Bot Client Control",
//---------------------------------------------------------------------

subtitle: function(data) {

const activities = ["Playing", "Listening", "Watching", "Streaming Twitch"];
return `${activities[data.activity]} ${data.nameText}`;
},
Expand Down Expand Up @@ -62,10 +62,12 @@ html: function(isEvent, data) {
<u>Mod Info:</u><br>
Created by Lasse!<br>
Edited by General Wrex<br><br>
Streaming Activity only works with Twitch.
Streaming Activity only works with Twitch.<br>
This action requires the latest discord.js version!<br>
Check out this video: https://youtu.be/mrrtj5nlV58<br>
</p>
</div>
<div style="float: left; width: 70%;">
Activity:<br>
<select id="activity" class="round">
Expand Down Expand Up @@ -104,13 +106,13 @@ init: function() {
action: function(cache) {
const botClient = this.getDBM().Bot.bot.user;
const data = cache.actions[cache.index];

const nameText = this.evalMessage(data.nameText, cache)
const url = this.evalMessage(data.url, cache)


const activity = parseInt(data.activity);

let target;
if(activity >= 0) {
switch(activity) {
Expand All @@ -128,21 +130,21 @@ action: function(cache) {
break;
}
}

if(botClient) {

let obj;
if(nameText && activity){

if(nameText && activity){
obj = { game:{ name: nameText, type: target }}

if(url){
obj = { game:{ name: nameText, type: target, url: url } }
}
}
botClient.setPresence(obj).then(function() {
this.callNextAction(cache);

botClient.setPresence(obj).then(function() {
this.callNextAction(cache);
}.bind(this))
.catch(err=>console.log(err));
} else {
Expand Down

0 comments on commit 7bcbcdd

Please sign in to comment.