Raidein

Untitled

Mar 16th, 2016
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.24 KB | None | 0 0
  1. import cacobot.base as base
  2. import discord, random, json, time, traceback
  3.  
  4. bees = [
  5.     "According to all known laws of aviation, there is no way a bee should be able to fly.",
  6.     "Its wings are too small to get its fat little body off the ground.",
  7.     "The bee, of course, flies anyway because bees don't care what humans think is impossible.",
  8.     "Yellow, black. Yellow, black. Yellow, black. Yellow, black.",
  9.     "Ooh, black and yellow! Let's shake it up a little.",
  10.     "Barry! Breakfast is ready!"
  11. ]
  12.  
  13. beemoviescript = 0
  14. try:
  15.     with open('configs/bms.txt') as z:
  16.         beemoviescript = int(z.read())
  17. except FileNotFoundError:
  18.     with open('configs/bms.txt', 'w') as z:
  19.         z.write('0')
  20.  
  21. # cut to down when you increase beemoviescript by 1
  22.     beemoviescript += 1
  23.     with open('configs/bms.txt', 'w') as z:
  24.         z.write(beemoviescript)
  25.  
  26.  
  27. @base.cacofunc
  28.  
  29. def beemovie(message, client, *args, **kwargs):
  30.     '''
  31.    **}beemovie**
  32.    Spits out a line from the Bee movie script.
  33.    It will progress a line every time the command is used.
  34.    '''
  35.  
  36.     if beemoviescript < len(bees):
  37.         print("{}".format(bees[beemoviescript]))
  38.         beemoviescript = beemoviescript + 1
  39.     else:
  40.         beemoviescript = 0
Advertisement
Add Comment
Please, Sign In to add comment