Skip to content

closes wwosimulation/tracker/issues/583#406

Draft
Hackante wants to merge 9 commits into
mainfrom
new-features
Draft

closes wwosimulation/tracker/issues/583#406
Hackante wants to merge 9 commits into
mainfrom
new-features

Conversation

@Hackante
Copy link
Copy Markdown
Member

@Hackante Hackante commented Sep 11, 2022

Comment thread commands/game/activate.js
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
Copy link
Copy Markdown

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)

Copy link
Copy Markdown

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

also good practice ig

Comment thread commands/game/message.js

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
Copy link
Copy Markdown

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?

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, {
Copy link
Copy Markdown

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