# Bad-DiscordQueue

### All I ask

All I ask is that if you enjoy this resource, please give it a like on the forum page, on GitHub (if you have an account), and pop me a follow over on GitHub.

### What is it?

This is basically a discord queue for logging into a server. When you connect to the server, you get added to a queue. Depending on your priority, you can be at the back of the queue or added to the top automatically. This all depends on what discord roles you have considering it works off of priority numbers. I'm not the best at writing descriptions. I'll be honest, I personally am probably not going to use this script, but I had a lot of people request this script from me, so here it is. Why not increase my rep within the Fivem community?

### Badger's Discord Community

[![Developer Discord](https://discordapp.com/api/guilds/597445834153525298/widget.png?style=banner4)](https://discord.com/invite/WjB5VFz)

### Installation

{% embed url="<https://youtu.be/UUzSdQtJE4s>" %}

### Dependencies

{% embed url="<https://github.com/JaredScar/Badger_Discord_API>" %}

### Screenshots

![Queue Gif](https://i.gyazo.com/3606be50c8770850b86a83fd8efbec18.gif)

### Configuration

```
Config = {
	Default_Prio = 500000, -- This is the default priority value if a discord isn't found
	AllowedPerTick = 1, -- How many players should we allow to connect at a time?
	HostDisplayQueue = true,
	onlyActiveWhenFull = true,
	Displays = {
		Prefix = '[BadgerDiscordQueue]',
		ConnectingLoop = { 
			'🦡🌿🦡🌿🦡🌿',
			'🌿🦡🌿🦡🌿🦡',
			'🦡🌿🦡🌿🦡🥦',
			'🌿🦡🌿🦡🥦🦡',
			'🦡🌿🦡🥦🦡🥦',
			'🌿🦡🥦🦡🥦🦡',
			'🦡🥦🦡🥦🦡🥦',
			'🥦🦡🥦🦡🥦🦡',
			'🦡🥦🦡🥦🦡🌿',
			'🥦🦡🥦🦡🌿🦡',
			'🦡🥦🦡🌿🦡🌿',
			'🥦🦡🌿🦡🌿🦡',
		},
		Messages = {
			MSG_CONNECTING = 'You are being connected [{QUEUE_NUM}/{QUEUE_MAX}]: ', -- Default message if they have no discord roles 
			MSG_CONNECTED = 'You are up! You are being connected now :)'
		}
	}
}

Config.Rankings = {
	-- LOWER NUMBER === HIGHER PRIORITY 
	-- ['roleID'] = {rolePriority, connectQueueMessage},
	['1'] = {500, "You are being connected (donate for a better priority) [{QUEUE_NUM}/{QUEUE_MAX}]:"}, -- Discord User 
	['1'] = {400, "You are being connected (Donator Queue) [{QUEUE_NUM}/{QUEUE_MAX}]:"}, -- Donator 
	['1'] = {300, "You are being connected (Trial-Mod Queue) [{QUEUE_NUM}/{QUEUE_MAX}]:"}, -- Trial Mod 
	['1'] = {200, "You are being connected (Mod Queue) [{QUEUE_NUM}/{QUEUE_MAX}]:"}, -- Mod 
	['1'] = {100, "You are being connected (Admin Queue) [{QUEUE_NUM}/{QUEUE_MAX}]:"}, -- Admin 
	['1'] = {1, "You are being connected (Management Queue) [{QUEUE_NUM}/{QUEUE_MAX}]:"}, -- Management
}
```

* Replace the `'1'`s in the configuration with the discord role ID you want to set up priority for&#x20;

### Download

{% embed url="<https://github.com/JaredScar/Bad-DiscordQueue>" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.badger.store/fivem-discord-scripts/bad-discordqueue.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
