Skip to content

Commit

Permalink
feat: Define config/types for #230
Browse files Browse the repository at this point in the history
  • Loading branch information
zhiyan114 committed Aug 18, 2023
1 parent 2948f3e commit 912ba68
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
7 changes: 5 additions & 2 deletions config/config.example.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
"customDescription": "", // The custom description of the ticket type, here is all parameter: USERNAME, USERID, TICKETCOUNT, REASON1, 2, ect (set to blank to use the default description)
"cantAccess": ["1111111111111111111"], // The roles who can't access to this ticket type
"askQuestions": false, // If the bot should ask the reason of the ticket
"questions": [] // Leave blank if you don't want to ask questions
"questions": [], // Leave blank if you don't want to ask questions
"staffRoles": [] // Category specific staff role (instead of the default ones)
},
{
"codeName": "category-two", // The name need to be in lowercase
Expand All @@ -32,7 +33,8 @@
"customDescription": "Please explain your report in detail. If you have any images, please attach them to your message.", // The custom description of the ticket type, here is all parameter: USERNAME, USERID, TICKETCOUNT, REASON1, 2, ect (set to blank to use the default description)
"cantAccess": ["2222222222222222222"], // The roles who can't access to this ticket type
"askQuestions": false, // If the bot should ask the reason of the ticket
"questions": [] // Leave blank if you don't want to ask questions
"questions": [], // Leave blank if you don't want to ask questions
"staffRoles": [] // Category specific staff role (instead of the default ones)
},
{
"codeName": "other", // The name need to be in lowercase
Expand All @@ -45,6 +47,7 @@
"customDescription": "Thank you for your ticket, a staff will reply you as soon as possible\n\n__**What is the reason of the ticket?**__: REASON1", // The custom description of the ticket type, here is all parameter: USERNAME, USERID, TICKETCOUNT, REASON1, 2, ect (set to blank to use the default description)
"cantAccess": [], // The roles who can't access to this ticket type
"askQuestions": true, // If the bot should ask the reason of the ticket
"staffRoles": [], // Category specific staff role (instead of the default ones)
"questions": [
// Maximum of 5 questions can be set due to discord's limit
{
Expand Down
1 change: 1 addition & 0 deletions src/structure/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,4 +161,5 @@ export type TicketType = {
cantAccess: string[];
askQuestions: boolean;
questions: TicketQuestionType[];
staffRoles?: string[];
}

5 comments on commit 912ba68

@RaiRaii
Copy link

@RaiRaii RaiRaii commented on 912ba68 Sep 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any updates on this? i cant manage to make it work.

@Sayrix
Copy link
Owner

@Sayrix Sayrix commented on 912ba68 Sep 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zhiyan114
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got college stuff rn, I'll eventually get it done.

@RaiRaii
Copy link

@RaiRaii RaiRaii commented on 912ba68 Sep 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, well take your time! college stuff are more important ofc!
Is there a way to launch the bot WITHOUT the administrator role otherwise?
Becouse that could be a way to make it. Then i THINK you dont need coding for that.

@zhiyan114
Copy link
Collaborator Author

@zhiyan114 zhiyan114 commented on 912ba68 Sep 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the bot can technically run as non-admin (given that you provided the minimum privilege it needs), but if you want to have specific role access specific ticket category, I'll need to be patched.
We'll carry rest of the convo in #230

Please sign in to comment.