Categories
Linux system TTUtilities

How to Install and Set Up TTUtilities


How to Install and Set Up TTUtilities on $user

Author: Owen Macasu and Roel Cabante

Created on: October 28, 2024

Install these two packages: pip3 and unzip.

sudo apt install python3-pip
sudo apt install unzip

The user example for this tutorial is: bot.

  1. Log in to your terminal with sudo or root privileges.
  2. Create a user for another instance of this bot by typing:
    adduser bot
  3. Add the user bot to the sudo group by typing:
    usermod -aG sudo bot
  4. Add the user bot to the systemd profile by typing:
    loginctl enable-linger bot
  5. Log in now as the user you created (for example, bot).
  6. Download TTUtilities by typing this command:
    wget https://blindmasters.org/TTUtilities/TTUtilities-linux.zip
  7. Extract the downloaded file:
    unzip TTUtilities-linux.zip
  8. Change to the extracted directory by running:
    cd TTUtilities-linux
  9. Set up a virtual environment by running this command:
    python3 -m venv venv
  10. Activate the virtual environment by running:
    source venv/bin/activate
  11. Install the bot’s requirements by running:
    pip3 install -r requirements.txt --upgrade
  12. Make setup.sh executable by running:
    chmod +x setup.sh
  13. Run setup.sh to complete the bot configuration.
  14. Run the bot after installing all requirements. Do not close the terminal. You should search for a video to allow the bot to log in to your account. Use the command /p. This will not play anything on the first run; instead, you’ll see “yt-dlp” prompting you to go to the following link to add a new device: https://www.google.com/device. You should also see a code that you need to enter in your browser to complete the sign-in.
  15. Close the terminal and log in again using the username you created (for example, bot).
  16. Go to the .config folder by typing:
    cd ~/.config/
  17. Make a directory for systemd/user by typing:
    mkdir -p systemd/user/
  18. Using any SFTP client like FileZilla, upload pulseaudio.service and pulseaudio.socket.
  19. Create a new file by typing:
    nano .config/systemd/user/TTUtilities.service
  20. The service file should look like this. Edit it based on your preferences, but this time the username is bot:
    [Unit]
    Description=TTUtilities bot for TeamTalk
    
    [Service]
    Type=simple
    ExecStart=/home/bot/linux/venv/bin/python /home/bot/linux/TTUtilities.py
    Restart=on-failure
    Environment="CONFIG_FILE=/home/bot/linux/config.ini"
    WorkingDirectory=/home/bot/linux/
    StandardOutput=syslog
    StandardError=syslog
    
    [Install]
    WantedBy=default.target
  21. Enable and start the bot by running these two commands separately:
    systemctl --user enable TTUtilities.service
    systemctl --user start TTUtilities.service

That’s all! Enjoy!


Categories
TTUtilities

TT-utilities-updates

Bot Update Version 2.1.1

New in Version 2.1.1:

Hot fix update: Fixed some issues related to config creation on Linux.

New in Version 2.1.0:

This major update brings several new features and important changes:

  • New and improved method for creating config files. Windows users will have a GUI for creating config files, while Linux users will use the terminal.
  • Removed ipinfo.io and replaced it with a better service for detecting VPN users, fixing detection issues for European countries.
  • New weather information available with the /weather command.
  • Bot logs all errors to errors.log. Only errors are logged, no other data is included.
  • Randomized welcome messages introduced.
  • A new system for private channels with two users only. Commands: /private second_name to create a private channel, and more.
  • New offline messaging system. Commands: /pm username message to send offline messages, /messages to check pending messages.
  • New commands for retrieving all server users with their usernames. Useful for clients without this feature.
  • Added support for monitoring users when they log in, using Telegram bot tokens. Command: /notify nickname chat_id.
  • New commands for managing jailed users: /jails, /jail nickname, and /unjail nickname.
  • New customization commands for admins: /cn new_name, /cs status, /cg mode, and /save.
  • Added commands for retrieving country information: /who and /whoall.
  • New YouTube download command: /dl link to download and upload videos in .m4a format. Control deletion with a config setting.

Bug Fixes and Improvements:

  • Fixed issues with the duration kick system, now stores usernames and IPs more accurately.
  • Improvements to the weather info retrieval system.

Version 2.0.0:

This was a major update that introduced the following features:

  • Linux support: Tested on Ubuntu 22.0. The bot now works on Linux systems, but may still have some bugs.
  • Improved text-to-speech (TTS) system using Microsoft natural voices. Commands: /say, /get_voices, /voice, /rate, /pitch, /volume, /ld.
  • Smart ban and kick system: Commands for IP bans, username bans, and timed kicks.
  • Broadcast message command: /b message for authorized users.
  • Clear bans and kicks: /clear to remove bans for all or specific users.
  • New exclusion types for nicknames, usernames, and IPs in the exclusion section.
  • Better weather request handling to reduce redundant requests.
  • Improved reconnect system if the bot loses connection, trying to reconnect every 3 seconds.
Categories
TTUtilities

TTUtilities update: v1.2

greetings everyone!

new update for the TTUtilities bot!

  • Smart Jail: Now you can jail users by username, nickname, or both!
  • Specify Jail Channel: Choose a specific channel where jailed users will be sent.
  • Jail Flood Protection: If a jailed user joins other channels 3 times:
    • First offense: Warning
    • Further offenses: Banned and kicked from the server
  • Username vs. Nickname Jail: Jail usernames for accounts, nicknames for guest account.
  • **Fixed Speech File Error:** Resolved a permission issue when multiple users request “speech.mp3” simultaneously.
 
Live Chat

Hi, Your satisfaction is our top priority, we are ready to answer your questions...