tm21cy / SS-HR-Automation

1 stars 0 forks source link

Add ticket system #2

Open net-tech opened 2 years ago

net-tech commented 2 years ago

Ticket System

Description

Add a ticket system. Upon clicking a button, a new ticket channel gets created. The ButtonInteraction user gets added along with the staff. The staff added is a configurable feature. A command with which the panel is configured/sent is also a feature.

Commands

Commands & Groups:

/tickets - dedicated command, configuration, admin side /tickets panel - sub command group /tickets channels - sub command group

Commands:

/tickets panel create - create a new ticket panel. Options: name, button name, embed title, embed description. Returns success message with T.P.G.U.I.D. (Ticket Panel Globally Unique Identifier) and message link

/tickets panel edit - edit a ticket panel. Options: T.P.G.U.I.D (Ticket Panel Globally Unique Identifier), new button name, new embed title, new embed description, new embed colour

/tickets panel delete - deletes a ticket panel. Options: T.P.G.U.I.D (Ticket Panel Globally Unique Identifier)


/tickets channels category set - the category in which to create tickets. Options: Category

/tickets channels logs set - the channel to log tickets and transcripts. Options: channel


Technical Implementation

@tm21cy will build the database size. There will be internal database methods such as

createTicket deleteTicket getTicketPanel listTicketPanels listTicketPanelsGuild addTicketPanel deleteTicketPanel

Revisions, changes, and comments

Blizzy and I should announce any revisions or changes here.

tm21cy commented 2 years ago
const TicketPanels = dbSql.define('TicketPanels', {
    name: {
        type: DataTypes.STRING,
        allowNull: false
    },
    value: {
        type: DataTypes.STRING,
        allowNull: false
    },
    description: {
        type: DataTypes.STRING,
        allowNull: false
    },
    channelPrefix: {
        type: DataTypes.STRING,
        allowNull: false
    },
    guildId: {
        type: DataTypes.STRING,
        allowNull: false
    },
    buttonName: {
        type: DataTypes.STRING,
        allowNull: false
    },
    tpguid: {
        type: DataTypes.STRING,
        allowNull: false
    },
    messageLink: {
        type: DataTypes.STRING,
        allowNull: false
    },
    category: {
        type: DataTypes.STRING,
        allowNull: false
    },
    logChannel: {
        type: DataTypes.STRING,
        allowNull: false
    }
})
tm21cy commented 2 years ago
const Tickets = dbSql.define('Tickets', {
    channelId: {
        type: DataTypes.STRING,
        allowNull: false
    },
    authorId: {
        type: DataTypes.STRING,
        allowNull: false
    },
    paneltpguid: {
        type: DataTypes.STRING,
        allowNull: false
    },
    status: {
        type: DataTypes.STRING,
        allowNull: false
    },
    openDate: {
        type: DataTypes.DATE,
        allowNull: false
    },
    closeDate: {
        type: DataTypes.DATE,
        allowNull: true
    }
})
tm21cy commented 2 years ago
tm21cy commented 2 years ago

Marking as implemented. Any further usage issues, open a new issue for localization purposes.

net-tech commented 2 years ago

This feature has not gotten completed. It will be marked as completed when the entire feature is ready for production. We won't make multiple issues for the same feature.

net-tech commented 2 years ago

@tm21cy please click transfer issue below "Lock Conversation" and transfer this issue to the new repository,