Skip to content
/ Turbo Public

Turbo 2.0 - Discord Bot forked from @jaydenkieran (Use his as this repo is very outdated)

License

Notifications You must be signed in to change notification settings

mdod/Turbo

Repository files navigation

🚀 Turbo - Discord Bot

Note: Turbo works as a selfbot or a regular bot, however it doesn't allow configuring permissions (e.g who can use commands). To use it as a standalone bot, create an oAuth application and set bot=True in config.ini.

Turbo is a Discord bot powered by discord.py, which runs alongside your user account to help you perform many functions, including easily evaluating Python code, checking the servers that an emoji is on, getting all users with a certain discriminator, and much more!

Please note that I did not create this bot. jaydenkieran is the original creator of Turbo. I have only modified and added to his bot.

#Easy Install

Run these commands in a Command Prompt / Terminal application

  • Clone the bot using Git:
git clone https://github.com/mdod/Turbo.git -b master
  • cd into the Turbo folder:
cd Turbo
  • Install required dependencies:
python -m pip install -r requirements.txt
  • Copy all of the files from /config/examples to /config

    In the config.ini file:

    • Insert you or your Bot's token
    • If you are using a bot account, set Bot = to yes
    • [Optional] Set your preferred command prefix (Default is $)
    • [Optional] Obtain API Keys for any APIs you would like to use with Turbo

    [Optional] In the responses.json file:

    • Add responses (If Autoresponses = yes in config.ini, a message will be sent by the bot each time a trigger message is sent by a user.)

      Responses are set like this:

      "Channel ID": {
          "Trigger": "Response"
      }
      

      More info about responses can be found a little further down

    [Optional] In the tags.json file:

    • Add tags (Responses sent by the bot each time a user sends $tag <tag name> in chat)

      Tags are set like this:

      {
          "tag name": "response"
      }
      
  • Run the bot:

    • On Windows: Open run.bat (this will set console to UTF-8, fixing unicode encoding)
    • On Linux: Run python run.py

Requirements

The following are Python dependencies, inside requirements.txt:

You can install them using:

python -m pip install -r requirements.txt

If you're on Windows, you can run update_deps.bat instead.

More-Detailed Usage Instructions

Start by copying all of the files from /config/examples to /config. The bot does this automatically if the files don't exist

In the configuration file (config.ini), change the Token to your account's token. As you should be using your own account, your token is obtainable via localStorage.token in the Web Inspector (CTRL + SHIFT + I) on the Discord client.

The Bot boolean determines whether you are using a user account or a bot account. This should be no, but if you decide to use the bot standalone (see warning at the top of this file), this will be yes.

Other options:

  • Prefix - The prefix used before all of the bot's commands
  • Messages - The amount of messages for the client to cache (for use in $echo)
  • Flip - Comma seperated list of possible responses to the $flip command
  • Color - A color for Colorama to use for logging
  • Autorespond - Boolean for if the bot's autoresponding feature is enabled or not
  • Moderator - Comma seperated list of user IDs that can use the $disable command in emergencies
  • For API-specific options, see apis.md.

There are two files in JSON format which allow for adding tags and autoresponses. Bare in mind: Autoresponses are bad practice in selfbots and should not be used in a public server, only private ones. Either of these files can be deleted and the bot will function fine without them, though the $tag command won't work if tags.json is deleted, and autoresponses will never be triggered if responses.json doesn't exist.

To add autoresponses, use responses.json. Add the channel ID to send the message in as an object, and then the autoreponse's trigger and response. To add multiple autorespones for a channel, just put a , at the end of the line before making a new one. Example below.

{
    "84319995256905728": {
        "trigger": "response",
        "trigger2": "response2"
    }
}

To add tags, use tags.json. An example tag is already in the file when you downloaded the bot, which should make it easy for you to tell how to create more.

You can also blacklist user IDs from triggering autoresponses (or using the bot, if using it as a standalone one) by putting an ID on a new line in the blacklist.txt file.

