mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2024-11-17 09:23:07 +02:00
Add autocomplete, button, menu, and modal files
This commit is contained in:
parent
327573a38a
commit
e28392352c
@ -34,7 +34,7 @@
|
||||
"node": ">=18.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@eartharoid/dbf": "^0.3.0",
|
||||
"@eartharoid/dbf": "^0.3.1",
|
||||
"@eartharoid/dtf": "^2.0.1",
|
||||
"@eartharoid/i18n": "^1.0.4",
|
||||
"@fastify/cookie": "^6.0.0",
|
||||
|
12
src/autocomplete/tag.js
Normal file
12
src/autocomplete/tag.js
Normal file
@ -0,0 +1,12 @@
|
||||
const { Autocompleter } = require('@eartharoid/dbf');
|
||||
|
||||
module.exports = class TagCompleter extends Autocompleter {
|
||||
constructor(client, options) {
|
||||
super(client, {
|
||||
...options,
|
||||
id: 'tag',
|
||||
});
|
||||
}
|
||||
|
||||
async run(value, comamnd, interaction) { }
|
||||
};
|
12
src/buttons/claim.js
Normal file
12
src/buttons/claim.js
Normal file
@ -0,0 +1,12 @@
|
||||
const { Button } = require('@eartharoid/dbf');
|
||||
|
||||
module.exports = class ClaimButton extends Button {
|
||||
constructor(client, options) {
|
||||
super(client, {
|
||||
...options,
|
||||
id: 'claim',
|
||||
});
|
||||
}
|
||||
|
||||
async run (id, interaction) {}
|
||||
};
|
12
src/buttons/close.js
Normal file
12
src/buttons/close.js
Normal file
@ -0,0 +1,12 @@
|
||||
const { Button } = require('@eartharoid/dbf');
|
||||
|
||||
module.exports = class CloseButton extends Button {
|
||||
constructor(client, options) {
|
||||
super(client, {
|
||||
...options,
|
||||
id: 'close',
|
||||
});
|
||||
}
|
||||
|
||||
async run(id, interaction) { }
|
||||
};
|
12
src/buttons/create.js
Normal file
12
src/buttons/create.js
Normal file
@ -0,0 +1,12 @@
|
||||
const { Button } = require('@eartharoid/dbf');
|
||||
|
||||
module.exports = class CreateButton extends Button {
|
||||
constructor(client, options) {
|
||||
super(client, {
|
||||
...options,
|
||||
id: 'create',
|
||||
});
|
||||
}
|
||||
|
||||
async run(id, interaction) { }
|
||||
};
|
12
src/buttons/unclaim.js
Normal file
12
src/buttons/unclaim.js
Normal file
@ -0,0 +1,12 @@
|
||||
const { Button } = require('@eartharoid/dbf');
|
||||
|
||||
module.exports = class UnclaimButton extends Button {
|
||||
constructor(client, options) {
|
||||
super(client, {
|
||||
...options,
|
||||
id: 'unclaim',
|
||||
});
|
||||
}
|
||||
|
||||
async run(id, interaction) { }
|
||||
};
|
@ -28,5 +28,5 @@ log:
|
||||
update: 'updated'
|
||||
tickets:
|
||||
menus:
|
||||
panel:
|
||||
create:
|
||||
placeholder: 'Select a ticket category'
|
12
src/menus/create.js
Normal file
12
src/menus/create.js
Normal file
@ -0,0 +1,12 @@
|
||||
const { Menu } = require('@eartharoid/dbf');
|
||||
|
||||
module.exports = class CreateMenu extends Menu {
|
||||
constructor(client, options) {
|
||||
super(client, {
|
||||
...options,
|
||||
id: 'create',
|
||||
});
|
||||
}
|
||||
|
||||
async run(id, interaction) { }
|
||||
};
|
12
src/modals/feedback.js
Normal file
12
src/modals/feedback.js
Normal file
@ -0,0 +1,12 @@
|
||||
const { Modal } = require('@eartharoid/dbf');
|
||||
|
||||
module.exports = class FeedbackModal extends Modal {
|
||||
constructor(client, options) {
|
||||
super(client, {
|
||||
...options,
|
||||
id: 'feedback',
|
||||
});
|
||||
}
|
||||
|
||||
async run(id, interaction) { }
|
||||
};
|
12
src/modals/questions.js
Normal file
12
src/modals/questions.js
Normal file
@ -0,0 +1,12 @@
|
||||
const { Modal } = require('@eartharoid/dbf');
|
||||
|
||||
module.exports = class QuestionsModal extends Modal {
|
||||
constructor(client, options) {
|
||||
super(client, {
|
||||
...options,
|
||||
id: 'questions',
|
||||
});
|
||||
}
|
||||
|
||||
async run(id, interaction) { }
|
||||
};
|
@ -77,7 +77,7 @@ module.exports.post = fastify => ({
|
||||
components.push(
|
||||
new ButtonBuilder()
|
||||
.setCustomId(JSON.stringify({
|
||||
action: 'createTicket',
|
||||
action: 'create',
|
||||
target: categories[0].id,
|
||||
}))
|
||||
.setStyle(Primary)
|
||||
@ -90,7 +90,7 @@ module.exports.post = fastify => ({
|
||||
...categories.map(category =>
|
||||
new ButtonBuilder()
|
||||
.setCustomId(JSON.stringify({
|
||||
action: 'createTicket',
|
||||
action: 'create',
|
||||
target: category.id,
|
||||
}))
|
||||
.setStyle(Secondary)
|
||||
@ -101,8 +101,8 @@ module.exports.post = fastify => ({
|
||||
} else {
|
||||
components.push(
|
||||
new SelectMenuBuilder()
|
||||
.setCustomId('createTicket')
|
||||
.setPlaceholder(getMessage('menus.panel.placeholder'))
|
||||
.setCustomId('create')
|
||||
.setPlaceholder(getMessage('menus.create.placeholder'))
|
||||
.setOptions(
|
||||
categories.map(category =>
|
||||
new SelectMenuOptionBuilder()
|
||||
|
Loading…
Reference in New Issue
Block a user