diff --git a/Gwendolyn.py b/Gwendolyn.py index ebe5014..5d366e6 100644 --- a/Gwendolyn.py +++ b/Gwendolyn.py @@ -1,8 +1,8 @@ -import discord, os, finnhub, pymongo +import discord, os, finnhub from discord.ext import commands from pymongo import MongoClient -from funcs import logThis, makeFiles, transferUsers, Money, Funcs, SwChar, SwDestiny, SwRoll, Games +from funcs import logThis, makeFiles, Money, Funcs, SwChar, SwDestiny, SwRoll, Games commandPrefix = "!" @@ -55,9 +55,6 @@ makeFiles() # Creates the Bot client = Gwendolyn() -# Creates database collections -transferUsers(client.database) - # Logs in @client.event async def on_ready(): diff --git a/cogs/LookupCog.py b/cogs/LookupCog.py index c69ffd1..5296db5 100644 --- a/cogs/LookupCog.py +++ b/cogs/LookupCog.py @@ -8,7 +8,7 @@ class LookupCog(commands.Cog): def __init__(self,client): """Runs lookup commands.""" self.client = client - + # Looks up a spell @commands.command() async def spell(self, ctx, *, content): @@ -18,7 +18,7 @@ class LookupCog(commands.Cog): await ctx.send(spell[2000:]) else: await ctx.send(spell) - + # Looks up a monster @commands.command() async def monster(self, ctx, *, content): diff --git a/cogs/SwCog.py b/cogs/SwCog.py index 45d20a7..f048147 100644 --- a/cogs/SwCog.py +++ b/cogs/SwCog.py @@ -17,7 +17,7 @@ class SwCog(commands.Cog): messageList = newMessage.split("\n") for messageItem in messageList: await ctx.send(messageItem) - + # Controls destiny points @commands.command() async def swd(self, ctx, *, content): @@ -25,7 +25,7 @@ class SwCog(commands.Cog): messageList = newMessage.split("\n") for messageItem in messageList: await ctx.send(messageItem) - + # Rolls for critical injuries @commands.command() async def swcrit(self, ctx, arg : int = 0): @@ -34,7 +34,7 @@ class SwCog(commands.Cog): messageList = newMessage.split("\n") for messageItem in messageList: await ctx.send(messageItem) - + # Accesses and changes character sheet data with the parseChar function # from funcs/swfuncs/swchar.py @commands.command(aliases=["sw"]) diff --git a/funcs/games/blackjack.py b/funcs/games/blackjack.py index fb00e34..ad1423c 100644 --- a/funcs/games/blackjack.py +++ b/funcs/games/blackjack.py @@ -229,7 +229,7 @@ class Blackjack(): # When players try to double down def blackjackDouble(self,channel,user,handNumber = 0): game = self.bot.database["blackjack games"].find_one({"_id":channel}) - + if user in game["user hands"]: hand, handNumber = self.getHandNumber(game["user hands"][user],handNumber) diff --git a/funcs/games/fourInARow.py b/funcs/games/fourInARow.py index 2209a49..cde3f0f 100644 --- a/funcs/games/fourInARow.py +++ b/funcs/games/fourInARow.py @@ -1,7 +1,6 @@ import random import copy import math -import asyncio from .fourInARowDraw import DrawFourInARow from funcs import logThis @@ -128,8 +127,8 @@ class FourInARow(): def placeOnBoard(self,board,player,column): placementx, placementy = -1, column - for x in range(len(board)): - if board[x][column] == 0: + for x, line in enumerate(board): + if line[column] == 0: placementx = x board[placementx][placementy] = player diff --git a/funcs/games/trivia.py b/funcs/games/trivia.py index 3660fe2..8638ad6 100644 --- a/funcs/games/trivia.py +++ b/funcs/games/trivia.py @@ -2,7 +2,6 @@ import json import urllib import random -from . import money from funcs import logThis class Trivia(): diff --git a/funcs/lookup/lookupFuncs.py b/funcs/lookup/lookupFuncs.py index 1d64e3c..27f99ac 100644 --- a/funcs/lookup/lookupFuncs.py +++ b/funcs/lookup/lookupFuncs.py @@ -101,7 +101,7 @@ def monsterFunc(command): hit_dice += (" - "+str(con_mod * int(monster["hit_dice"].replace("d"," ").split()[0])*(-1))) if con_mod > 0: hit_dice += (" + "+str(con_mod * int(monster["hit_dice"].replace("d"," ").split()[0]))) - + new_part = "\n--------------------" monster_type = monster["size"]+" "+typs+", "+monster["alignment"]+"*" diff --git a/funcs/other/generators.py b/funcs/other/generators.py index 0e0680f..d1d4431 100644 --- a/funcs/other/generators.py +++ b/funcs/other/generators.py @@ -29,7 +29,7 @@ def nameGen(): # Choses a random first letter first_letter = random.choice(corpus) - # Makes sure the first letter is not something a name can't start with. + # Makes sure the first letter is not something a name can't start with. while first_letter.islower() or first_letter == " " or first_letter == "-" or first_letter == "\n": first_letter = random.choice(corpus) diff --git a/funcs/swfuncs/swchar.py b/funcs/swfuncs/swchar.py index 953e9b1..a590406 100644 --- a/funcs/swfuncs/swchar.py +++ b/funcs/swfuncs/swchar.py @@ -280,7 +280,7 @@ class SwChar(): except: logThis("Nope. That didn't happen (error code 942)") return "Can't do that (error code 942)" - + if (key == "Talents" or key == "Force-powers") and "," in cmd: cmd = cmd.split(",") while cmd[1][0] == " ": diff --git a/funcs/swfuncs/swroll.py b/funcs/swfuncs/swroll.py index d6be06b..c1b5015 100644 --- a/funcs/swfuncs/swroll.py +++ b/funcs/swfuncs/swroll.py @@ -188,7 +188,7 @@ class SwRoll(): emoji += "<:light:691010089905029171>" elif char == 'B': emoji += "<:dark:691010101901000852>" - + return emoji # Converts emoji into letters