Commands

  • 📎 $tag <name> - Triggers a tag
  • 📝 $addtag <name> <content> - Adds a new tag
  • ✏️ $removetag <name> - Removes a tag with given name
  • ✏️ $cleartags - Removes all tags
  • 📒 $tags - Lists all tags
  • 📒 $responses - Lists all autoresponses
  • 💾 $eval <code> - Allows you to evaluate Python code
  • 🔨 $discrim <discrim> - Displays all visible users with discriminator given
  • 👫 $emoji <emoji as string> - Displays information about a custom emoji
  • ❄️ $snowflake <id> - Get the creation time in UTC of a Discord ID
  • 💭 $status <status> - Change the user's status
  • 🔤 $strike <text> - Strikes out text (replica of using ~~text~~)
  • 🔤 $bold <text> - Bolds text (replica of using **text**)
  • 🔤 $italics <text> - Italicalises text (replica of using *text*)
  • 💬 $quote - Returns a random famous quote
  • 👩 $yomama - Returns a random yomama joke
  • 🃏 $joke - Returns a random joke
  • 📖 $urbandictionary <word> - Returns the definition of the given word on Urban Dictionary
  • 🔁 $reload - Reloads the bot's JSON files (tags.json and responses.json)
  • 📣 $echo <id> - Echos a message via it's ID (must be saved in cache)
  • 📣 $messageinfo <id> - Shows information about a message
  • 🔃 $flip - Flips an imaginary object (such as a coin - heads or tails)
  • 🎲 $random <number> - Returns a random number between 1 and the number given
  • $weather <zipcode> - Get the current weather for a certain zipcode
  • 🌎 $serverregion <region> - Switch the server to a different region
  • 📛 $servername <name> - Rename the server
  • 🚫 $disable - Disables the bot temporarily
  • $enable - Re-enables the bot
  • $timer <minutes:seconds> - Starts a timer
  • $listtimers - Returns a list of all running timers
  • $time - Returns the current time
  • 📆 $date - Returns the current date
  • 🐱 $cat - Sends a random cat picture
  • 🎈 $holidays [country code] - Gets upcoming holiday info for country
  • 🔌 $githubuser <username> - Gets information about a GitHub user
  • 🎭 $generatename [gender] - Generates a random name
  • 🎮 $hearthinfo - Get information about the latest version of Hearthstone
  • 🎮 $owplayer <battletag> - Gets stats for an Overwatch player
  • 🎮 $steamuser <steamid> - Gets information about a Steam user

Development

You can fork this project and change things to make it your own, using the foundations that it is built upon. You should read the documentation for discord.py to learn more about the methods that can be used.

These methods exist to compliment various built-in discord.py methods:

  • safe_send_message(msg, content, delete_after) - Allows safe sending of a message. Checks for various exceptions. Can allow for deleting messages after a certain time.
  • safe_edit_message(msg, content, delete_after) - Allows safe editing of a message. Checks for various exceptions. Can allow for deleting messages after a certain time.
  • safe_delete_message(msg) - Allows safe deleting of a message. Checks for various exceptions.
  • safe_edit_server(server, **kwargs) - Allows safe editing of a server. Checks for various exceptions.

These methods are utility functions:

  • _check_bot(msg, str) - Checks if the bot is running on a bot account or user account. If user account, assume selfbot and edit the message. If oauth, assume standalone and send a message to the channel instead.
  • _delete_msg(msg, time) - Deletes a message after a period of time (in seconds)
  • _request(url, **kwargs) - Sends a HTTP request to a URL

The following decorators can be used:

  • @no_private - Disallows a command being used in a PrivateChannel
  • @mashape - Wrapper for commands that require the Mashape API key set in the config

These exceptions can be raised:

  • FatalError - Raised when the bot encounters an error that means it cannot continue

License

This project is licensed under the MIT License. It is available in LICENSE.md.

For API-specific credits, see apis.md.

About

Turbo 2.0 - Discord Bot forked from @jaydenkieran (Use his as this repo is very outdated)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published