An open API service indexing awesome lists of open source software.

https://github.com/drgitpos/reloc

Reloc is a simple Discord bot capable of moving and/or disconnecting users from voice channels.
https://github.com/drgitpos/reloc

bot discord

Last synced: 2 months ago
JSON representation

Reloc is a simple Discord bot capable of moving and/or disconnecting users from voice channels.

Awesome Lists containing this project

README

          

# Reloc

Reloc is a simple Discord bot capable of moving and/or disconnecting users from voice channels.

## Configurations

Reloc can be configured using the following environment variables

- `BOT_TOKEN` **(required)** - The bot token
- `CLIENT_ID` **(required)** - Client ID
- `BASE_COMMAND` **(optional)** - Slash command, default to `reloc`

## Running

- ### [Using Docker](#using-docker-1)
- ### [Using Docker Compose](#using-docker-compose-1)
- ### [Run from source](#run-from-source-1)

### Using Docker
```sh
docker run --rm \
-e BOT_TOKEN= \
-e CLIENT_ID= \
ghcr.io/vittee/reloc:latest
```

### Using Docker Compose
```yaml
name: reloc

services:
reloc:
image: ghcr.io/vittee/reloc:latest
environment:
- BOT_TOKEN=
- CLIENT_ID=
```

### Run from source
Simply clone or download this repository. Put the `BOT_TOKEN` and `CLIENT_ID` into a new file named `.env`

> .env
```
BOT_TOKEN=
CLIENT_ID=
```

Make sure you have [Bun](https://bun.sh/) installed and then execute this command.

```sh
bun start
```

## Adding bot to your servers
Upon running, a URL is printed to the output. Simply follow that link.

## Available Commands

### `kick-all`
Disconnect all users from a voice channel.

```
/reloc kick-all
```

#### Arguments
- `channel1` **(required)** - A voice channel
- `channel2`...`channel5` **(optional)** - Voice channels
- `with-bot` **(optional)** - Normally, Reloc will not disconnect bot users unless this value is set to `True`
- `reason` **(optional)** - The reason for the disconnection

### `kick-role`
Disconnect all users having the specified role from all voice channels.

```
/reloc kick-role
```

#### Arguments
- `role1` **(required)** - The role for users to be disconnected
- `role2`..`role5` **(optional)** - The roles for users to be disconnected
- `with-bot` **(optional)** - Normally, Reloc will not disconnect bot users unless this value is set to `True`
- `reason` **(optional)** - The reason for the disconnection

### `move-all`
Move all users from a voice channel into a new channel.

```
/reloc move-all
```

#### Arguments
- `from1` **(required)** - A voice channel from which to move users
- `to` **(required)** - A voice channel to which users will be moved into
- `from2`...`from5` **(optional)** - Voice channels from which to move users
- `with-bot` **(optional)** - Normally, Reloc will not disconnect bot users unless this value is set to `True`

### `move-role`
Move all users having the specified role into a new channel.

```
/reloc move-role
```

#### Arguments
- `role1` **(required)** - The role for users to be moved
- `to` **(required)** - A voice channel to which users will be moved into
- `role2`..`role5` **(optional)** - The roles for users to be moved
- `with-bot` **(optional)** - Normally, Reloc will not disconnect bot users unless this value is set to `True`

### `annihilate` :warning:
Disconnect **all users** from all voice channels.

> [!WARNING]
> This command is server-wide, it disconnects **all users** from **all voice channels**.

```
/reloc annihilate
```

#### Arguments
- `with-bot` **(optional)** - Normally, Reloc will not disconnect bot users unless this value is set to `True`
- `reason` **(optional)** - The reason for the disconnection

### `marshal` :warning:
Move **all users** into a new voice channel.

> [!WARNING]
> This command is server-wide, it moves **all users** from **all voice channels**.

```
/reloc marshal
```

#### Arguments
- `to` **(required)** - A voice channel to which users will be moved into
- `with-bot` **(optional)** - Normally, Reloc will not disconnect bot users unless this value is set to `True`

### `kick`
Disconnect up to 10 users from all voice channels.

```
/reloc kick
```

#### Arguments
- `user1`...`user10` - List of users to be disconnected, at least `user1` must be specified
- `reason` **(optional)** - The reason for the disconnection

### `move`
Move up to 10 users into a new voice channel

```
/reloc move
```

#### Arguments
- `to` **(required)** - A voice channel to which users will be moved into
- `user1`...`user10` - List of users to be disconnected, at least `user1` must be specified

### `quit`
Kick yourself.

This is useful to leave a message when leaving from a voice channel.

### `protect`
Protect yourself from being kicked, the duration for the protection is random.

# Authors
- [Wittawas Nakkasem (vittee)](https://github.com/vittee)