-
Notifications
You must be signed in to change notification settings - Fork 0
03. Slash Commands
TGraph Bot supports several slash commands that allow users to interact with the bot directly through Discord. This page details all available commands, their usage, and any associated permissions or rate limits.
- Description: Displays information about the bot, including its description, GitHub repository, and license.
-
Usage: Simply type
/about
in any channel where the bot is present. -
Example Response:
TGraph Bot is a Discord bot that generates and posts graphs based on Tautulli data. It provides insights into your media server usage, including daily play counts, play counts by day of the week, play counts by hour of the day, top 10 platforms, top 10 users, and play counts by month. GitHub: https://github.com/engels74/tgraph-bot-source License: AGPLv3
- Description: Allows viewing or editing the bot's configuration.
-
Usage:
- To view all settings:
/config view
- To view a specific setting:
/config view [key]
- To edit a setting:
/config edit [key] [value]
- To view all settings:
- Permissions: This command should be restricted to administrators only.
-
Rate Limiting:
- Individual users are subject to a cooldown period (configurable via
CONFIG_COOLDOWN_MINUTES
) - There's also a global cooldown affecting all users (configurable via
CONFIG_GLOBAL_COOLDOWN_SECONDS
)
- Individual users are subject to a cooldown period (configurable via
-
Example Usage:
/config view UPDATE_DAYS
/config edit ENABLE_DAILY_PLAY_COUNT true
-
Example Response:
Configuration updated. ENABLE_DAILY_PLAY_COUNT changed from false to true
- Note: Some configuration changes require a bot restart to take effect.
- Description: Generates and sends personalized graphs based on the user's Tautulli data.
-
Usage:
/my_stats [email]
-
Parameters:
-
email
: The email associated with the user's Plex account in Tautulli.
-
-
Rate Limiting:
- Individual users are subject to a cooldown period (configurable via
MY_STATS_COOLDOWN_MINUTES
) - There's also a global cooldown affecting all users (configurable via
MY_STATS_GLOBAL_COOLDOWN_SECONDS
)
- Individual users are subject to a cooldown period (configurable via
-
Example Usage:
/my_stats [email protected]
-
Example Response:
Your personal statistics have been sent via private message.
- Description: Manually triggers the bot to update and post the graphs.
-
Usage: Type
/update_graphs
to force an immediate update of all graphs. - Permissions: This command should be restricted to administrators or trusted roles to prevent abuse.
-
Rate Limiting:
- Individual users are subject to a cooldown period (configurable via
UPDATE_GRAPHS_COOLDOWN_MINUTES
) - There's also a global cooldown affecting all users (configurable via
UPDATE_GRAPHS_GLOBAL_COOLDOWN_SECONDS
)
- Individual users are subject to a cooldown period (configurable via
-
Example Response:
Graphs updated and posted. Next update: <t:1234567890:R>
- Description: Shows how long the bot has been running.
-
Usage: Type
/uptime
to see the bot's current uptime. -
Example Response:
Bot has been running for 3 days, 7 hours, 22 minutes, and 15 seconds.
All commands with rate limiting have two types of cooldowns:
- Personal Cooldown: Affects individual users
- Global Cooldown: Affects all users
These cooldowns are configurable through the bot's configuration file. If a user attempts to use a command too frequently, they will receive a message indicating when they can use the command again.
It's crucial to set up proper permissions for sensitive commands like /config
and /update_graphs
. These commands should typically be restricted to administrators or trusted roles to prevent misuse.
The bot will automatically warn server administrators if these critical commands are accessible to all members or have no specific permissions set.
For information on how to set up command permissions, please refer to the Managing Bot Permissions page.