PantomInach / DataBot

Discord Bot to track users on guilde and other guilde features
GNU General Public License v3.0
3 stars 0 forks source link

DataBot

Want to track the time your members spend on your Discord server? Then look no further. With this Discord bot, you can track the talking time and the sent messages with an included leveling system. To see the users stat's, the bot provides an interactive leaderboard, which you can sort by different aspects. Also, the bot provides many other features, to handle operations for your server: Giving roles via reactions, make polls, dynamic voicechannels, … With the unique subserver feature of the bot, there is no need to split up the server into many other smaller ones. Instead, create a subserver to create individual spaces for many parts of your community, so that there can exist shielded from others parts of your server.

Features

Leveling system

Requirements

You need Python Version 3.6 or newer. The requirements must be installed via pip3 install -r requirements.txt.
That's it.

Installation

Run git clone https://github.com/PantomInach/DataBot.git in your installation folder or download the repository manually.

Create a bot

Create a Discord Application on the site https://discord.com/developers/applications. Make sure "Presence Intent", "Server Members Intent" and "Message Content Intent" are enabled in Privileged Gateway Intents under the Bot tab. Then copy the token to the specified space in the data/config.json file. More to the config file in Configuration. Also add your guild in the "server" space and your Discord ID in "owner". Now you need to invite the Bot to your guild. Use https://discord.com/oauth2/authorize?client_id=INSERT_CLIENT_ID_HERE&scope=bot&permissions=2416143440 after replacing "INSERT_CLIENT_ID_HERE" with your Bots client ID under the tab OAuth2. The bot is now created and invited to your server.

Configuration

Bot config

The main config file can be found here config in the directory data.

{
      "token": "Your token",
      "command_prefix": "+",
      "log": "False",
      "logchannel": "",
      "levelchannel": "",
      "owner": "",
      "textCooldown": "75",
      "privilege": {
            "Your ID": "2",
            "Lower rank ID": "1"
      },
      "guild": "Your guild ID",
      "serverVoiceBlacklist": [
            "0"
      ],
      "serverTextWhitelist": [
            "0"
      ],
      "roles": ["rolename1", "rolename2", "rolename3"],
      "rolesXPNeed": ["1", "10", "20"],
      "needForSubServer": ["rolename"]
}

Command config

The command config is for specifying what command should work in which text channel or be invokable by which user with certain roles. The config file commandRights.json can be found in the directory data. An entry contains the following:

"command name":
  {
    "roles":[
      "roles which are required",
      "id or name"
    ],
    "channel":[
      "in which channel is the command invokable",
      "id or name"
    ]
  }