🐛
This commit is contained in:
@ -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():
|
||||
|
@ -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):
|
||||
|
@ -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"])
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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
|
||||
|
@ -2,7 +2,6 @@ import json
|
||||
import urllib
|
||||
import random
|
||||
|
||||
from . import money
|
||||
from funcs import logThis
|
||||
|
||||
class Trivia():
|
||||
|
@ -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"]+"*"
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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] == " ":
|
||||
|
@ -188,7 +188,7 @@ class SwRoll():
|
||||
emoji += "<:light:691010089905029171>"
|
||||
elif char == 'B':
|
||||
emoji += "<:dark:691010101901000852>"
|
||||
|
||||
|
||||
return emoji
|
||||
|
||||
# Converts emoji into letters
|
||||
|
Reference in New Issue
Block a user