Git Product home page Git Product logo

ticket-bot's Introduction

ticket-bot

jetbrains Thanks to JetBrains for providing me free license for developing this project!

Special Thanks To 444x For Updating To V14

Features

  • Multi guild!
  • Open tickets by pressing a button
  • Add and remove bot moderators
  • Manage tickets by buttons or slash commands
  • Manage ticket categories
  • Send tickets history
  • Log ticket actions
  • Much more!

splash

Contributing

  • Want to contribute? Feel free to make any changes you want
  1. Fork or clone the repo
  2. Make any changes you want (You can also see todo file)
  3. Open a pull request explaining what changes you've made
  4. I (el bkr) will review it and accept it :D

Installation

Requirements

  • Node v18 or higher

Getting the files

  1. GitHub CLI: git clone https://github.com/elbkr/ticket-bot
  2. Download and extract the zip
  3. Open with GitHub Desktop

Creating the application

  1. Create an application in Discord Developer Portal
  2. Create a BOT and Copy the BOT token
  3. Enable all privileged gateway intents
  4. Go to OAuth2 and copy the client ID
  5. Paste the token at TOKEN line and the client ID at CLIENT_ID line in .env file
  6. Change REPLACE_THIS in the URL below with the client ID, and enter the link in your browser

https://discord.com/api/oauth2/authorize?client_id=REPLACE_THIS&permissions=8&scope=applications.commands%20bot

Connecting to mongo DB

  1. Login or register into Mongo DB
  2. Create a cluster and complete the configuration
  3. Get the connection url by pressing on connect < connect your application
  4. Replace the password with your database access password
  5. Paste the URL into .env file at MONGO line

The URL looks like this: mongodb+srv://username:[email protected]/MyFirstDatabase?retryWrites=true&w=majority

Changing ticket topics

  1. Go to src/events/interactions/buttonPress.js file
  2. Slide down to the line 127
  3. Change the objects (See the example below)
  4. Don't forget to also change the topics in src/commands/tickets/open.js file

Object example:

{
label: "This will show in the dropdown menu",
value: "value",
emoji: "<:emoji:emoji_id>" // or a simple emoji ๐Ÿ”‡
}
  • For more info on how to get custom emojis ID, check this guide I found ;)

.ENV Output

After the configuration, the .env file should look like this:

TOKEN=SuPerReALToken.BelIeVe_Me_itS_ReaL
MONGO=mongodb+srv://username:[email protected]/MyFirstDatabase?retryWrites=true&w=majority
CLIENT_ID=521311050193436682

Running the BOT

  1. Open a terminal and run npm install or npm i
  2. Run node .

ticket-bot's People

Contributors

elbkr avatar unf6 avatar dependabot[bot] avatar imgbotapp avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.