Skip to content

Bot v1.1

Latest
Compare
Choose a tag to compare
@Newer1107 Newer1107 released this 19 Jul 18:00
· 6 commits to main since this release

Features:

Ping Command: Responds with "Pong!" when a user sends !ping command.

Hello Command: Greets the user who sends the command with a personalized message, using the user's name. The bot responds with "Hello, {user_name}!".

Uptime Command: Displays the server and bot uptime. When a user sends !uptime command, the bot responds with the server uptime and its own uptime.

Console Command Execution: The bot allows the owner (identified by their OWNER_ID) to execute console commands on the server. If the owner sends a command in a specific channel (identified by CHANNEL_ID), the bot processes the command, executes it in the server's terminal, and sends back the output as a message. If the output is too long to display, it notifies the user that the output is too long.

Restart Command: The bot provides a !restart command that allows the owner to restart the bot programmatically. The bot sends a "Restarting bot..." message and then restarts itself using the os.execv method.

System Info Command: The bot provides a !systeminfo command that retrieves system information, such as CPU usage, RAM usage, disk usage, network usage, and uptime. It sends an embedded message with the system information and an attached thumbnail image (arch.png).

Update Uptime Task: The bot includes a task called update_uptime that runs every 12 seconds. It updates the bot's presence with random activities, displaying the server and bot uptime as a "Watching" status.

Note: The bot requires environmental variables BOT_TOKEN, OWNER_ID, CHANNEL_ID, and LOG_FILE_LOCATION to be set in a .env file for proper execution. Additionally, it uses various Python libraries such as discord, os, subprocess, datetime, psutil, random, dotenv, sys, and File from discord to perform the mentioned functionalities. Make sure all dependencies are installed before running the bot.