Skip to content
This repository was archived by the owner on Feb 13, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@ FROM python:3.9-slim
ENV PIP_NO_CACHE_DIR=false \
POETRY_VIRTUALENVS_CREATE=false

# Git is required to install a pinned version of d.py master
RUN apt-get update && apt-get install -y \
git \
&& rm -rf /var/lib/apt/lists/*

# Install poetry
RUN pip install -U poetry

Expand Down
2 changes: 1 addition & 1 deletion bot/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ async def send_log(self, title: str, details: str = None) -> None:
return

embed = Embed(description=details)
embed.set_author(name=title, icon_url=self.user.avatar.url)
embed.set_author(name=title, icon_url=self.user.display_avatar.url)

await dev_log.send(embed=embed)

Expand Down
2 changes: 1 addition & 1 deletion bot/exts/recruitment/nominations.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
)

# When nominations are posted manually, the Discord message box standarises the unicode emojis to :thumbsup:
NOMINATION_ENDING_TEXT = "react 👍 for approval, or 👎 for disapproval*."
NOMINATION_ENDING_TEXT = "react :+1: for approval, or :-1: for disapproval*."


class Nominations(commands.Cog):
Expand Down
5 changes: 4 additions & 1 deletion bot/utils/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,10 @@ def predicate(message: discord.Message) -> bool:
return thread

logger.info("Message not found in either cache, fetching all threads...")
for thread in await channel.active_threads():
for thread in await channel.guild.active_threads():
if thread.parent != channel:
continue

if await _check_first_message_referencing(thread, message_id):
logger.info("Thread found in fetched threads!")
return thread
Expand Down
2 changes: 1 addition & 1 deletion config-default.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
bot:
prefix: "&"
token: !ENV "BOT_TOKEN"
token: !ENV "BOT_TOKEN"
name: "Thread Bot"

stats:
Expand Down
158 changes: 144 additions & 14 deletions poetry.lock

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ license = "MIT"

[tool.poetry.dependencies]
python = "^3.9.6"
statsd = "^=3.3.0"
"discord.py" = { git = "https://github.com/Rapptz/discord.py.git", branch = "master", rev = "1e17b7f"}
statsd = "^3.3.0"
"discord.py" = {url = "https://github.com/Rapptz/discord.py/archive/master.zip"}
loguru = "^0.5.3"
pyyaml = "^=5.4.1"
pyyaml = "^5.4.1"
more-itertools = "^8.8.0"
aiodns = "^3.0.0"

[tool.poetry.dev-dependencies]
flake8 = "^3.9.2"
Expand Down