Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Wargamer-Senpai committed Jun 2, 2023
2 parents 9eeb746 + 29b62bc commit 16ea799
Showing 1 changed file with 102 additions and 11 deletions.
113 changes: 102 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
▶️ <a href="https://github.com/Wargamer-Senpai/teampy/wiki#setup">Setup</a> |
<a href="https://github.com/Wargamer-Senpai/teampy">GitHub</a> |
<a href="https://github.com/Wargamer-Senpai/teampy/wiki">Documentation</a> |
<a href="#roadmap">Roadmap</a>
<a href="#roadmap">Roadmap</a>|
<a href="https://hub.docker.com/r/wargamersenpai/teampy">Docker Hub</a>

[![GitHub release (latest by date)](https://img.shields.io/github/v/release/wargamer-senpai/teampy?color=blueviolet&logoColor=blueviolet&logo=github&style=flat-square)]()
[![GitHub all releases](https://img.shields.io/github/downloads/wargamer-senpai/teampy/total?label=Downloads&color=blue&logo=github&logoColor=blue&style=flat-square)]()
Expand All @@ -18,29 +19,118 @@
you can test the bot yourself, just add `teampy@myteamspeak.com` to your contacts

# How to Setup

## Requirments
<a href="#methode-1-docker-run">Methode 1: docker run</a><br>
<a href="#methode-2-docker-compose">Methode 2: docker-compose</a><br>
<a href="#methode-3-manuell-installation">Methode 3: Manuell Installation</a><br>

<br><br><br>
## Methode 1: docker run
create the local directorys for mounting into the container (logs is optional, but recommended)
```sh
mkdir -p /opt/teampy/configs
mkdir -p /opt/teampy/logs
```
run the container
```sh
docker run -d --name teampy --restart on-failure -v /opt/teampy/configs:/opt/teampy/configs -v /opt/teampy/logs:/opt/teampy/logs wargamersenpai/teampy:latest
```
now edit the config in the mounted directory
```
vi /opt/teampy/configs/config.py
```
enter the matrix username and password (you can get these with [TS5 Extractor](https://github.com/Gamer08YT/TS5Extractor))
```
...
matrix_username = aefaefaefaefaefa354354354354===
matrix_password = JkFpIopKKKtdf55uimne69
...
```
now you can start the container
```sh
docker start teampy
```

<br><br><br>
## Methode 2: docker-compose
create the local directorys for mounting into the container (logs is optional, but recommended)
```sh
mkdir -p /opt/teampy/configs
mkdir -p /opt/teampy/logs
```
create a `docker-compose.yml` with following content
```yml
version: '3'
services:
teampy:
image: wargamersenpai/teampy:latest
container_name: teampy
restart: on-failure
volumes:
- /opt/teampy/configs:/opt/teampy/configs
- /opt/teampy/logs:/opt/teampy/logs
```
now you can run docker-compose (in the same directory where the yml file is located)
```
docker-compose up -d
```
after that, edit the config in the mounted directory
```
vi /opt/teampy/configs/config.py
```
enter the matrix username and password (you can get these with [TS5 Extractor](https://github.com/Gamer08YT/TS5Extractor))
```
...
matrix_username = aefaefaefaefaefa354354354354===
matrix_password = JkFpIopKKKtdf55uimne69
...
```
now you can start the container
```sh
docker start teampy
```

<br><br><br>

## Methode 3: Manuell Installation
### Requirments
- Linux or Windows (works on both)
- Python 3.5 =<
- module requests required:
```sh
pip install requests
```

## Installation
### Installation
- Download latest Release from [Release Page](https://github.com/Wargamer-Senpai/teampy/releases)
- Place folder to your desired location
- move teampy.service into /etc/systemd/system
```sh
mv ./teampy.service /etc/systemd/system
```
- edit the `teampy.service` and adjust the directory where the `main.py` is located at
```sh
vi /etc/systemd/system/teampy.service
```
```sh
...
[Service]
ExecStart=/usr/bin/python3 /dir/to/main.py
...
```
- Open `config.py`
- Required:
- Enter matrix username and password (get these with the [TS5 Extractor](https://github.com/Gamer08YT/TS5Extractor))

- Optional:
- enter giphy api (can be optained freely from [developers giphy](https://developers.giphy.com/dashboard/))

- start main.py
- (soon with systemd service for Linux)

## Features
- start main.py with systemd service
```sh
systemctl enable --now teampy.service
```
<br><br><br>
# Features
- Current
- commands:
- `!gif` or `!gif <string>`, without search string will send a random gif
Expand All @@ -63,7 +153,8 @@ you can test the bot yourself, just add `teampy@myteamspeak.com` to your contact
- `!admin stats`, display gathered stats
- `!admin reload`, reload current config
- `!admin autojoin`, toggle auto join for rooms and direct chats on invite to on or off


<br><br><br>

## Roadmap
(everything is planned to be configureable)
Expand All @@ -72,9 +163,9 @@ OS Features<br>
|Features|Status|Finished|
|---|---|---|
|adding a setup.sh for easier setup on linux|planned|⬜️|
|adding systemd service |in Work|⬜️|
|adding systemd service |done||
|adding a .exe for windows for easier execution|planned|⬜️|
|adding a container image|in Work|⬜️|
|adding a container image|done||
<br>

General Features<br>
Expand Down

0 comments on commit 16ea799

Please sign in to comment.