Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion modules/bachelor.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

def bachelor_handler(sender, message, bot_id, app_id):
if '!roseceremony' in message or '!bachelor' in message:
with open("bachelor.txt") as f:
with open("txt/bachelor.txt") as f:
candidates = []
for line in f:
line = line.strip()
Expand Down
8 changes: 4 additions & 4 deletions modules/detain.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,30 +21,30 @@ def detain_handler(sender, message, bot_id, app_id):

def getN(user):
user = ''.join(user)
with open('detainHistory.json', 'r') as f:
with open('txt/detainHistory.json', 'r') as f:
history = json.load(f)
if user in history:
return history[user]
return 0

def writeDetain(user):
user = ' '.join(user)
with open('detainHistory.json', 'r') as f:
with open('txt/detainHistory.json', 'r') as f:
history = json.load(f)

if user in history:
history[user] = int(history[user]) + 1
else:
history[user] = '1'

with open('detainHistory.json', 'w') as f:
with open('txt/detainHistory.json', 'w') as f:
json.dump(history, f)



def detainList():
historyStr = []
with open('detainHistory.json', 'r') as f:
with open('txt/detainHistory.json', 'r') as f:
history = json.load(f)

for name in history:
Expand Down
4 changes: 2 additions & 2 deletions modules/dierre_pics.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def upload_image_to_groupme(imgURL, app_id):
return imageurl

def dierre_pic_handler(sender, message, bot_id, app_id):
with open('dierre_pics.txt') as f:
with open('txt/dierre_pics.txt') as f:
images = []
for line in f:
images.append(line.strip())
Expand All @@ -36,7 +36,7 @@ def dierre_pic_handler(sender, message, bot_id, app_id):

def dierre_quote():
quotes = []
with open('dierre_quotes.txt') as f:
with open('txt/dierre_quotes.txt') as f:
for line in f:
quotes.append(line.strip())
return quotes[random.randrange(len(quotes))]
Expand Down
2 changes: 1 addition & 1 deletion modules/penny.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def upload_image_to_groupme(imgURL, app_id):
return imageurl

def penny_pic_handler(sender, message, bot_id, app_id):
with open('penny.txt') as f:
with open('txt/penny.txt') as f:
images = []
for line in f:
images.append(line.strip())
Expand Down
4 changes: 2 additions & 2 deletions modules/tethics_dare.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ def dare_handler(sender, message, bot_id, app_id):

def random_classmate():
roster = []
with open('tethics_roster.txt') as f:
with open('txt/tethics_roster.txt') as f:
for line in f:
roster.append(line.strip())
return roster[random.randrange(len(roster))]


def tehics_dares():
dares = []
with open('dares.txt') as f:
with open('txt/dares.txt') as f:
for line in f:
dares.append(line.strip())
return dares[random.randrange(len(dares))]
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.