Skip to content

displays user online time in message embed within discord and allows you to access user details through an api. you can also use it to manage and create users on xray core directly from discord.

Notifications You must be signed in to change notification settings

AidinShekari/Xray-DiscordBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Xray-DiscordBot

Overview

Xray-DiscordBot is a Discord bot designed to interact with the Xray Core, allowing you to monitor the online status of users and manage user details directly from your Discord server. It integrates with the Xray-SaveLog project to provide real-time statistics and user management features.

Features

  • User Online Status: Check the online status of users connected to your Xray Core. ( Assign In Channel And Update ).
  • Add Clients: Use the /addclient command to add new users to your Xray Core.
  • User Statistics: Retrieve detailed statistics about users with the /userstats command.

Prerequisites

Before using this project, you need to set up the Xray-SaveLog project.

Installation

  1. Clone this repository to your local machine:

    git clone https://github.com/AidinShekari/Xray-DiscordBot.git
    cd Xray-DiscordBot
  2. Install the required dependencies:

    npm install
  3. Configure the bot by editing the config.json file:

    {
      "token": "Discord-Bot-Token",
      "guildId": "guildID",
      "channelId": "channelID",
      "apiUrl": "http://localhost:port",
      "destination": "paneldest",
      "messageId": "",
      "vpndbPath": "/root/vpndb.json",
      "username": "",
      "password": ""
    }
    • token: Your Discord bot token.
    • guildId: The ID of the Discord server where the bot will operate.
    • channelId: The ID of the Discord channel where the bot will post updates.
    • apiUrl: The URL of your 3x-ui dashboard.
    • destination: The panel destination (customize as per your setup).
    • messageId: Leave this blank or use it to specify a message ID for persistent bot messages.
    • vpndbPath: The path to your vpndb.json file.
    • username and password: Credentials for authenticating with your 3x-ui dashboard.

Usage

Once the bot is up and running, you can interact with it using the following commands in your Discord server:

  • /addclient: Add a new client to the Xray Core.
  • /userstats: Get detailed statistics for a specific user.

image

image

About

displays user online time in message embed within discord and allows you to access user details through an api. you can also use it to manage and create users on xray core directly from discord.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published