-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add DOs and DON'Ts to support ticket guide
- Loading branch information
Showing
9 changed files
with
107 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
src/interactions/buttons/Support Ticket Guide/supportTicketGuideDosDonts.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import { SupportTicketGuideDosDontsLocalization } from "@alice-localization/interactions/buttons/Support Ticket Guide/supportTicketGuideDosDonts/SupportTicketGuideDosDontsLocalization"; | ||
import { ButtonCommand } from "@alice-structures/core/ButtonCommand"; | ||
import { EmbedCreator } from "@alice-utils/creators/EmbedCreator"; | ||
import { createSupportTicketGuideButton } from "@alice-utils/creators/SupportTicketGuideButtonCreator"; | ||
import { CommandHelper } from "@alice-utils/helpers/CommandHelper"; | ||
import { InteractionHelper } from "@alice-utils/helpers/InteractionHelper"; | ||
import { unorderedList } from "discord.js"; | ||
|
||
export const run: ButtonCommand["run"] = async (_, interaction) => { | ||
if (!interaction.inCachedGuild()) { | ||
return; | ||
} | ||
|
||
const language = await CommandHelper.getLocale(interaction); | ||
const localization = new SupportTicketGuideDosDontsLocalization(language); | ||
|
||
const embed = EmbedCreator.createNormalEmbed({ | ||
author: interaction.user, | ||
color: interaction.member.displayColor, | ||
}); | ||
|
||
embed | ||
.setTitle(localization.getTranslation("embedTitle")) | ||
.setDescription( | ||
localization.getTranslation("createTicketDosHeader") + | ||
"\n" + | ||
unorderedList([ | ||
localization.getTranslation("createTicketDos1"), | ||
localization.getTranslation("createTicketDos2"), | ||
]) + | ||
"\n\n" + | ||
localization.getTranslation("createTicketDontsHeader") + | ||
"\n" + | ||
unorderedList([ | ||
localization.getTranslation("createTicketDonts1"), | ||
localization.getTranslation("createTicketDonts2"), | ||
]), | ||
); | ||
|
||
InteractionHelper.update(interaction, { | ||
embeds: [embed], | ||
components: createSupportTicketGuideButton( | ||
interaction.customId, | ||
language, | ||
), | ||
}); | ||
}; | ||
|
||
export const config: ButtonCommand["config"] = { | ||
replyEphemeral: true, | ||
instantDeferInDebug: false, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
...Support Ticket Guide/supportTicketGuideDosDonts/SupportTicketGuideDosDontsLocalization.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { Localization } from "@alice-localization/base/Localization"; | ||
import { Translations } from "@alice-localization/base/Translations"; | ||
import { SupportTicketGuideDosDontsENTranslation } from "./translations/SupportTicketGuideDosDontsENTranslation"; | ||
|
||
export interface SupportTicketGuideDosDontsStrings { | ||
readonly embedTitle: string; | ||
readonly createTicketDosHeader: string; | ||
readonly createTicketDos1: string; | ||
readonly createTicketDos2: string; | ||
readonly createTicketDontsHeader: string; | ||
readonly createTicketDonts1: string; | ||
readonly createTicketDonts2: string; | ||
} | ||
|
||
/** | ||
* Localizations for the `supportTicketGuideDosDonts` button command. | ||
*/ | ||
export class SupportTicketGuideDosDontsLocalization extends Localization<SupportTicketGuideDosDontsStrings> { | ||
protected override readonly localizations: Readonly< | ||
Translations<SupportTicketGuideDosDontsStrings> | ||
> = { | ||
en: new SupportTicketGuideDosDontsENTranslation(), | ||
}; | ||
} |
21 changes: 21 additions & 0 deletions
21
... Guide/supportTicketGuideDosDonts/translations/SupportTicketGuideDosDontsENTranslation.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { Translation } from "@alice-localization/base/Translation"; | ||
import { SupportTicketGuideDosDontsStrings } from "../SupportTicketGuideDosDontsLocalization"; | ||
import { Config } from "@alice-core/Config"; | ||
import { userMention, channelMention } from "discord.js"; | ||
|
||
/** | ||
* The English translation for the `supportTicketGuideDosDonts` button command. | ||
*/ | ||
export class SupportTicketGuideDosDontsENTranslation extends Translation<SupportTicketGuideDosDontsStrings> { | ||
override readonly translations: SupportTicketGuideDosDontsStrings = { | ||
embedTitle: "DOs and DON'Ts", | ||
createTicketDosHeader: "DOs when creating a ticket:", | ||
createTicketDos1: | ||
"Include as much details as you can. It will help staff members in assisting you.", | ||
createTicketDos2: | ||
"Provide screenshots when necessary. This can be done after creating a ticket.", | ||
createTicketDontsHeader: "DON'Ts when creating a ticket:", | ||
createTicketDonts1: `Including your private information. Apart from ${userMention(Config.botOwners[1])}, ${userMention(Config.botOwners[0])}, and ${userMention("210769870848000001")}, no one in the staff team has access to your private information (excluding your password). Some ticket presets will ask your private information such as email, but these information can only be seen by ${userMention(Config.botOwners[1])} and ${userMention("210769870848000001")}. Should you require private information to be submitted, please move to the Direct Messages of one of those people instead.`, | ||
createTicketDonts2: `Creating a ticket for game-related questions or bug reports. These matters should be posted in ${channelMention("1006369245577347082")} instead.`, | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters