🧹 More refactoring

This commit is contained in:
Nikolaj
2021-08-17 18:05:41 +02:00
parent 074a06e863
commit 573d081734
31 changed files with 1971 additions and 1787 deletions

View File

@ -6,7 +6,7 @@ class StarWarsChar():
def __init__(self, bot):
self.bot = bot
def getCharName(self, user : str):
def getChar_name(self, user : str):
self.bot.log("Getting name for "+self.bot.database_funcs.get_name(user)+"'s character")
userCharacter = self.bot.database["starwars characters"].find_one({"_id":user})
@ -239,7 +239,7 @@ class StarWarsChar():
return name, text1+text2+"\n\n"+text3+divider+text4+"\n"+divider+text5+text6+text7+text8
def charData(self,user : str,cmd : str):
def char_data(self,user : str,cmd : str):
userCharacter = self.bot.database["starwars characters"].find_one({"_id":user})
key = string.capwords(cmd.split(" ")[0])
@ -508,7 +508,7 @@ class StarWarsChar():
self.bot.database["starwars characters"].delete_one({"_id":user})
await ctx.send("Character for " + self.bot.database_funcs.get_name(user) + " deleted")
else:
await ctx.send(self.replaceWithSpaces(str(self.charData(user,cmd))))
await ctx.send(self.replaceWithSpaces(str(self.char_data(user,cmd))))
if returnEmbed:
em = discord.Embed(title = title, description = text, colour=0xDEADBF)