updates to the updated bot and changing storage driver
This commit is contained in:
parent
55911e515b
commit
1357a1f3ef
@ -5,7 +5,7 @@ services:
|
|||||||
command: ["dockerd-entrypoint.sh"]
|
command: ["dockerd-entrypoint.sh"]
|
||||||
variables:
|
variables:
|
||||||
DOCKER_TLS_CERTDIR: ""
|
DOCKER_TLS_CERTDIR: ""
|
||||||
DOCKER_DRIVER: overlay
|
DOCKER_DRIVER: overlay2
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- linting
|
- linting
|
||||||
|
@ -1,14 +0,0 @@
|
|||||||
FROM python:3.6.2-alpine3.6
|
|
||||||
ADD app/requirements.txt /requirements.txt
|
|
||||||
RUN apk update && \
|
|
||||||
apk add --no-cache vim docker build-base && \
|
|
||||||
pip install -U pip && \
|
|
||||||
pip install pylint && \
|
|
||||||
pip install -r requirements.txt
|
|
||||||
|
|
||||||
ADD app /app
|
|
||||||
RUN printf "\n\nTesting your python code for errors\n\n" && \
|
|
||||||
pylint -E /app/*.py
|
|
||||||
|
|
||||||
WORKDIR /app
|
|
||||||
RUN printf "\n#########################\n Run dragon bot by typing \n python dragon-bot.py\n#########################\n\n"
|
|
@ -60,4 +60,23 @@ async def purge(ctx):
|
|||||||
return
|
return
|
||||||
await ctx.message.channel.purge(limit=num, check=is_me)
|
await ctx.message.channel.purge(limit=num, check=is_me)
|
||||||
|
|
||||||
|
@bot.command(name='cleanup')
|
||||||
|
async def cleanup(ctx):
|
||||||
|
def is_discord_bot(m):
|
||||||
|
return m.author == bot.user
|
||||||
|
|
||||||
|
num = 20
|
||||||
|
if len(ctx.message.content.split()) > 1:
|
||||||
|
try:
|
||||||
|
num = int(ctx.message.content.split()[1]) + 1
|
||||||
|
except ValueError:
|
||||||
|
await ctx.send(
|
||||||
|
ctx.message.channel,
|
||||||
|
"You need to give me a number, you entered {}".format(
|
||||||
|
ctx.message.content.split()[1]
|
||||||
|
)
|
||||||
|
)
|
||||||
|
return
|
||||||
|
await ctx.message.channel.purge(limit=num, check=is_discord_bot)
|
||||||
|
|
||||||
bot.run(TOKEN)
|
bot.run(TOKEN)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user