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

https://github.com/detjensrobert/twitchhoisterbot

Discord bot to give marked streamers a hoisted role when they start streaming.
https://github.com/detjensrobert/twitchhoisterbot

Last synced: 4 months ago
JSON representation

Discord bot to give marked streamers a hoisted role when they start streaming.

Awesome Lists containing this project

README

        

# Twitch Hoister

A Discord bot that gives a hoisted role to people currently streaming.

------------

## Overview

A moderator adds a user to be tracked by the bot with `!streamer add @USER`.

When a user goes live and is set to be tracked, the bot gives them a hoisted role while they are streaming.

The hoist can optionally be restricted to specific games in the config file.

> **Note:** This bot is not multi-guild aware! If this bot is added to multiple servers, things may not work. If you
> want to use this bot in multiple servers, use a separate instance for each.

------------

## Usage

- `!s add @USER`

Adds @USER to the verfied streamers list. Restricted to a moderator role.

- `!s remove @USER`

Removes @USER from the verfied streamers list. Restricted to a moderator role.

- `!s list (pagenum)`

Lists all streamers known to the bot alphabetically.

- `!s live`

Lists any streamers that are currently live and hoisted.

------------

## Setup

Main file is `hoister.js`. `npm start` will start the bot.

> ⚠️ **Note:** This bot requires the Presence privileged gateway intent. You can enable this on your [bot application
> page](https://discord.com/developers/applications).

Bot token goes in `token.json`. Create if not present:

```json
{
"token": "PUT_YOUR_TOKEN_HERE"
}
```

A partial example of `config.json` is provided below. Be sure to set the role IDs and optionally the game list. If you
do not want the hoist to be restricted to specific games, set `gameRestrict` to `false`. Make sure the games in the list
match the name of the game as shown in the user popout!

```json
{
"prefix": "!s",

"gameRestrict": true,
"games": [
"Minecraft",
"Dolphin Emulator",
"Pokémon Sword/Shield"
],

"roles": {
"moderator": "MODERATOR_ROLE_ID",
"streaming": "STREAMING_ROLE_ID"
}
}
```

> ⚠️ **Note:** The streaming role **must be below the bot's role** in order for the bot to be able to assign it!
> ![](https://i.imgur.com/1JV0iMa.png)