Skip to main content

🏁 Getting Started

Hi there! Welcome to the Open Ticket Framework Guide! This part of the documentation provides in-depth guides about creating plugins based on the Open Discord framework. Using plugins, you can increase the functionality, customise existing features or add your entirely custom-made features!

This guide is targeted towards Open Ticket v4.0.0! Older and newer versions may include changes, additions, or deprecated features.

Framework Guide

How to develop Open Ticket plugins?

basic knowledge

It's recommended to have a basic knowledge about node.js, Javascript, Typescript & discord.js before learning Open Ticket plugin development!


πŸ“Œ Table Of Contents​

The Framework Guide consists of several categories to help you quickly learn plugin development:


πŸš€ Getting Started​

To get started, familiarize yourself with the built-in Config and Commands from Open Ticket first. These are the core functionalities of the bot and you can learn a lot by looking at how they work.

Alright once you've done that, we will start with What are Open Ticket plugins exactly?

What Are Plugins?​

Plugins allow you to extend and customize Open Ticket without modifying the source code of the bot. You can create new commands, change existing behaviors, store custom data and even integrate external APIs!

Why should you use plugins?​

  • πŸ›  Modular & Expandable – Add or remove features without breaking Open Ticket.
  • 🌍 Community-Friendly – Share plugins with others or use pre-built ones.
  • πŸ’Ό Improved Workflows – Improve your workflow by customising Open Ticket to your requirements.
  • πŸ”— Deep Integrations – Plugins can deeply integrate into the system. This allows them to change almost everything!

What are some example plugins?​

  • πŸ’¬ Reviews - Create & customise your own review system!
  • πŸ“’ Feedback - Collect feedback & create forms for people to answer!
  • 🏷️ Tags - Create tags & answer questions automatically using keywords!
  • πŸ“ Forms - Create advanced forms and ask people for additional details!
  • πŸ”„ Rotating Status - Create a rotating bot status & use dynamic variables from the bot!
  • πŸ’Ύ SQLite Database - Use an sqlite database for increased performances!
  • πŸŽ‰ Custom Embeds - Create your own embeds and use them in your server!
  • ⏰ Reminders - Create & manage customisable reminders in your server!
  • 🎨 Customisation - Yep, you heard it right! Even more customisation!
plugin repository

Most of these example plugins already exist in our Open Discord Plugin Repository.

This is the official location to download Open Ticket plugins.
All plugins here are scanned for malware and improved to maintain compatibility.

Plugin Terminology​

Before diving into development, it's important to understand a few key concepts of the Open Ticket framework:

Open Discord​

The Open Discord framework is the core API that Open Ticket is built on. It provides almost essential functionalities of the bot. All plugins will also be executed by Open Discord!

βœ… You will interact with Open Discord a lot when developing plugins!

Open Ticket​

Open Ticket is the bot itself, built using the Open Discord framework. All of your plugins will be running within Open Ticket and are able to extend its functionalities.

βœ… Open Ticket can be compared with a huge ticket-system plugin for Open Discord!

Workers​

Workers are small functions or callbacks that execute in a priority-based order to perform specific tasks. They can be a part of one of the following categories:

  • Builders – Construct messages, embeds, buttons, dropdowns, files or modals.
  • Responders – Handle slash/text commands, buttons, dropdowns, modals and other interactions.
  • Actions – Specialized workers to perform to execute major operations or handle mass-data in multiple steps without problems.

βœ… Workers allow multiple plugins to modify the same process without conflicts!

Builders​

Builders have workers that construct various elements of the bot’s UI, including:

  • Messages
  • Embeds
  • Buttons
  • Dropdowns (Select Menus)
  • Files (Attachments)
  • Modals

βœ… Builders allow multiple plugins to modify the same element without conflicts!

Responders​

Responders are specialized workers that handle interactions like:

  • Slash/Text Commands
  • Buttons
  • Dropdowns (Select Menus)
  • Modals
  • Autocomplete
  • User & Message Interactions

βœ… Responders allow multiple plugins to listen & react to the same user input without conflicts!

Actions​

Actions are specialized classes that contain workers to perform major operations, such as:

  • Opening, closing, claiming & pinning a ticket
  • Creating a transcript

βœ… Actions help in structuring & simplifying complex workflows inside the bot!

Events​

Events allow your plugin to listen for specific occurrences and respond accordingly. Unlike workers, events cannot directly modify the default behavior of Open Ticket.

βœ… Events are useful when you want to trigger something new without overriding the existing behavior!

Utilities​

Utilities are globally available helper functions that provide essential operations such as:

  • Formatting messages & emojis
  • Handling timestamps
  • Managing promises, async & timers

βœ… Use utilities to simplify your code and follow best practices!

Development Overview​

Creating a plugin involves:

  1. Setting Up Your Plugin Environment – Basic structure & configuration.
  2. Using the Plugin API – Understanding the available tools & features.
  3. Registering Commands & Events – Creating custom commands & responding to events.
  4. Storing & Managing Data – Using databases, variables & custom configurations.
  5. Testing & Debugging – Making sure everything works smoothly.

🎯 Your First Plugin​

Before diving into advanced topics, let’s start by creating a simple Open Ticket plugin. This guide will walk you through setting up a basic plugin from scratch!

No prior experience with Open Ticket plugins? No worries! This guide is beginner-friendly and will get you up and running in no time.

Testing Your Plugin​

Once you've built your first plugin, it's time to test it! Make sure Open Ticket is configured correctly without your plugin being enabled.

πŸŽ‰ Next Steps​

Great! You now have a solid foundation in Open Ticket plugin development. But there's still much more to explore! Check out these resources to deepen your understanding and build more advanced plugins.

Learn More​

Go Further​

Useful Resources​