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,16 +48,19 @@ model User {
|
|||||||
}
|
}
|
||||||
|
|
||||||
model Verify {
|
model Verify {
|
||||||
id Int @id @default(autoincrement())
|
id String @id
|
||||||
user User @relation("verUser", fields: [userId], references: [id])
|
user User @relation("verUser", fields: [userId], references: [id])
|
||||||
userId String
|
userId String
|
||||||
verifier User? @relation("verVerifier", fields: [verifierId], references: [id])
|
verifier User? @relation("verVerifier", fields: [verifierId], references: [id])
|
||||||
verifierId String?
|
verifierId String?
|
||||||
time DateTime @default(now())
|
joinTime DateTime @default(now())
|
||||||
timedOut Boolean @default(false) // If they got kicked out of verification because they timed out
|
startTime DateTime?
|
||||||
vegan Boolean @default(false) // If they got verified as a vegan
|
finishTime DateTime?
|
||||||
text Boolean @default(false) // If they used text verification
|
timedOut Boolean @default(false) // If they got kicked out of verification because they timed out
|
||||||
serverVegan Boolean @default(false) // People that went vegan on the server
|
//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
|
||||||
notes String?
|
notes String?
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -228,6 +228,24 @@ export default class VerificationJoinVCListener extends Listener {
|
|||||||
) {
|
) {
|
||||||
const embedColor = '#0099ff';
|
const embedColor = '#0099ff';
|
||||||
const { displayName } = user;
|
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
|
// Create an embeds for each page
|
||||||
const initialEmbed = new MessageEmbed()
|
const initialEmbed = new MessageEmbed()
|
||||||
@ -320,6 +338,7 @@ export default class VerificationJoinVCListener extends Listener {
|
|||||||
// Definitely vegan?
|
// Definitely vegan?
|
||||||
if (button.customId === `yesVegan${id}`) {
|
if (button.customId === `yesVegan${id}`) {
|
||||||
await button.deferUpdate();
|
await button.deferUpdate();
|
||||||
|
info.roles.vegan = true;
|
||||||
await message.edit({
|
await message.edit({
|
||||||
embeds: [activistEmbed],
|
embeds: [activistEmbed],
|
||||||
components: [activistButtons],
|
components: [activistButtons],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user