Skip to content
This repository has been archived by the owner on Sep 30, 2020. It is now read-only.

Commit

Permalink
Revert "handle nulls on guild count updates"
Browse files Browse the repository at this point in the history
This reverts commit a82aa89.
  • Loading branch information
sr229 committed Feb 17, 2018
1 parent a82aa89 commit 36896c4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/lib/events/guilds.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module.exports = bot => {
if (guild.members.filter(m => m.bot).filter / guild.members.size >= 0.50) {
logger.info(`Detected bot collection guild '${guild.name}' (${guild.id}). Autoleaving...`);
await guild.leave();
} else if (!bot.config.gameURL || bot.config.gameURL === null) {
} else if (!bot.config.gameURL) {
await bot.editStatus('online', {
name: `${bot.config.gameName || `${bot.config.mainPrefix}help for commands!`} | ${bot.guilds.size} ${bot.guilds.size === 1 ? 'server' : 'servers'}`,
type: 0,
Expand All @@ -27,7 +27,7 @@ module.exports = bot => {
bot.on('guildDelete', async guild => {
if (guild.members.filter(m => m.bot).filter / guild.members.size >= 0.50) return;

if (!bot.config.gameURL || bot.config.gameURL === null) {
if (!bot.config.gameURL) {
await bot.editStatus('online', {
name: `${bot.config.gameName || `${bot.config.mainPrefix}help for commands!`} | ${bot.guilds.size} ${bot.guilds.size === 1 ? 'server' : 'servers'}`,
type: 0,
Expand Down
2 changes: 1 addition & 1 deletion src/lib/events/ready.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ module.exports = bot => {
logger.error(`Error while starting up:\n${err.stack}`);
}
} else logger.info('Reconnected to Discord from disconnection.');
if (!bot.config.gameURL || bot.config.gameURL === null) {
if (!bot.config.gameURL) {
await bot.editStatus('online', {
name: `${bot.config.gameName || `${bot.config.mainPrefix}help for commands!`} | ${bot.guilds.size} ${bot.guilds.size === 1 ? 'server' : 'servers'}`,
type: 0,
Expand Down

0 comments on commit 36896c4

Please sign in to comment.