@ -27,7 +27,7 @@ class Chatter(Cog):
default_global = {}
default_guild = {"whitelist": None, "days": 1}
path: pathlib.Path = cog_data_path(self)
data_path = path / ("database.sqlite3")
data_path = path / "database.sqlite3"
self.chatbot = ChatBot(
"ChatterBot",
@ -391,10 +391,8 @@ class UbuntuCorpusTrainer(Trainer):
'**', '**', '*.tsv'
)
file_kwargs = {}
# 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
for file in glob.iglob(extracted_corpus_path):
@ -139,7 +139,8 @@ class ReactRestrict(Cog):
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.
@ -64,7 +64,7 @@ class RecyclingPlant(Cog):
used["object"]
reward = reward + 50
reward += 50
x += 1
elif answer.content.lower().strip() == opp:
await ctx.send(
@ -72,7 +72,7 @@ class RecyclingPlant(Cog):
ctx.author.display_name
reward = reward - 50
reward -= 50
elif answer.content.lower().strip() == "exit":
"{} has been relived of their duty.".format(ctx.author.display_name)