Skip to content

Commit

Permalink
Merge pull request #212 from Lifeismana/pr
Browse files Browse the repository at this point in the history
Chatter: Support red 3.5
  • Loading branch information
bobloy authored Apr 19, 2024
2 parents 976144c + 6138b4b commit 20a0c03
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions chatter/chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,7 @@ async def on_message_without_command(self, message: discord.Message):
elif self._last_message_per_channel[ctx.channel.id] is not None:
last_m: discord.Message = self._last_message_per_channel[ctx.channel.id]
minutes = self._guild_cache[ctx.guild.id]["convo_delta"]
if (datetime.now(timezone.utc) - last_m.created_at).seconds > minutes * 60:
if (discord.utils.utcnow() - last_m.created_at).seconds > minutes * 60:
in_response_to = None
else:
in_response_to = last_m.content
Expand All @@ -731,7 +731,7 @@ async def on_message_without_command(self, message: discord.Message):
if not self._global_cache:
self._global_cache = await self.config.all()

if in_response_to is not None and self._global_cache["learning"]:
if in_response_to is not None and self._global_cache["learning"] and not channel.nsfw:
log.debug("learning response")
await self.loop.run_in_executor(
None,
Expand Down
6 changes: 3 additions & 3 deletions chatter/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
"hidden": true,
"install_msg": "Thank you for installing Chatter! Please make sure you check the install instructions at https://github.com/bobloy/Fox-V3/blob/master/chatter/README.md\nAfter that, get started ith `[p]load chatter` and `[p]help Chatter`",
"requirements": [
"git+https://github.com/bobloy/ChatterBot@fox#egg=ChatterBot>=1.1.0.dev4",
"git+https://github.com/bobloy/ChatterBot@fox#egg=ChatterBot>=1.1.0.dev5",
"kaggle",
"https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.1.0/en_core_web_sm-3.1.0.tar.gz#egg=en_core_web_sm",
"https://github.com/explosion/spacy-models/releases/download/en_core_web_md-3.1.0/en_core_web_md-3.1.0.tar.gz#egg=en_core_web_md"
"https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.4.1/en_core_web_sm-3.4.1.tar.gz#egg=en_core_web_sm",
"https://github.com/explosion/spacy-models/releases/download/en_core_web_md-3.4.1/en_core_web_md-3.4.1.tar.gz#egg=en_core_web_md"
],
"short": "Local Chatbot run on machine learning",
"end_user_data_statement": "This cog only stores anonymous conversations data; no End User Data is stored.",
Expand Down

0 comments on commit 20a0c03

Please sign in to comment.