Compare commits
No commits in common. "43a01a753ba9e2938f616ead079a92549bac6f17" and "3d0d38eb30b701011f93049e6415c16aab8aa92c" have entirely different histories.
43a01a753b
...
3d0d38eb30
5 changed files with 47 additions and 34 deletions
51
.drone.yml
51
.drone.yml
|
@ -1,47 +1,55 @@
|
|||
kind: pipeline
|
||||
name: deploy
|
||||
steps:
|
||||
- name: docker
|
||||
- name: docker
|
||||
image: plugins/docker
|
||||
settings:
|
||||
registry: git.ar21.de
|
||||
username:
|
||||
from_secret: REGISTRY_USER
|
||||
from_secret: DOCKER_USERNAME
|
||||
password:
|
||||
from_secret: REGISTRY_PASS
|
||||
repo: git.ar21.de/secondhemd/shbot
|
||||
from_secret: DOCKER_PASSWORD
|
||||
repo: secondhemd/shbot
|
||||
tags: latest
|
||||
when:
|
||||
branch:
|
||||
include:
|
||||
- master
|
||||
event:
|
||||
include:
|
||||
- push
|
||||
- name: docker-build
|
||||
image: plugins/docker
|
||||
settings:
|
||||
registry: git.ar21.de
|
||||
username:
|
||||
from_secret: REGISTRY_USER
|
||||
from_secret: DOCKER_USERNAME
|
||||
password:
|
||||
from_secret: REGISTRY_PASS
|
||||
repo: git.ar21.de/secondhemd/shbot
|
||||
from_secret: DOCKER_PASSWORD
|
||||
repo: secondhemd/shbot
|
||||
tags: latest
|
||||
dry_run: true
|
||||
when:
|
||||
branch:
|
||||
exclude:
|
||||
- master
|
||||
- master
|
||||
event:
|
||||
exclude:
|
||||
- push
|
||||
- name: dev docker
|
||||
image: plugins/docker
|
||||
settings:
|
||||
registry: git.ar21.de
|
||||
username:
|
||||
from_secret: REGISTRY_USER
|
||||
from_secret: DOCKER_USERNAME
|
||||
password:
|
||||
from_secret: REGISTRY_PASS
|
||||
repo: git.ar21.de/secondhemd/shbot
|
||||
from_secret: DOCKER_PASSWORD
|
||||
repo: secondhemd/shbot
|
||||
tags: dev
|
||||
when:
|
||||
branch:
|
||||
include:
|
||||
- dev
|
||||
event:
|
||||
include:
|
||||
- push
|
||||
- name: deploy
|
||||
image: appleboy/drone-ssh
|
||||
settings:
|
||||
|
@ -53,10 +61,14 @@ steps:
|
|||
port: 22
|
||||
command_timeout: 2m
|
||||
script:
|
||||
- cd /root && docker compose pull shbot && docker compose up -d shbot
|
||||
- cd /root && docker-compose pull shbot && docker-compose up -d shbot
|
||||
when:
|
||||
branch:
|
||||
include:
|
||||
- master
|
||||
event:
|
||||
include:
|
||||
- push
|
||||
- name: deploy dev
|
||||
image: appleboy/drone-ssh
|
||||
settings:
|
||||
|
@ -68,10 +80,11 @@ steps:
|
|||
port: 22
|
||||
command_timeout: 2m
|
||||
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:
|
||||
branch:
|
||||
include:
|
||||
- dev
|
||||
when:
|
||||
event:
|
||||
- push
|
||||
event:
|
||||
include:
|
||||
- push
|
|
@ -1,4 +1,4 @@
|
|||
FROM amd64/python:3.11.3-alpine3.16
|
||||
FROM python:3.10.5-alpine3.15
|
||||
|
||||
WORKDIR ./
|
||||
ARG PUID=1000
|
||||
|
|
14
README.md
14
README.md
|
@ -1,22 +1,22 @@
|
|||
# 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
|
||||
|
||||
# Latest
|
||||
## Build
|
||||
```
|
||||
docker build -t secondhemd/shbot:latest .
|
||||
docker build -t docker-registry.cxservers.com/aaron-riedel/shbot:latest .
|
||||
```
|
||||
## 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
|
||||
```
|
||||
services:
|
||||
bot:
|
||||
image: secondhemd/shbot:latest
|
||||
image: docker-registry.cxservers.com/aaron-riedel/shbot:latest
|
||||
container_name: shbot
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
|
@ -27,17 +27,17 @@ services:
|
|||
# Development
|
||||
## Build
|
||||
```
|
||||
docker build -t secondhemd/shbot:dev .
|
||||
docker build -t docker-registry.cxservers.com/aaron-riedel/shbot:dev .
|
||||
```
|
||||
## 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
|
||||
```
|
||||
services:
|
||||
bot:
|
||||
image: secondhemd/shbot:dev
|
||||
image: docker-registry.cxservers.com/aaron-riedel/shbot:dev
|
||||
container_name: shbot
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
|
|
12
bot.py
12
bot.py
|
@ -101,7 +101,7 @@ class Confirm(discord.ui.View):
|
|||
|
||||
@bot.slash_command(guild_ids=[261575556708040705])
|
||||
@commands.has_role(member_role)
|
||||
async def roll(ctx,
|
||||
async def roll(ctx,
|
||||
dice: Option(str, "Würfel den/die du werfen willst. z.B. W20, 3d6", default="W20"),
|
||||
):
|
||||
"""Rolle einen oder mehrere Würfel"""
|
||||
|
@ -134,7 +134,7 @@ async def roll(ctx,
|
|||
|
||||
@bot.slash_command(guild_ids=[261575556708040705])
|
||||
@commands.has_role(gm_role)
|
||||
async def gmroll(ctx,
|
||||
async def gmroll(ctx,
|
||||
dice: Option(str, "Würfel den/die du werfen willst. z.B. W20, 3d6", default="W20"),
|
||||
):
|
||||
"""Rolle einen oder mehrere Würfel verdeckt"""
|
||||
|
@ -178,7 +178,7 @@ class MyModal(Modal):
|
|||
original_message = await interaction.channel.fetch_message(self.message_id)
|
||||
for x in list(emojitext):
|
||||
await original_message.add_reaction(alphabet[x])
|
||||
|
||||
|
||||
|
||||
@bot.message_command(name="Emoji Text", guild_ids=[261575556708040705])
|
||||
@commands.has_role(member_role)
|
||||
|
@ -414,7 +414,7 @@ async def hiebe(ctx, *, arg):
|
|||
await user.create_dm()
|
||||
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()
|
||||
async def prune(ctx):
|
||||
await ctx.message.delete()
|
||||
|
@ -427,8 +427,8 @@ async def prune(ctx):
|
|||
await ctx.send(content="Zeit ausgelaufen", delete_after=5.0)
|
||||
elif view.value:
|
||||
await question.delete()
|
||||
deleted = await ctx.guild.prune_members(days=7)
|
||||
await ctx.send(content='Ich habe {} Leiche(n) beseitigt.'.format(deleted), delete_after=5.0)
|
||||
deleted = await ctx.guild.prune_members(days=30)
|
||||
await ctx.send(content='Ich habe {} Leichen beseitigt.'.format(deleted), delete_after=5.0)
|
||||
else:
|
||||
await question.delete()
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
py-cord==2.4.1
|
||||
py-cord==2.0.0rc1
|
||||
|
|
Loading…
Reference in a new issue