Whole bunch of (probably pointless) debug messages.
authorCMDR furrycat <elite@furrycat.net>
Fri, 7 Oct 2016 14:18:19 +0000 (15:18 +0100)
committerCMDR furrycat <elite@furrycat.net>
Fri, 7 Oct 2016 14:18:19 +0000 (15:18 +0100)
bot.py

diff --git a/bot.py b/bot.py
index ee4ae00..2d2f071 100755 (executable)
--- a/bot.py
+++ b/bot.py
@@ -1391,24 +1391,33 @@ def channels_to_greet():
   channels = []
   for channel in client.get_all_channels():
     if channel.is_private:
+      log.debug('Not a channel to greet: {} is private'.format(channel))
       continue
     if int(channel.id) not in [greeting['channel'] for greeting in greetings]:
+      log.debug('Not a channel to greet: {} not in {}'.format(channel, [greeting['channel'] for greeting in greetings]))
       continue
+    log.debug('Channel to greet: {}'.format(channel))
     channels.append(channel)
   return channels
 
 def should_greet_member_in(channel, member, role_name = 'Unassigned', minimum = 1):
   if member not in channel.server.members:
+    log.debug('Not greeting {} not in server memberlist'.format(member))
     return False
   permissions = channel.permissions_for(member)
   if permissions is None:
+    log.debug('Not greeting {} with no permissions'.format(member))
     return False
   if not permissions.read_messages:
+    log.debug('Not greeting {} with no read message permission'.format(member))
     return False
   if role_name in [role.name for role in member.roles]:
+    log.debug('Not greeting {} with {} role already'.format(member, role_name))
     return False
   if len(member.roles) > minimum:
+    log.debug('Not greeting {} with more than {} roles'.format(member, minimum))
     return False
+  log.info('Greeting {} in {}'.format(member, channel.name))
   return True
 
 def voice_channel_for_channel(channel):