adding a method for getting a server's icon

This commit is contained in:
luke 2020-03-18 13:19:07 -07:00
parent d542ffd403
commit 8018d6bb02
2 changed files with 13 additions and 1 deletions

View File

@ -1,7 +1,7 @@
FROM python:3.6-buster AS builder
RUN apt-get update && apt-get install -y gcc python-pip
ADD app/requirements.txt /requirements.txt
RUN pip install -U pip && pip install -r requirements.txt
RUN pip install -U pip pylint && pip install -r requirements.txt
#stage 2
FROM python:3.6-alpine3.9
@ -10,6 +10,7 @@ RUN apk update && \
apk add --no-cache docker
COPY --from=builder /usr/local/lib/python3.6/site-packages /usr/local/lib/python3.6/site-packages
COPY --from=builder /usr/local/bin/pylint /usr/local/bin/pylint
ADD app /app
RUN printf "\n\nTesting your python code for errors\n\n" && \

View File

@ -208,6 +208,17 @@ async def on_message(message):
embed=generate_embed(embed_url=wallpaper.fcking_homepage())
)
if message.content.startswith('!icon'):
await client.send_message(
message.channel,
embed=generate_embed(
embed_title="Server icon for {}".format(message.server.name),
embed_url=message.server.icon_url,
embed_description="[Direct Link]({})".format(message.server.icon_url)
)
)
if message.content.startswith('!invite'):
# 3600 = 1 hour
invite = await client.create_invite(