https://github.com/mightybroccoli/tsgroupassigner
TeamSpeak date based group assigner
https://github.com/mightybroccoli/tsgroupassigner
datetime teamspeak-query teamspeak3 teamspeak3-bot
Last synced: 3 months ago
JSON representation
TeamSpeak date based group assigner
- Host: GitHub
- URL: https://github.com/mightybroccoli/tsgroupassigner
- Owner: mightyBroccoli
- License: gpl-3.0
- Created: 2019-12-11T16:33:33.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-04-29T21:35:05.000Z (about 4 years ago)
- Last Synced: 2025-03-01T08:11:33.697Z (3 months ago)
- Topics: datetime, teamspeak-query, teamspeak3, teamspeak3-bot
- Language: Python
- Size: 47.9 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# TeamSpeak GroupAssigner
[](https://pypi.python.org/pypi/TSGroupAssigner)
[](https://pypi.python.org/pypi/TSGroupAssigner)
[](https://www.codefactor.io/repository/github/mightybroccoli/TSGroupAssigner)## Overview
TSGroupAssigner is a module which allows to automatically assign server groups to voice clients, if they connect within
a specific date range.### example
This small example script could be called before christmas to assign the group `24` to every voice client connecting
to the server id `1`.
The process will terminate gracefully, when the configured date range is exceeded.```python
import datetime as dt
import logging
from TSGroupAssigner import GroupAssigner, DateExceptionlogger = logging.getLogger()
logger.setLevel(logging.INFO)params = {
'host': 'localhost',
'port': 10011,
'user': 'serveradmin',
'password': '5up3r_53cr37',
'sid': 1,
'gid': 24
}target = dt.date(year=2020, month=2, day=14)
duration = dt.timedelta(days=2)try:
GroupAssigner(date=target, nick="James", delta=duration, **params).start()
except DateException as err:
logger.error(err)
```