Skip to content

SirTimme/scriletio

Repository files navigation

Scriletio

docker badge postgresql badge discord badge gradle badge

Scriletio is a Discord bot that automatically
deletes your messages after a configured duration.


Table of contents

  1. Commands
  2. Self-hosting

Commands

Overview

Command Task
/register Registers yourself in the database
/autodelete add <channel> <duration> Adds an autodelete config for the specified channel
/autodelete get Displays an overview for all autodelete configs in this server
/autodelete update <channel> <duration> Updates an existing config with the specified duration
/autodelete delete Deletes an existing autodelete config
/delete Deletes all of your stored data from the database

/register

Parameter Type Required
- - -

Example:

register command


/autodelete add <channel> <duration>

Parameter Type Required
channel Textchannel true
duration String true

Important

For more information regarding the duration format click here.

Example:

autodelete add command


/autodelete get

Parameter Type Required
- - -

Example:

autodelete get command


/autodelete update <channel> <duration>

Parameter Type Required
channel Textchannel true
duration String true

Important

For more information regarding the duration format click here.

Example:


/autodelete delete

Parameter Type Required
- - -

Example:

autodelete delete command


/delete

Parameter Type Required
- - -

Caution

When clicking Accept all of your saved autodelete configs will be deleted.
This also means that the scheduled deletion of messages in these channels will be cancelled!

Example:

delete command


Duration format

Important

The duration format is structured as follows:
The duration is specified with a number, followed by a letter for the unit. These letters are permitted:

Letter Unit
D or d Day
H or h Hour
M or m Minute

The order of the units does not matter.
You can even specify multiple durations of the same unit (e.g. 3H3H). It is simply added together.

Examples:

  • 4D or 4d = 4 days
  • 2D3H or 2d3h = 2 days 3 hours
  • 1D5H3M or 1d5h3m = 1 day 5 hours 3 minutes

Self-hosting

Scriletio provides a Docker image for self-hosting purposes. It can be found in the DockerHub registry.

Important

This directory structure is needed for Scriletio to run:

/
├── compose.yml
└── .env

First, copy the .env.example to .env:

> cp .env.example .env

Fill in the following environment variables in the .env file:

BOT_TOKEN=                      # the token of the bot (copied from the Discord developer portal)
OWNER_ID=                       # the Discord user id of the owner (needed for owner-only commands)
POSTGRES_USER=                  # the username of the postgres account
POSTGRES_PASSWORD=              # the password of the postgres account
POSTGRES_DB=                    # the name of the database
POSTGRES_URL=                   # the postgres JDBC connection string

Start the Docker deployment:

docker compose up -d

About

Manage message deletion on a defined basis

Resources

License

Stars

Watchers

Forks