# README

## Introduction

### XASM Bot is a Discord bot designed for ASA or ASE  server management. It provides features like server control, monitoring, updates, and backups. This README will guide you through the setup and configuration of XASM Bot and its related components.

# Set Up:

IF YOU DO NOT INTEND TO USE OR DO NOT HAVE AN CURSEFOR API KEY, DELETE THE Api.json FILE TO AVOID ISSUE

## Step 1: Creating a Discord Bot
Go to the  [Discord Developer Portal](https://discord.com/developers)
Click on "New Application", give it a name, and create the application.
Go to the "Bot" tab and click "Add Bot".
Copy the token shown under the "Token" section - this will be used in your bot configuration.

## Step 2: Enabling Intents
In the bot settings on the Discord Developer Portal, find the "Privileged Gateway Intents" section.
Enable the following intents:
GUILDS
GUILD_MESSAGES
MESSAGE_CONTENT
DIRECT_MESSAGES

## Step 3: Inviting Bot to Server
Under general Information copy the "APPLICATION ID"
Use the "APPLICATION ID"  and create a link that looks like this:
https://discord.com/oauth2/authorize?scope=bot&permissions=8&client_id=YOUR_APPLICATION_ID_GOES_HERE

## Step 4: Configuration File Setup
Edit the (config.json) with your server data and needed fields as described in the Commented_config.json

## Step 5: Server Configuration
In the servers array, configure each server you want to manage. Include details like server name, path, ports, and other settings as shown in the Commented_config.json.

## Step 6: Backup Configuration
In the backupConfig array, set up backup settings for each server. Define the source directory, backup directory, cron schedule for automated backups, and other parameters.

Step 7: Give Discord Permissions to your bot.
Give Read Messages
Give Read Message history
Give edit messages
Give Send messages
Give additional perms as needed


Step 8: Running the Bot
Execute your bot. Ensure your config.json file is in the same directory.

Additional Notes
Keep your bot token secure and never share it publicly.

Troubleshooting
If you encounter issues, check the following:

Bot token and permissions are correctly set up.
Intents are enabled for your bot.
Configuration settings are accurate and paths are valid.
Additionally you can run the Debug.bat file in the same folder as XASM.exe to obtain the error message if your bot is not starting
For further assistance, visit  [Our official support Discord](https://discord.gg/BhR5K2XBjZr)