🗃️ Better importing

This commit is contained in:
Nikolaj Danger
2020-08-03 17:43:38 +02:00
parent aa52af5efc
commit 41b048217b
7 changed files with 36 additions and 23 deletions

View File

@ -10,7 +10,7 @@ import random
#import math
import os
from funcs import *
from funcs import helloFunc, cap, imageFunc, logThis, findWikiPage, makeFiles, emojiToNumber, fiarReactionTest, deleteGame, stopServer, checkBalance, giveMoney, addMoney, triviaCountPoints, triviaStart, triviaAnswer, blackjackShuffle, blackjackStart, blackjackPlayerDrawHand, blackjackContinue, blackjackFinish, blackjackHit, blackjackStand, blackjackDouble, blackjackSplit, parseFourInARow, fourInARowAI, spellFunc, monsterFunc, nameGen, tavernGen, movieFunc, roll_dice, parseChar, parseRoll, critRoll, parseDestiny
commandPrefix = "!"
@ -303,7 +303,7 @@ async def parseCommands(message,content):
# Sends information about a random movie with the movieFunc function from
# funcs/other/movie.py
elif content.startswith("movie"):
#try:
try:
async with message.channel.typing():
title, plot, cover, cast = movieFunc()
if title == "error":
@ -316,9 +316,9 @@ async def parseCommands(message,content):
await message.channel.send(embed = embed)
except:
logThis("Error embedding (error code 805)")
#except:
# logThis("Something fucked up (error code 800)",str(message.channel))
# await message.channel.send("Something fucked up (error code 800)")
except:
logThis("Something fucked up (error code 800)",str(message.channel))
await message.channel.send("Something fucked up (error code 800)")
# Generates a random name with the nameGen function from funcs/other/generators.py
elif content.startswith("name"):

View File

@ -1,13 +1,16 @@
__doc__ = "A collection of all Gwendolyn functions"
__all__ = ["helloFunc", "cap", "imageFunc", "logThis", "findWikiPage", "makeFiles", "emojiToNumber", "fiarReactionTest", "deleteGame", "stopServer", "checkBalance", "giveMoney", "addMoney", "triviaCountPoints", "triviaStart", "triviaAnswer", "blackjackShuffle", "blackjackStart", "blackjackPlayerDrawHand", "blackjackContinue", "blackjackFinish", "blackjackHit", "blackjackStand", "blackjackDouble", "blackjackSplit", "parseFourInARow", "fourInARowAI", "spellFunc", "monsterFunc", "nameGen", "tavernGen", "movieFunc", "roll_dice", "parseChar", "parseRoll", "critRoll", "parseDestiny"]
from .miscFuncs import helloFunc, cap, imageFunc, logThis, findWikiPage, makeFiles, replaceMultiple, emojiToNumber, fiarReactionTest, deleteGame, stopServer
from .swfuncs import *
from .games import checkBalance, giveMoney, addMoney, triviaCountPoints, triviaStart, triviaAnswer, blackjackShuffle, blackjackStart, blackjackPlayerDrawHand, blackjackContinue, blackjackFinish, blackjackHit, blackjackStand, blackjackDouble, blackjackSplit, parseFourInARow, fourInARowAI
from .lookup import *
from .lookup import spellFunc, monsterFunc
from .other import *
from .other import nameGen, tavernGen, movieFunc
from .games import *
from .roll import roll_dice
from .swfuncs import parseChar, parseRoll, parseDestiny, critRoll
from .roll import *

View File

@ -1,3 +1,5 @@
__doc__ = "Functions for games Gwendolyn can play"
__all__ = ["checkBalance", "giveMoney", "addMoney","triviaCountPoints", "triviaStart", "triviaAnswer", "blackjackShuffle", "blackjackStart", "blackjackPlayerDrawHand", "blackjackContinue", "blackjackFinish", "blackjackHit", "blackjackStand", "blackjackDouble", "blackjackSplit", "parseFourInARow", "fourInARowAI"]
from .money import checkBalance, giveMoney, addMoney

View File

@ -1,3 +1,5 @@
__doc__ = "Gwendolyn functions for looking things up"
__all__ = ["spellFunc", "monsterFunc"]
from .lookupFuncs import spellFunc, monsterFunc

View File

@ -1,3 +1,5 @@
__doc__ = "Misc. functions for Gwendolyn"
__all__ = ["nameGen", "tavernGen", "movieFunc"]
from .generators import nameGen, tavernGen

View File

@ -1,3 +1,5 @@
__doc__ = "I stole this"
__all__ = ["roll_dice"]
from .dice import roll_dice

View File

@ -1,3 +1,5 @@
__doc__ = "Functions related to the Star Wars TTRPG"
__all__ = ["parseChar", "parseRoll", "critRoll", "parseDestiny"]
from .swchar import parseChar