Skip to content

Blackstonecoden/global-chat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Global Chat Logo

Global Chat

Discord

📌 Information

This is an open-source code for a Discord Global-Chat. It allows you to have a cross-server chat just by using this app. Key features:

  • global-chat
  • message deletion
  • mute users
  • custom roles
  • localization (de/en)

🔌 Requirements

🔧 Installation

Download the latest release from this repository. Setup the .env file in the root direcotry and fill it with your cridentials.

.env
TOKEN = nGRuiORASD

database_host = 1.1.1.1:3306
database_user = user
database_password = password
database_name = s128_bot

Create the config.json. Here is the reference.

config.json
{
    "admin_guild_id": 1234,
    "support_server_url": "https://discord.gg/1234",
    "app_invite_url": "https://example.com",

    "custom_app_status": "Hello, world!",

    "channels": {
        "reports": 1234
    },

    "roles": {
        "staff": {
            "permission_level": 0,
            "name": "Staff",
            "emoji": "<:staff:1234>",
            "color": "0x7289da"
        },
        "admin": {
            "permission_level": 10,
            "name": "Admin",
            "emoji": "<:admin:1234>",
            "color": "0x7289da"
        },
        "moderator": {
            "permission_level": 5,
            "name": "Moderator",
            "emoji": "<:moderator:1234>",
            "color": "0x7289da"
        },
        "partner": {
            "permission_level": 0,
            "name": "Partner",
            "emoji": "<:partner:1234>",
            "color": "0x7289da"
        },
        "verified": {
            "permission_level": 0,
            "name": "Verified",
            "emoji": "<:verified:1234>",
            "color": "0x7289da"
        },
        "default": {
            "permission_level": 0,
            "name": "Default",
            "display_name": "",
            "color": "0x4e5058"
        }
      },
    
    "emojis": {
        "x_circle_red": "<:emoji:1234>",
        "clock_red": "",

        "alert_yellow": "",
        "file_text_yellow": "",

        "check_circle_green": "",
        "plus_circle_green": "",

        "users": "",
        "file_text": "",
        "bar_chart": ""
    },
    "standard_server_icon_url": "https://discord.com/assets/ca24969f2fd7a9fb03d5.png"
}

📄 Notes

To assign yourself a role, you have two options:

  1. Log into the database using a client like MySQL Workbench and manually insert your user ID, role, and display role into the user_roles table.

  2. Alternatively, temporarily add the following code in the setup_hook of the Client class in main.py and replace 1234 with your user ID:

    from database.models import UserRole
    UserRole(1234).change("admin")

Ensure that you have a permission level of at least 10 to use all commands.