Skip to content

Commit

Permalink
Merge PR #171 from TheBastionBot/master
Browse files Browse the repository at this point in the history
Bastion Bot v6.11.1
  • Loading branch information
iamtraction committed Apr 1, 2018
2 parents b807586 + 27627a5 commit b1daa4f
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 17 deletions.
15 changes: 6 additions & 9 deletions changes.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
{
"date": "April 1, 2018",
"image": "https://i.imgur.com/tIYEujJ.gif",
"ENHANCEMENTS": [
"Under-the-hood improvements."
],
"NEW FEATURES": [
"You can now set the interval at which Bastion's activity changes."
"image": "https://i.imgur.com/fYmAcXh.gif",
"THESE BUGS ARE DEAD": [
"Fixed the issue that caused Bastion to go offline after a few moments, if you had set the activity interval."
],
"NEW COMMANDS": [
"Added `shardStats` command.",
"Added `pollStats` command."
"ENHANCEMENTS": [
"You can now set the streaming status from config too! Forget the `setStream` command. Who needs it anyway!",
"Some under-the-hood changes & improvements."
]
}
11 changes: 8 additions & 3 deletions events/ready.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,24 @@ module.exports = async Bastion => {
status: Bastion.config.status,
game: {
name: typeof Bastion.config.game.name === 'string' ? Bastion.config.game.name : Bastion.config.game.name.length ? Bastion.config.game.name[0] : null,
type: Bastion.config.game.type
type: Bastion.config.game.type,
url: Bastion.config.game.url
}
});

if (typeof Bastion.config.game.name !== 'string' && Bastion.config.game.name.length) {
Bastion.setInterval(async () => {
try {
await Bastion.user.setActivity(Bastion.config.game.name[Math.floor(Math.random() * Bastion.config.game.name.length)], { type: Bastion.config.game.type });
await Bastion.user.setActivity(Bastion.config.game.name[Math.floor(Math.random() * Bastion.config.game.name.length)],
{
type: Bastion.config.game.type,
url: Bastion.config.game.url
});
}
catch (e) {
Bastion.log.error(e);
}
}, typeof Bastion.config.game.interval === 'number' && Bastion.config.game.interval || 60 * 60 * 1000);
}, ((typeof Bastion.config.game.interval === 'number' && Bastion.config.game.interval) || 60) * 60 * 1000);
}

let bastionGuilds = Bastion.guilds.map(g => g.id);
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bastion",
"version": "6.11.0",
"version": "6.11.1",
"description": "Give awesome perks to your Discord server!",
"url": "https://bastionbot.org/",
"main": "index.js",
Expand Down Expand Up @@ -32,7 +32,7 @@
"discord.js": "~11.3.2",
"gamedig": "~1.0.45",
"hirez.js": "~2.0.0",
"kitsu": "~5.0.7",
"kitsu": "~5.1.0",
"lzutf8": "~0.5.0",
"mathjs": "~4.0.1",
"node-json-db": "~0.7.5",
Expand Down
6 changes: 3 additions & 3 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"branchPrefix": "deps/",
"branchPrefix": "dep/",
"devDependencies": {
"branchPrefix": "dev-deps/"
"branchPrefix": "dev-dep/"
},
"enabled": true,
"ignorePaths": [
Expand All @@ -15,7 +15,7 @@
"dependencies"
],
"optionalDependencies": {
"branchPrefix": "opt-deps/"
"branchPrefix": "opt-dep/"
},
"patch": {
"automerge": true,
Expand Down
1 change: 1 addition & 0 deletions settings/config_example.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"name": [
"with Ganymede"
],
"url": "",
"interval": 60
},
"music": {
Expand Down

0 comments on commit b1daa4f

Please sign in to comment.