f28cb961 by Barry

Added bug fix for when the games list was > 100 to handle really long lists.

Added version to the !secret command.
1 parent aba82c68
...@@ -17,6 +17,8 @@ from collections import defaultdict ...@@ -17,6 +17,8 @@ from collections import defaultdict
17 from nltk.tag import pos_tag 17 from nltk.tag import pos_tag
18 import wolframalpha 18 import wolframalpha
19 19
20 VERSION = 1.5
21
20 member_status = 'members.json' 22 member_status = 'members.json'
21 deliveries_file = 'deliveries.json' 23 deliveries_file = 'deliveries.json'
22 fortune_file = 'fortunes.json' 24 fortune_file = 'fortunes.json'
...@@ -384,7 +386,11 @@ Stuff: ...@@ -384,7 +386,11 @@ Stuff:
384 #print('%s' % game) 386 #print('%s' % game)
385 out_string += ' {} - {}\n'.format(game[1], game[0]) 387 out_string += ' {} - {}\n'.format(game[1], game[0])
386 388
387 client.send_message(message.channel, 'The games I have seen people playing are: \n{}'.format(out_string)) 389 client.send_message(message.channel, 'The games I have seen people playing are: ')
390 while len(out_string) > 1900:
391 client.send_message(message.channel, out_string[:1900])
392 out_string = out_string[1900:]
393
388 return 394 return
389 395
390 if message.content.startswith('!aliases'): 396 if message.content.startswith('!aliases'):
...@@ -648,7 +654,7 @@ Stuff: ...@@ -648,7 +654,7 @@ Stuff:
648 client.send_message(message.channel, '{} {}'.format(message.author.mention(), random.choice(data).encode('utf-8',errors='ignore'))) 654 client.send_message(message.channel, '{} {}'.format(message.author.mention(), random.choice(data).encode('utf-8',errors='ignore')))
649 655
650 if message.content.startswith('!secret'): 656 if message.content.startswith('!secret'):
651 client.send_message(message.channel, 'git gud {}! My source is here: http://git.savsoul.com/barry/discordbot'.format(message.author.mention())) 657 client.send_message(message.channel, 'git gud {}! My source is here: http://git.savsoul.com/barry/discordbot\nVersion: {}'.format(message.author.mention(), VERSION))
652 658
653 if message.content.startswith('!bemyirlwaifu'): 659 if message.content.startswith('!bemyirlwaifu'):
654 client.send_message(message.channel, 'http://orig13.deviantart.net/b25e/f/2014/175/3/d/no_waifu_no_laifu_by_imtheonenexttome-d7nsx3b.gif {}!'.format(message.author.mention())) 660 client.send_message(message.channel, 'http://orig13.deviantart.net/b25e/f/2014/175/3/d/no_waifu_no_laifu_by_imtheonenexttome-d7nsx3b.gif {}!'.format(message.author.mention()))
......