mirror of
https://github.com/veganhacktivists/arabot.git
synced 2025-05-19 12:44:17 +02:00
feat(arabot): add fix for bad word API error
This commit is contained in:
parent
a6cf9db523
commit
270d6ca91f
@ -111,7 +111,6 @@ class VerificationJoinVCListener extends Listener {
|
|||||||
await channel.setName('Verifier Meeting');
|
await channel.setName('Verifier Meeting');
|
||||||
verifier = true;
|
verifier = true;
|
||||||
} else {
|
} else {
|
||||||
await channel.setName(`${member.displayName} - Verification`);
|
|
||||||
await currentChannel.send(`Hiya ${member.user}, please be patient as a verifier has been called out to verify you.\n\n`
|
await currentChannel.send(`Hiya ${member.user}, please be patient as a verifier has been called out to verify you.\n\n`
|
||||||
+ 'If you leave this voice channel, you will automatically be given the non-vegan role where you gain access to this server and if you\'d like to verify as a vegan again, you\'d have to contact a Mod, which could be done via ModMail.');
|
+ 'If you leave this voice channel, you will automatically be given the non-vegan role where you gain access to this server and if you\'d like to verify as a vegan again, you\'d have to contact a Mod, which could be done via ModMail.');
|
||||||
// Adds to the database that the user joined verification
|
// Adds to the database that the user joined verification
|
||||||
@ -143,6 +142,7 @@ class VerificationJoinVCListener extends Listener {
|
|||||||
// TODO refactor this mess to circumvent
|
// TODO refactor this mess to circumvent
|
||||||
// "Contains words not allowed for servers in Server Discovery."
|
// "Contains words not allowed for servers in Server Discovery."
|
||||||
let verificationText: TextChannel;
|
let verificationText: TextChannel;
|
||||||
|
let bannedName = false;
|
||||||
try {
|
try {
|
||||||
verificationText = await guild.channels.create(`✅┃${member.displayName}-verification`, {
|
verificationText = await guild.channels.create(`✅┃${member.displayName}-verification`, {
|
||||||
type: 'GUILD_TEXT',
|
type: 'GUILD_TEXT',
|
||||||
@ -193,6 +193,13 @@ class VerificationJoinVCListener extends Listener {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
bannedName = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!bannedName) {
|
||||||
|
await channel.setName(`${member.displayName} - Verification`);
|
||||||
|
} else {
|
||||||
|
await channel.setName(`${member.id} - Verification`);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Send a message that someone wants to be verified
|
// Send a message that someone wants to be verified
|
||||||
|
Loading…
x
Reference in New Issue
Block a user