Skip to content
This repository has been archived by the owner on Sep 1, 2024. It is now read-only.

Rodis-Infrastructure/poll-executioner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Poll Executioner

A simple app that will remove polls sent by users that do not have excluded roles (can be configured)

Important

The MESSAGE_CONTENT privileged gateway intent must be enabled in the developer portal.

Required permissions

The app must have the following permissions to function without any issues:

  • Manage Messages - Any channel the app needs to monitor for polls
  • View Channels - Any channel the app needs to monitor for polls
  • Send Messages - The logging channel
  • Embed Links - The logging channel

Configuration

Create a .env file in the root directory with the following contents:

# Your bot's token, you can get it from https://discord.com/developers/applications
DISCORD_TOKEN="TOKEN"

You must create a configuration file under the configs directory for every guild the app is in. The file name must be in the following format: GUILD_ID.yml or GUILD_ID.yaml. The contents of the file should be as follows:

ID of the channel where the app will log the removed polls:

logging_channel: "CHANNEL_ID"

IDs of the roles that will be able to bypass the app's restrictions:

excluded_roles: ["ROLE_ID"]

See example.yml for more info.

Startup

You could either use docker or bun to start up the app. For bun:

Install dependencies:

bun install

Start up the app:

bun start