Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

closes wwosimulation/tracker/issues/583 #406

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from
Draft

Conversation

Hackante
Copy link
Member

@Hackante Hackante commented Sep 11, 2022

@@ -11,7 +11,7 @@ module.exports = {
const players = db.get(`players`)
let player = db.get(`player_${message.author.id}`) || { status: "Dead" }

if (!message.channel.name.startsWith("priv")) return // if they are not in the private channel
if (!message.channel.parentId == "892046231516368906") return // if they are not in the private channel

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

magic number (or more like string but ya get what i mean)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

really important considering it repeats in so many locations

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also good practice ig

@@ -19,7 +19,7 @@ module.exports = {
.replace(/@here/g, "here")
.replace(/<([@#])+[&]?[\d]{10,20}>/g, "[ping]")

if (message.channel.name.startsWith("priv")) {
if (message.channel.parentId == "892046231516368906") {
if (!["Jailer", "Medium", "Ritualist", "Alpha Werewolf", "Sect Leader", "Instigator"].includes(player.role) && !["Jailer", "Medium", "Ritualist", "Alpha Werewolf", "Sect Leader", "Instigator"].includes(player.dreamRole)) return

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

honestly the if's one after another are suffocating each other NL plz?

@@ -372,7 +375,7 @@ module.exports = {

let guy = await interaction.guild.members.fetch(player)

let channel = await interaction.guild.channels.create(`priv-${roleData.name.toLowerCase().replace(/\s/g, "-")}`, {
let channel = await interaction.guild.channels.create(index + 1 + "-" + guy.user.username, {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

voodoo? why the plus one there

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SUGGESTION: kick SUGGESTION: Change channel names
2 participants