Apm Ticket System
Last updated
Last updated
This guide is specifically for apms, and will be unsuitable for those who are not an apm. For those who are not an apm, visit Ticket System.
The following guide and subguides will use APIs, regex, and both commands and events.
Although this is fairly complicated, it will introduce you up to new features, and explain them in depth; allowing you to explore new ways to create. Everything will be explained, and you will be guided through - so don't worry!
If you have any questions throughout or get stuck, feel free to visit our Support Server.
If you are new to BotWiz, and have not yet added your bot: click here to learn how!
Below are two options to creating your ticket system. You can either:
Have each ticket made by apms using a /mass command for example;
Or, have each ticket created by apms using a 'mass' button.
In this tab, it will detail how to create the following embed and the '/mass' command.
Before creating your /mass
command, you will need a way to send your ticket information, such as the embeds in the image above.
Start by creating a new command and place a Permissions Condition block to ensure not everybody can use the command. Afterwards, feel free to place action blocks to represent your ticket's information.
After, you'll need to create your /mass
command, which will used to create a ticket. In this command, you will start with a 'Create Channel' block. Follow the rest of the guide for the next steps.
{interaction[member]}
Tag the interacting user.
{interaction[member.id]}
Get the interacting user's ID.
{interaction[member.username]}
Grab the interacting user's username.
{interaction[member.displayName]}
Display the interacting user's name.
{interaction[channel.id]}
Shows the current channel's ID.
{interaction[message.id]}
Grabs the interacted message ID. This only works after a trigger (e.g. a button).
Find more combinations for the interaction variable by clicking here.
To create a ticket, start by placing a Create Channel action block.
Select a tab below to see an example of what your builder should look like thusfar.
For this guide, I have set my ticket names to w2p—{interaction[member.displayName]}
. This means that with each new ticket made, it will be named w2p—catnip
for example.
Additionally, you can edit the type of channel; meaning you can have your tickets held in a text channel or a thread. When selecting a thread option, all threads will be made in the current channel.
Below are additional options, allowing you to fully customize your newly created channel.
In each text channel, you can set a topic. Topics can be used to describe the channel's purpose, or state any quick rules such as "No Spamming!".
When a topic is set, everyone who can see the channel will see the topic at the top.
When your ticket channel is created, it will be subject to the permissions that its parent channel has.
To override these permissions, and have your own, you'll need to use an API block. This is needed to make sure that your ticket opener has permissions to view their ticket.
Method: PUT
URL: https://discord.com/api/v10/channels/{create_channel_00000[id]}/permissions/{interaction[member.id]}
This API will edit your channel's permissions. In the URL, make sure to add your unique code. Do this by replacing 00000
with your own create_channel
's variable. You can access your code by visiting your Create Channel block.
To add a specific user, or role, replace {interaction[member.id]}
with the user or role's ID.
With {interaction[member.id]}
in the URL, the interacting user (e.g. the user who clicks the 'Mass' button in this example), will be the one whose permissions you edit.
Authorization
Bot {bot_token}
Before entering your values below, you will need to use a permissions conversion tool.
Discord uses numbers, instead of the typical permissions such as administrator
or manage messages
. In order to get the permissions you'd like, you will need to use this tool.
When using BotWiz's Permissions Calculator tool, first start by selecting the permissions you'd like to allow for the user or role you selected (in the ID part of the API's URL). Once finished, at the top of the page you will see Conversion. Copy the number and put this as your allow
value.
For example, the conversion for the view_channel
and send_messages
permissions is 3072
.
If you would like to also deny some permissions for your selected user or role, repeat the above steps but set the conversion number as the deny
value.
type
0
or 1
(see description)
Put 1
if the ID in the URL belongs to a user.
Else, put 0
if the ID belongs to a role.
allow
See above for instructions.
The permissions to allow.
deny
See above for instructions.
The permissions to deny.
To add more permissions, duplicate the API block and repeat the above blocks!
An update is planned to introduce an "Edit Channel Permissions" block.
If the category your tickets are made in allows permissions for everyone for instance, and you would like to keep permissions private, then feel free to repeat the permissions API.
To send any messages to your new channel, set your action block's location to the following:
You can find your {create_channel_00000}
variable in your 'Create Channel' block.
Using the above variable in the example image will not work for your command; each variable has a different code.
Blocks that reply to a message will not work.
To create your button, you will need to use any 'Message Button' action block, with a button set up to act as the closing button. To send this message to the ticket channel, use your 'Create Channel' block's variable; this variable should look like {create_channel_00000}
.
Depending on your settings, and your preferances, you can set up your 'close' button to:
Delete the ticket channel;
Remove the ticket opener's permissions to see the channel; or
If your channel is a forum post or thread: close and lock the post.
For this, you'll simply need to place a 'Delete Channel' action block after your 'Close' button.
When selecting which channel to delete, remember to use your {create_channel_00000}
variable from before. You can find this by selecting your 'Create Channel' block!
The following will be an example of typical replies sent in an apm portal. Feel free to follow these steps, or customize them to how you'd like!
There are multiple ways to ask the ticket opener for their server's ad.
You can ask the apm to send it as normal; or
You can ask the apm to send the ad through a modal.
In order to pin the server ad, or setup any , you must run the ad through a modal.
Above is an example of how your builder should look currently, including future steps.
Here, your '1st Block' will be asking the user to send their ad. No checks will be made here, and their server ad will not be pinned. In this example, I have set up my 1st Block to ask the user to click 'Continue' once they have sent their ad in codeblock. For example:
After the server ad has been sent, this is typically when apms will start posting. Here, you can either tag yourself, or a helper role, asking to verify the server before confirming they can mass.
To help, there are some that can be manually performed by your bot to remove the need to manually approve each server ad.
Here, we'll have the following:
Starting with your 'Add Roles' block, set your block to have the following settings:
'Message Author' is another way to refer to the interacting user. In this instance, it would be the user who clicks the 'Click 2 Continue' button.
Next, to create the "Posting Info" embed, I have used a 'Send Embed & Button' block. Cutomize this to how you would like, and make sure to send this message to your Ticket channel.
First, we'll need to ask if the apm would like their ad to be posted separately or in a batch. Next, if the user picks separately then we will need to see how long. Here, by using the buttons, you can add sep options - such as 30 minutes, 1 hour or overnight.
After each option, we will need a message block for your bot to notify you of which option they chose.
Feel free to use the following screenshot to see how to layout your action blocks.
Make sure that each of your messages go to your Ticket channel. You can do this by using:
Also, make sure to use your own {created_channel_00000}
variable.
You can find this at your 'Create a Channel' block.
If you'd like to make the 'overnight' option exclusive to a role, for example, you can add a 'Role Condition' block for example.
With a role condition block, it will make sure that the user who interacts with the button has the role. If not, then any blocks in the 'Else' condition will be performed. If the user does infact have the role, any blocks in the comparison will be performed.
Here, you can add a way for ticket openers to be notified when their ticket has been posted. This step is similar to Sep or Batch Option.
Below is an example of how to ask the user, and to then let you know what the apm would prefer.
To link multiple blocks together, you will need to use a merge block. See the screenshot above for an example.
You can add more to your ticket system, including:
Ticket Limits: such as 1 ticket per user, or 1 ad in each ticket.
Click any of the above titles to be directed to a subpage containing the selected guide(s).
More miscellaneous options coming soon...