Compare commits
47 commits
3d0d38eb30
...
43a01a753b
Author | SHA1 | Date | |
---|---|---|---|
43a01a753b | |||
2a46a54637 | |||
74fe90b242 | |||
f9c496d158 | |||
e753423957 | |||
ee561c5356 | |||
4a029f3bcd | |||
f6e2e961f1 | |||
b5ec9bac92 | |||
a0aa24bb41 | |||
b2f1c795e6 | |||
5fdf2b666c | |||
37c9f0376a | |||
b4fbdc7628 | |||
749190bc61 | |||
a34af09beb | |||
81f84dddf4 | |||
7fa890eb28 | |||
36b6077d02 | |||
b4116bf6a0 | |||
65a7e9048e | |||
498e23de92 | |||
d91151f931 | |||
e1d26c7bf9 | |||
533e45acae | |||
4abd730acb | |||
7ec7376405 | |||
a29054e176 | |||
c33714f2e7 | |||
fd7b680eb8 | |||
7cd2883dc0 | |||
2cb6af2062 | |||
34ad3b2d09 | |||
7efe4b3c13 | |||
2be135ec7b | |||
281ad8f957 | |||
314caeba44 | |||
84b8379926 | |||
f70f101aa5 | |||
1c09edb25b | |||
0c6f070d22 | |||
faa702ce05 | |||
6b9bb07e73 | |||
06f099ca18 | |||
0300720111 | |||
16eb5f4419 | |||
cdc56b3cfd |
5 changed files with 34 additions and 47 deletions
49
.drone.yml
49
.drone.yml
|
@ -4,52 +4,44 @@ steps:
|
||||||
- name: docker
|
- name: docker
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
settings:
|
settings:
|
||||||
|
registry: git.ar21.de
|
||||||
username:
|
username:
|
||||||
from_secret: DOCKER_USERNAME
|
from_secret: REGISTRY_USER
|
||||||
password:
|
password:
|
||||||
from_secret: DOCKER_PASSWORD
|
from_secret: REGISTRY_PASS
|
||||||
repo: secondhemd/shbot
|
repo: git.ar21.de/secondhemd/shbot
|
||||||
tags: latest
|
tags: latest
|
||||||
when:
|
when:
|
||||||
branch:
|
branch:
|
||||||
include:
|
|
||||||
- master
|
- master
|
||||||
event:
|
|
||||||
include:
|
|
||||||
- push
|
|
||||||
- name: docker-build
|
- name: docker-build
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
settings:
|
settings:
|
||||||
|
registry: git.ar21.de
|
||||||
username:
|
username:
|
||||||
from_secret: DOCKER_USERNAME
|
from_secret: REGISTRY_USER
|
||||||
password:
|
password:
|
||||||
from_secret: DOCKER_PASSWORD
|
from_secret: REGISTRY_PASS
|
||||||
repo: secondhemd/shbot
|
repo: git.ar21.de/secondhemd/shbot
|
||||||
tags: latest
|
tags: latest
|
||||||
dry_run: true
|
dry_run: true
|
||||||
when:
|
when:
|
||||||
branch:
|
branch:
|
||||||
exclude:
|
exclude:
|
||||||
- master
|
- master
|
||||||
event:
|
|
||||||
exclude:
|
|
||||||
- push
|
|
||||||
- name: dev docker
|
- name: dev docker
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
settings:
|
settings:
|
||||||
|
registry: git.ar21.de
|
||||||
username:
|
username:
|
||||||
from_secret: DOCKER_USERNAME
|
from_secret: REGISTRY_USER
|
||||||
password:
|
password:
|
||||||
from_secret: DOCKER_PASSWORD
|
from_secret: REGISTRY_PASS
|
||||||
repo: secondhemd/shbot
|
repo: git.ar21.de/secondhemd/shbot
|
||||||
tags: dev
|
tags: dev
|
||||||
when:
|
when:
|
||||||
branch:
|
branch:
|
||||||
include:
|
|
||||||
- dev
|
- dev
|
||||||
event:
|
|
||||||
include:
|
|
||||||
- push
|
|
||||||
- name: deploy
|
- name: deploy
|
||||||
image: appleboy/drone-ssh
|
image: appleboy/drone-ssh
|
||||||
settings:
|
settings:
|
||||||
|
@ -61,14 +53,10 @@ steps:
|
||||||
port: 22
|
port: 22
|
||||||
command_timeout: 2m
|
command_timeout: 2m
|
||||||
script:
|
script:
|
||||||
- cd /root && docker-compose pull shbot && docker-compose up -d shbot
|
- cd /root && docker compose pull shbot && docker compose up -d shbot
|
||||||
when:
|
when:
|
||||||
branch:
|
branch:
|
||||||
include:
|
|
||||||
- master
|
- master
|
||||||
event:
|
|
||||||
include:
|
|
||||||
- push
|
|
||||||
- name: deploy dev
|
- name: deploy dev
|
||||||
image: appleboy/drone-ssh
|
image: appleboy/drone-ssh
|
||||||
settings:
|
settings:
|
||||||
|
@ -80,11 +68,10 @@ steps:
|
||||||
port: 22
|
port: 22
|
||||||
command_timeout: 2m
|
command_timeout: 2m
|
||||||
script:
|
script:
|
||||||
- cd /root && docker-compose -f shbot-dev.yaml pull shbot-dev && docker-compose -f shbot-dev.yaml up -d shbot-dev
|
- cd /root && docker compose -f shbot-dev.yaml pull shbot-dev && docker compose -f shbot-dev.yaml up -d shbot-dev
|
||||||
when:
|
when:
|
||||||
branch:
|
branch:
|
||||||
include:
|
|
||||||
- dev
|
- dev
|
||||||
event:
|
when:
|
||||||
include:
|
event:
|
||||||
- push
|
- push
|
|
@ -1,4 +1,4 @@
|
||||||
FROM python:3.10.5-alpine3.15
|
FROM amd64/python:3.11.3-alpine3.16
|
||||||
|
|
||||||
WORKDIR ./
|
WORKDIR ./
|
||||||
ARG PUID=1000
|
ARG PUID=1000
|
||||||
|
|
14
README.md
14
README.md
|
@ -1,22 +1,22 @@
|
||||||
# SECOND BOT
|
# SECOND BOT
|
||||||
[![pipeline status](https://git.cxservers.com/aaron-riedel/shbot/badges/master/pipeline.svg)](https://git.cxservers.com/aaron-riedel/shbot/-/commits/master)
|
[![Build Status](https://drone.ar21.de/api/badges/secondhemd/shbot/status.svg)](https://drone.ar21.de/secondhemd/shbot)
|
||||||
|
|
||||||
der Bot für den SecondHemd Discord
|
der Bot für den SecondHemd Discord
|
||||||
|
|
||||||
# Latest
|
# Latest
|
||||||
## Build
|
## Build
|
||||||
```
|
```
|
||||||
docker build -t docker-registry.cxservers.com/aaron-riedel/shbot:latest .
|
docker build -t secondhemd/shbot:latest .
|
||||||
```
|
```
|
||||||
## Run
|
## Run
|
||||||
```
|
```
|
||||||
sudo docker run -e 'TOKEN=' -e 'PREFIX=$' -t docker-registry.cxservers.com/aaron-riedel/shbot:latest
|
sudo docker run -e 'TOKEN=' -e 'PREFIX=$' -t secondhemd/shbot:latest
|
||||||
```
|
```
|
||||||
## Docker compose
|
## Docker compose
|
||||||
```
|
```
|
||||||
services:
|
services:
|
||||||
bot:
|
bot:
|
||||||
image: docker-registry.cxservers.com/aaron-riedel/shbot:latest
|
image: secondhemd/shbot:latest
|
||||||
container_name: shbot
|
container_name: shbot
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
environment:
|
environment:
|
||||||
|
@ -27,17 +27,17 @@ services:
|
||||||
# Development
|
# Development
|
||||||
## Build
|
## Build
|
||||||
```
|
```
|
||||||
docker build -t docker-registry.cxservers.com/aaron-riedel/shbot:dev .
|
docker build -t secondhemd/shbot:dev .
|
||||||
```
|
```
|
||||||
## Run
|
## Run
|
||||||
```
|
```
|
||||||
sudo docker run -e 'TOKEN=' -e 'PREFIX=$' -t docker-registry.cxservers.com/aaron-riedel/shbot:dev
|
sudo docker run -e 'TOKEN=' -e 'PREFIX=$' -t secondhemd/shbot:dev
|
||||||
```
|
```
|
||||||
## Docker compose
|
## Docker compose
|
||||||
```
|
```
|
||||||
services:
|
services:
|
||||||
bot:
|
bot:
|
||||||
image: docker-registry.cxservers.com/aaron-riedel/shbot:dev
|
image: secondhemd/shbot:dev
|
||||||
container_name: shbot
|
container_name: shbot
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
environment:
|
environment:
|
||||||
|
|
6
bot.py
6
bot.py
|
@ -414,7 +414,7 @@ async def hiebe(ctx, *, arg):
|
||||||
await user.create_dm()
|
await user.create_dm()
|
||||||
await user.dm_channel.send("HIEBE :punch: von {}".format(ctx.author.display_name))
|
await user.dm_channel.send("HIEBE :punch: von {}".format(ctx.author.display_name))
|
||||||
|
|
||||||
@bot.command(help="kickt Member ohne Rolle, die 30 Tage nicht online waren", usage="")
|
@bot.command(help="kickt Member ohne Rolle, die 7 Tage nicht online waren", usage="")
|
||||||
@is_admin()
|
@is_admin()
|
||||||
async def prune(ctx):
|
async def prune(ctx):
|
||||||
await ctx.message.delete()
|
await ctx.message.delete()
|
||||||
|
@ -427,8 +427,8 @@ async def prune(ctx):
|
||||||
await ctx.send(content="Zeit ausgelaufen", delete_after=5.0)
|
await ctx.send(content="Zeit ausgelaufen", delete_after=5.0)
|
||||||
elif view.value:
|
elif view.value:
|
||||||
await question.delete()
|
await question.delete()
|
||||||
deleted = await ctx.guild.prune_members(days=30)
|
deleted = await ctx.guild.prune_members(days=7)
|
||||||
await ctx.send(content='Ich habe {} Leichen beseitigt.'.format(deleted), delete_after=5.0)
|
await ctx.send(content='Ich habe {} Leiche(n) beseitigt.'.format(deleted), delete_after=5.0)
|
||||||
else:
|
else:
|
||||||
await question.delete()
|
await question.delete()
|
||||||
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
py-cord==2.0.0rc1
|
py-cord==2.4.1
|
||||||
|
|
Loading…
Reference in a new issue