Skip to content
This repository has been archived by the owner on Oct 17, 2024. It is now read-only.

Commit

Permalink
complete report system
Browse files Browse the repository at this point in the history
  • Loading branch information
ringo360 committed Mar 16, 2024
1 parent 619dd43 commit 0f332da
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/admin/commands/globalban.js
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,16 @@ module.exports = {
.setTitle('通報理由')
.setStyle(TextInputStyle.Paragraph)
.setValue('グローバルBANするべきである理由を記入してください。')
modal.addComponents(targetid, reason)
await interaction.showModal(modal)
const filter = (mInteraction) => mInteraction.customId === 'gbanreport'
interaction.awaitModalSubmit({ filter, time: 60000 })
.then(async mInteraction => {
const resultid = mInteraction.fields.getTextInputValue('reportuserid')
const resultreason = mInteraction.fields.getTextInputValue('reason')
await mInteraction.reply(`Result: ${resultid}, ${resultreason}`)
})
.catch(console.error)
} else {
return await interaction.editReply(
LANG.commands.globalban.unsupportedSubcommandError,
Expand Down

0 comments on commit 0f332da

Please sign in to comment.