mirror of
https://github.com/veganhacktivists/arabot.git
synced 2025-05-18 17:14:15 +02:00
feat(verification): add info to be collected
This commit is contained in:
parent
300ad9a903
commit
4883ec12a1
@ -48,13 +48,16 @@ model User {
|
||||
}
|
||||
|
||||
model Verify {
|
||||
id Int @id @default(autoincrement())
|
||||
id String @id
|
||||
user User @relation("verUser", fields: [userId], references: [id])
|
||||
userId String
|
||||
verifier User? @relation("verVerifier", fields: [verifierId], references: [id])
|
||||
verifierId String?
|
||||
time DateTime @default(now())
|
||||
joinTime DateTime @default(now())
|
||||
startTime DateTime?
|
||||
finishTime DateTime?
|
||||
timedOut Boolean @default(false) // If they got kicked out of verification because they timed out
|
||||
//incomplete Boolean @default(false) // If the verification was incomplete
|
||||
vegan Boolean @default(false) // If they got verified as a vegan
|
||||
text Boolean @default(false) // If they used text verification
|
||||
serverVegan Boolean @default(false) // People that went vegan on the server
|
||||
|
@ -228,6 +228,24 @@ export default class VerificationJoinVCListener extends Listener {
|
||||
) {
|
||||
const embedColor = '#0099ff';
|
||||
const { displayName } = user;
|
||||
let info = {
|
||||
page: 0,
|
||||
find: {
|
||||
reason: 0,
|
||||
where: 0,
|
||||
},
|
||||
length: 0,
|
||||
reasoning: 0,
|
||||
life: 0,
|
||||
food: 0,
|
||||
roles: {
|
||||
vegan: false,
|
||||
activist: false,
|
||||
trusted: false,
|
||||
vegCurious: false,
|
||||
convinced: false,
|
||||
},
|
||||
};
|
||||
|
||||
// Create an embeds for each page
|
||||
const initialEmbed = new MessageEmbed()
|
||||
@ -320,6 +338,7 @@ export default class VerificationJoinVCListener extends Listener {
|
||||
// Definitely vegan?
|
||||
if (button.customId === `yesVegan${id}`) {
|
||||
await button.deferUpdate();
|
||||
info.roles.vegan = true;
|
||||
await message.edit({
|
||||
embeds: [activistEmbed],
|
||||
components: [activistButtons],
|
||||
|
Loading…
x
Reference in New Issue
Block a user