Compare commits

..

No commits in common. "43a01a753ba9e2938f616ead079a92549bac6f17" and "3d0d38eb30b701011f93049e6415c16aab8aa92c" have entirely different histories.

5 changed files with 47 additions and 34 deletions

View file

@ -4,44 +4,52 @@ steps:
- name: docker - name: docker
image: plugins/docker image: plugins/docker
settings: settings:
registry: git.ar21.de
username: username:
from_secret: REGISTRY_USER from_secret: DOCKER_USERNAME
password: password:
from_secret: REGISTRY_PASS from_secret: DOCKER_PASSWORD
repo: git.ar21.de/secondhemd/shbot repo: 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: REGISTRY_USER from_secret: DOCKER_USERNAME
password: password:
from_secret: REGISTRY_PASS from_secret: DOCKER_PASSWORD
repo: git.ar21.de/secondhemd/shbot repo: 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: REGISTRY_USER from_secret: DOCKER_USERNAME
password: password:
from_secret: REGISTRY_PASS from_secret: DOCKER_PASSWORD
repo: git.ar21.de/secondhemd/shbot repo: 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:
@ -53,10 +61,14 @@ 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:
@ -68,10 +80,11 @@ 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
when: event:
event: include:
- push - push

View file

@ -1,4 +1,4 @@
FROM amd64/python:3.11.3-alpine3.16 FROM python:3.10.5-alpine3.15
WORKDIR ./ WORKDIR ./
ARG PUID=1000 ARG PUID=1000

View file

@ -1,22 +1,22 @@
# SECOND BOT # SECOND BOT
[![Build Status](https://drone.ar21.de/api/badges/secondhemd/shbot/status.svg)](https://drone.ar21.de/secondhemd/shbot) [![pipeline status](https://git.cxservers.com/aaron-riedel/shbot/badges/master/pipeline.svg)](https://git.cxservers.com/aaron-riedel/shbot/-/commits/master)
der Bot für den SecondHemd Discord der Bot für den SecondHemd Discord
# Latest # Latest
## Build ## Build
``` ```
docker build -t secondhemd/shbot:latest . docker build -t docker-registry.cxservers.com/aaron-riedel/shbot:latest .
``` ```
## Run ## Run
``` ```
sudo docker run -e 'TOKEN=' -e 'PREFIX=$' -t secondhemd/shbot:latest sudo docker run -e 'TOKEN=' -e 'PREFIX=$' -t docker-registry.cxservers.com/aaron-riedel/shbot:latest
``` ```
## Docker compose ## Docker compose
``` ```
services: services:
bot: bot:
image: secondhemd/shbot:latest image: docker-registry.cxservers.com/aaron-riedel/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 secondhemd/shbot:dev . docker build -t docker-registry.cxservers.com/aaron-riedel/shbot:dev .
``` ```
## Run ## Run
``` ```
sudo docker run -e 'TOKEN=' -e 'PREFIX=$' -t secondhemd/shbot:dev sudo docker run -e 'TOKEN=' -e 'PREFIX=$' -t docker-registry.cxservers.com/aaron-riedel/shbot:dev
``` ```
## Docker compose ## Docker compose
``` ```
services: services:
bot: bot:
image: secondhemd/shbot:dev image: docker-registry.cxservers.com/aaron-riedel/shbot:dev
container_name: shbot container_name: shbot
restart: unless-stopped restart: unless-stopped
environment: environment:

6
bot.py
View file

@ -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 7 Tage nicht online waren", usage="") @bot.command(help="kickt Member ohne Rolle, die 30 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=7) deleted = await ctx.guild.prune_members(days=30)
await ctx.send(content='Ich habe {} Leiche(n) beseitigt.'.format(deleted), delete_after=5.0) await ctx.send(content='Ich habe {} Leichen beseitigt.'.format(deleted), delete_after=5.0)
else: else:
await question.delete() await question.delete()

View file

@ -1 +1 @@
py-cord==2.4.1 py-cord==2.0.0rc1