Compare commits
2 commits
4a091fd9fd
...
f709c286fa
| Author | SHA1 | Date | |
|---|---|---|---|
| f709c286fa | |||
| 6bf0b1e84b |
4 changed files with 22 additions and 2 deletions
5
.dockerignore
Normal file
5
.dockerignore
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
/config/
|
||||||
|
/data/
|
||||||
|
/modules/__pycache__
|
||||||
|
/whitelist/
|
||||||
|
/.gitignore
|
||||||
15
Dockerfile
Normal file
15
Dockerfile
Normal 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"]
|
||||||
2
main.py
2
main.py
|
|
@ -46,6 +46,4 @@ async def allow(ctx:slash.Context, user:slash.Option(description="der zu whiteli
|
||||||
if await functions.isMod(ctx, bot):
|
if await functions.isMod(ctx, bot):
|
||||||
await functions.cmdallow(ctx, user.strip(), bot)
|
await functions.cmdallow(ctx, user.strip(), bot)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
bot.run(token)
|
bot.run(token)
|
||||||
|
|
@ -3,6 +3,7 @@ import json
|
||||||
import requests
|
import requests
|
||||||
import urllib
|
import urllib
|
||||||
import random
|
import random
|
||||||
|
import asyncio
|
||||||
|
|
||||||
from os import path
|
from os import path
|
||||||
from shutil import copyfile
|
from shutil import copyfile
|
||||||
|
|
@ -67,6 +68,7 @@ async def cmdshutdown(ctx:slash.Context, bot):
|
||||||
print('Start logging out')
|
print('Start logging out')
|
||||||
await bot.logout()
|
await bot.logout()
|
||||||
bot.clear()
|
bot.clear()
|
||||||
|
asyncio.run(bot.close())
|
||||||
print('Log Out succesful\nExiting')
|
print('Log Out succesful\nExiting')
|
||||||
exit()
|
exit()
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue