BotWiz Guides
  • BotWiz Guides
  • BotWiz Guides
    • Slash Commands
      • Warn Command
      • Ticket System
    • Migrate
      • Import
      • Export
    • Co-Create
      • Managing Co-Creators
      • Accepting an Invite
    • Apm Guides
      • Apm Ticket System
        • Ticket Limits
      • Massing Bot
    • Auto Responder
    • Server Statistics
      • Member Count
    • Using API's
      • What is an API?
      • Discord API
  • Discord Guides
    • Server Roles
      • Server Roles: PC Guide
      • Server Roles: Mobile Guide
    • Categories & Channels
      • Channels: PC Guide
      • Channels: Mobile Guide
    • Server Ownership
      • Server Ownership: PC Guide
      • Server Ownership: Mobile Guide
    • Delete Server
      • Server Deletion: PC Guide
      • Server Deletion: Mobile Guide
Powered by GitBook
On this page
  • Set x Tickets per User
  • Ticket Count
  • Count Check
  • Adding a Bypass
  • Set x ads per Ticket

Was this helpful?

  1. BotWiz Guides
  2. Apm Guides
  3. Apm Ticket System

Ticket Limits

PreviousApm Ticket SystemNextMassing Bot

Last updated 10 months ago

Was this helpful?

This subpage consists of followup steps to Apm Ticket System. Make sure to complete that guide first.

Set x Tickets per User

Ticket Count

For this, you will need to create a new custom variable to track how many tickets a user has.

When creating a new custom variable, since this will be to track a user's number of tickets, you will need to make this a user variable. This means, the value will be different for each user.

Also, in this example, we will set the Sub-Type to 'Number', as we'll use this to count how many tickets the user has open.

To add to a user's ticket count each time they open a ticket, head to your 'Create a Channel' block, and place a 'Calculate Variable' block afterwards.

Then feel free to set the 'Calculate Variable' block to the following settings:

Once a ticket has been closed, you must remove 1 from the user's ticket counter. Otherwise, their counter will be inaccurate. In order to do this, place a 'Calculate Variable' block after your 'Close Ticket' button.

Since we will need to edit the variable of the ticket opener, and not the interacting user, we must have a unique variable to store the ticket opener's ID.

Set your 'Calculate Variable' block to the following settings:

Now, your ticket counter is complete! Each time a user opens a ticket, their counter will +1. If their ticket is closed, their counter will -1.

Count Check

To check if a user has x tickets, place a 'Comparison Condition' block before your 'Create Channel' block. This condition will check how many tickets a user has open.

In this guide, I'll limit a user's open tickets to 3. If they are trying to open another ticket, despite having 3 open, they will be denied.

To start, set your comparison block's general Comparison Value to {unique_user_tickets}.

After, create a condition. In this condition, enter your ticket limit number - for example, I am limiting the number of tickets users can have at 3.

In this condition, you can add a message that notifies the user that they are at the ticket limit.

Adding a Bypass

If you'd like to add any 'bypass' roles, or users, you will need to use another condition. These users will be able to avoid any ticket limit, and open as many tickets as they'd like.

See the following image for an example.

Set x ads per Ticket

To have this work properly, you must have the server ad the apm sends go through the bot.

There are multiple ways of setting a limit of ads per ticket. For example, you can disable the 'Click to Continue' button, that allows a user to send their ad through the modal, or by using a unique variable to count each ad sent.

When using the ad counter method, you can add additional checks such as to check for a bypass role. In this case, you can remove the ad limit for those with a bypass role.

When disabling a button, making checks such as for a bypass role is a bit more difficult, as you'll need multiple button blocks per condition you make. Therefore, if you wish to have a condition such as to check for a bypass role, you should use an ad counter.

Visit your button block that allows users to add multiple ads. In this example, this will be the 'Click 2 Continue' block, as it connects to the modal which asks for the apm's server ad(s).

Select the block, and visit the Buttons tab. Select your version of the 'Click 2 Continue' button, and select the button to 'Disable After x Amount of Uses'. In your 'Button Uses' textbox, enter the limit of ads you'd wish to have per ticket, such as 1 ad per ticket.

Similarly to Set x Tickets per User, we will need to create a unique variable that will count the amount of ads a user sends in a ticket. Since this limit will be per ticket, the unique variable will have the 'Channel' type. This means that with each channel, or ticket in this case, will have their own count.

To create a new unique variable, visit the following tab and click 'Add'.

You will then need to set your unique variable's settings to the following:

Next, we must add 1 to this ad counter each time an ad is sent. Start by placing a 'Calculate Variable' block after your Modal block.

Now you counter is fully functional! All we need now is to add a 'Comparison Condition' block to check for the amount of ads a user has already sent. See the image below.

In the Comparison Condition block, add the following settings:

Feel free to add additional blocks, such as a message letting the user know when they have reached the ad limit.

To consider a bypass role, and remove any limit for those with a role, add a 'Role Condition' block after your condition. In this example, an ad limit will be removed for any users with the bypass role. See the following for a guide.

If you have not previously set up a unique variable called {unique_ticket_opener}, visit . Follow those steps, then come back here to continue.

If you did not follow , please revert back and introduce those steps.

Getting the Ticket Opener's ID
Using a Modal