Compare commits

...

2 commits

Author SHA1 Message Date
f709c286fa added .dockerignore and a Dockerfile
Signed-off-by: SpagettiFisch <johmewu@gmail.com>
2024-06-20 00:11:42 +02:00
6bf0b1e84b changed bot stop/shutdown command
Signed-off-by: SpagettiFisch <johmewu@gmail.com>
2024-06-20 00:10:59 +02:00
4 changed files with 22 additions and 2 deletions

5
.dockerignore Normal file
View file

@ -0,0 +1,5 @@
/config/
/data/
/modules/__pycache__
/whitelist/
/.gitignore

15
Dockerfile Normal file
View file

@ -0,0 +1,15 @@
# Basis-Image
FROM python:3.12-slim-bookworm
# Arbeitsverzeichnis setzen
WORKDIR /app
# Abhängigkeiten kopieren und installieren
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
# Anwendungsdateien kopieren
COPY . .
# Startbefehl
CMD ["python", "./main.py"]

View file

@ -46,6 +46,4 @@ async def allow(ctx:slash.Context, user:slash.Option(description="der zu whiteli
if await functions.isMod(ctx, bot):
await functions.cmdallow(ctx, user.strip(), bot)
bot.run(token)

View file

@ -3,6 +3,7 @@ import json
import requests
import urllib
import random
import asyncio
from os import path
from shutil import copyfile
@ -67,6 +68,7 @@ async def cmdshutdown(ctx:slash.Context, bot):
print('Start logging out')
await bot.logout()
bot.clear()
asyncio.run(bot.close())
print('Log Out succesful\nExiting')
exit()
else: