Assorted inspection updates

pull/47/head
bobloy 6 years ago
parent c675f1bad1
commit fa5898f771

@ -27,7 +27,7 @@ class Chatter(Cog):
default_global = {} default_global = {}
default_guild = {"whitelist": None, "days": 1} default_guild = {"whitelist": None, "days": 1}
path: pathlib.Path = cog_data_path(self) path: pathlib.Path = cog_data_path(self)
data_path = path / ("database.sqlite3") data_path = path / "database.sqlite3"
self.chatbot = ChatBot( self.chatbot = ChatBot(
"ChatterBot", "ChatterBot",

@ -391,10 +391,8 @@ class UbuntuCorpusTrainer(Trainer):
'**', '**', '*.tsv' '**', '**', '*.tsv'
) )
file_kwargs = {}
# Specify the encoding in Python versions 3 and up # Specify the encoding in Python versions 3 and up
file_kwargs['encoding'] = 'utf-8' file_kwargs = {'encoding': 'utf-8'}
# WARNING: This might fail to read a unicode corpus file in Python 2.x # WARNING: This might fail to read a unicode corpus file in Python 2.x
for file in glob.iglob(extracted_corpus_path): for file in glob.iglob(extracted_corpus_path):

@ -139,7 +139,8 @@ class ReactRestrict(Cog):
return member return member
def _get_role(self, guild: discord.Guild, role_id: int) -> discord.Role: @staticmethod
def _get_role(guild: discord.Guild, role_id: int) -> discord.Role:
""" """
Gets a role object from the given guild with the given ID. Gets a role object from the given guild with the given ID.

@ -64,7 +64,7 @@ class RecyclingPlant(Cog):
used["object"] used["object"]
) )
) )
reward = reward + 50 reward += 50
x += 1 x += 1
elif answer.content.lower().strip() == opp: elif answer.content.lower().strip() == opp:
await ctx.send( await ctx.send(
@ -72,7 +72,7 @@ class RecyclingPlant(Cog):
ctx.author.display_name ctx.author.display_name
) )
) )
reward = reward - 50 reward -= 50
elif answer.content.lower().strip() == "exit": elif answer.content.lower().strip() == "exit":
await ctx.send( await ctx.send(
"{} has been relived of their duty.".format(ctx.author.display_name) "{} has been relived of their duty.".format(ctx.author.display_name)

Loading…
Cancel
Save