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
news

TTUtilities updates


What’s New in Version 1.6

Version 1.6

In this update, we’ve focused on enhancing code stability, fixing bugs, and introducing a few small features.

Due to changes in the ipinfo.io service used for VPN detection, some accounts no longer receive the VPN flag. If your account lacks this flag, the bot will now notify you instead of remaining unresponsive. Previously, this major bug caused the bot to hang if the flag wasn’t available.

Additionally, when the bot is kicked from the server, it will now log back in automatically and send a broadcast notification.

Performance improvements have been made, resulting in faster connections and logins to your server.

Version 1.5

We’ve added a new translation mode called “Private Translation.” Activate it using the command /pt source_lang target_lang. Messages sent in this mode are translated and sent directly to the channel in the format: user1 says: translated message.

This mode allows private translations without direct channel postings and includes separate settings for each user, enabling personalized source and target language preferences.

Version 1.4

This update brings numerous bug fixes and exciting new features:

  • Change the bot’s gender and status.
  • Live translation of channel and broadcast messages with the command /t source_lang target_lang (e.g., /t ar en for Arabic to English translation).
  • Implemented a 10-second cooldown timer for live translation to prevent spam.

Various bugs have been fixed, including issues with missing configuration parts in the config file. Now, if a configuration error occurs, the app will prompt you to recreate the config file and display the error message before quitting.

We’ve also fixed bugs related to incorrect values in the config file, such as setting the port number to characters instead of numbers.


 
Live Chat

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