diff --git a/.gitignore b/.gitignore index a94e02d..5c6b344 100644 --- a/.gitignore +++ b/.gitignore @@ -61,3 +61,21 @@ typings/ *.swp config.json .vscode +/.vs/NapGod.js/config/applicationhost.config +/.vs/ProjectSettings.json +/.vs/slnx.sqlite +/.vs/VSWorkspaceState.json +/.vs/NapGod.js/v16/.suo +/server/backup/admin/system.version.bson +/server/backup/admin/system.version.metadata.json +/server/backup/napgod/users.metadata.json +/server/backup/napgod/users.bson +/server/backup/napgod/reports.metadata.json +/server/backup/napgod/reports.bson +/server/backup/napgod/logs.metadata.json +/server/backup/napgod/logs.bson +/server/backup/napgod/imgs.metadata.json +/server/backup/napgod/imgs.bson +/server/backup/napgod/focus.metadata.json +/server/backup/napgod/focus.bson +/db.dump diff --git a/commands/BIMAXION.md b/commands/BIMAXION.md index 138d322..81e7899 100644 --- a/commands/BIMAXION.md +++ b/commands/BIMAXION.md @@ -11,3 +11,4 @@ Bimaxion (Bimaxion) **Adaptation difficulty**: Hard **Ideal scheduling**: The whole schedule's sleep distribution looks like Dymaxion, with one core before midnight, one core around dawn, one noon nap, one afternoon/evening nap. ----------------------------------------------- +More information about Bimaxion can be found at \ No newline at end of file diff --git a/commands/BIPHASICX.md b/commands/BIPHASICX.md index 6f3ecd3..c7315fc 100644 --- a/commands/BIPHASICX.md +++ b/commands/BIPHASICX.md @@ -1,7 +1,7 @@ -Biphasic-X (Bi-x) +Biphasic-X (Bi-X) ----------------------------------------------- **Invented by**: generalNguyen -**Alternatively known as**: Prototype X, Experimental X, Bi-x +**Alternatively known as**: Prototype X, Experimental X, Bi-X **Total sleep**: 7-9 hours (equivalent to monophasic baseline) **Classification**: Flexible, Biphasic, Non-reducing Polyphasic Sleep **Specification**: 1 long core sleep, naps with varying lengths or consistent length depending on days, NREM1/NREM2 nap if duration is short (< ~25-30m), contains SWS/REM if duration is longer (> 60m) @@ -9,5 +9,4 @@ Biphasic-X (Bi-x) **Adaptation difficulty**: Easy **Ideal scheduling**: Consistent dark period everyday, core sleep starts 1-2 hours after dark period. Nap during daytime, no later than 6 PM. ----------------------------------------------- -More information about Biphasic-X can be found at: -https://polyphasic.net/schedules/non-reducing-polyphasic-schedules/ +More information about Biphasic-X can be found at \ No newline at end of file diff --git a/commands/BIX.md b/commands/BIX.md index 1ae5cb0..a20b70d 120000 --- a/commands/BIX.md +++ b/commands/BIX.md @@ -1 +1,12 @@ -BIPHASICX.md \ No newline at end of file +Biphasic-X (Bi-X) +----------------------------------------------- +**Invented by**: generalNguyen +**Alternatively known as**: Prototype X, Experimental X, Bi-X +**Total sleep**: 7-9 hours (equivalent to monophasic baseline) +**Classification**: Flexible, Biphasic, Non-reducing Polyphasic Sleep +**Specification**: 1 long core sleep, naps with varying lengths or consistent length depending on days, NREM1/NREM2 nap if duration is short (< ~25-30m), contains SWS/REM if duration is longer (> 60m) +**Mechanism**: 1 core sleep, 1 nap as main form. More than 1 core sleep or 1 nap (reduce total sleep) is allowed on busier days. Recovery day is done afterwards to recover from sleep deprivation (increase total sleep by extending either core length or nap length in Biphasic form) to keep up napping habits. Both core sleep and nap(s) are flexible and can be moved around to a degree to ensure circadian rhythm is preserved. +**Adaptation difficulty**: Easy +**Ideal scheduling**: Consistent dark period everyday, core sleep starts 1-2 hours after dark period. Nap during daytime, no later than 6 PM. +----------------------------------------------- +More information about Biphasic-X can be found at \ No newline at end of file diff --git a/commands/CAMAYL.md b/commands/CAMAYL.md index 7973a07..90937f7 100644 --- a/commands/CAMAYL.md +++ b/commands/CAMAYL.md @@ -9,4 +9,5 @@ CAMAYL (Core As Much As You Like) **Mechanism**: Variant of SPAMAYL that includes all core sleeps. Evolves well from adaptation to QC0, then QC0-flex as a helpful intermediate. The core sleeps provide more SWS than REM or vice versa depending on which hours they are placed in the day. Under emergency situations where an extended wake gap is required, a short power nap (10-15m) can be added to sustain wakefulness until the next core sleep. Strong reliance on the ability to detect when the need to rest is, to get quality core sleeps. **Adaptation difficulty**: Hard **Ideal scheduling**: 3-4 core sleeps on average from day to day, with 1-2 core sleeps around graveyard hours. Core spacing and placement should take into account natural periods of tiredness. In the afternoon 6+ hour wake gaps are common, whereas alertness may wane after 2-4 hours awake in the morning. One core sleep at night may be extended by 90m after adapted when one core has to be skipped or after a long extended wake period. ------------------------------------------------ \ No newline at end of file +----------------------------------------------- +More information about CAMAYL can be found at \ No newline at end of file diff --git a/commands/DC1.md b/commands/DC1.md index 32b5c53..dd195ac 100644 --- a/commands/DC1.md +++ b/commands/DC1.md @@ -8,4 +8,4 @@ DC1 (Dual Core 1) **Adaptation difficulty**: Moderate **Ideal scheduling**: Dusk core around 21:00 to 22:00, dawn core is free to place till 07:00 or 08:00, REM nap around noon or early afternoon ----------------------------------------------- -More information about Dual Core schedules can be found at +More information about DC1 can be found at \ No newline at end of file diff --git a/commands/DC2.md b/commands/DC2.md index 262f1b2..e0a867b 100644 --- a/commands/DC2.md +++ b/commands/DC2.md @@ -8,4 +8,4 @@ DC2 (Dual Core 2) **Adaptation difficulty**: Somewhat hard **Ideal scheduling**: First core around 22:00, second core around 05:40, noon nap and afternoon nap ----------------------------------------------- -More information about Dual Core schedules can be found at +More information about DC2 can be found at \ No newline at end of file diff --git a/commands/DC3.md b/commands/DC3.md index 0204fd0..390d20e 100644 --- a/commands/DC3.md +++ b/commands/DC3.md @@ -8,4 +8,4 @@ DC3 (Dual Core 3) **Adaptation difficulty**: Hard **Ideal scheduling**: 3-hour wake between 2 cores, dawn nap, noon nap and afternoon nap ----------------------------------------------- -More information about Dual Core schedules can be found at +More information about DC3 can be found at \ No newline at end of file diff --git a/commands/DC4.md b/commands/DC4.md index 2f2c4f4..e02d5f5 100644 --- a/commands/DC4.md +++ b/commands/DC4.md @@ -11,3 +11,4 @@ DC4 (Dual Core 4) **Ideal scheduling**: Sleeps are scheduled to start every 4 hours which resembles Uberman. Transition step to E5 or Uberman and also useful as a fallback from E5 or Uberman should adaptation fail. Generally inferior to DC3 unless keeping Uberman rhythm is useful (the extra nap leads to slower sleep onset). Cycle length on this schedule is likely to hit around 65m, so the second core might be shortenable to increase REM quantity in naps (although this is untested) ----------------------------------------------- More information about Uberman and related transitional schedules can be found at +More information about DC4 can be found at \ No newline at end of file diff --git a/commands/DUCAMAYL.md b/commands/DUCAMAYL.md index a9ba53f..5ea5c30 100644 --- a/commands/DUCAMAYL.md +++ b/commands/DUCAMAYL.md @@ -8,4 +8,6 @@ DUCAMAYL (Dual Core As Much As You Like) **Specification**: 2 cores, at least 1 short nap. **Mechanism**: Variant of SPAMAYL that includes 2 core sleeps. Evolves well from adaptation to DC1-extended, DC2-(extended) and DC3-extended then learning to flex sleep as an intermediate step. The first core sleep provides a higher percentage of SWS while the second core a higher percentage of REM. Earlier naps in the day can contain REM sleep or just light sleep to boost alertness. Requires a great sense of tiredness timing to schedule each sleep block accordingly to avoid excessive tiredness from extended wake periods. Once adapted, a core sleep can be extended by 90m occasionally. Wake gap between 2 cores can be long or short depending on days. **Adaptation Difficulty**: Hard -**Ideal Scheduling**: Both core sleeps around graveyard hours with some degree of flexibility (maximum flexibility is recommended to be 90m back and forth). A nap can be taken during noon break from work/school and a nap after work/school that have flexible hours. Wake gaps during the day are usually longer than at night, and fewer naps in the day are needed to sustain alertness thanks to the second core with abundant REM sleep. 1-3 daytime naps of 10-20m in length. Longer naps (e.g, 30-40m) are viable in early morning hours (6-10 AM) and if all SWS has been accounted for. Core(s) can be extended for 90m occasionally after adapted. \ No newline at end of file +**Ideal Scheduling**: Both core sleeps around graveyard hours with some degree of flexibility (maximum flexibility is recommended to be 90m back and forth). A nap can be taken during noon break from work/school and a nap after work/school that have flexible hours. Wake gaps during the day are usually longer than at night, and fewer naps in the day are needed to sustain alertness thanks to the second core with abundant REM sleep. 1-3 daytime naps of 10-20m in length. Longer naps (e.g, 30-40m) are viable in early morning hours (6-10 AM) and if all SWS has been accounted for. Core(s) can be extended for 90m occasionally after adapted. +----------------------------------------------- +More information about DUCAMAYL can be found at \ No newline at end of file diff --git a/commands/DYMAXION.md b/commands/DYMAXION.md index 2474e81..9bf13b1 100644 --- a/commands/DYMAXION.md +++ b/commands/DYMAXION.md @@ -11,3 +11,4 @@ Dymaxion (Dymaxion) **Adaptation difficulty**: Insanely hard **Ideal scheduling**: Arranging naps to fit in 4 aforementioned circadian needs to rest ----------------------------------------------- +More information about Dymaxion can be found at \ No newline at end of file diff --git a/commands/E1.md b/commands/E1.md index b20087d..87fa1b8 100644 --- a/commands/E1.md +++ b/commands/E1.md @@ -11,4 +11,4 @@ E1 (Everyman 1) **Adaptation difficulty**: Easy **Ideal scheduling**: Core at midnight, nap around noon ----------------------------------------------- -More information about Biphasic schedules can be found at +More information about E1 can be found at \ No newline at end of file diff --git a/commands/E2.md b/commands/E2.md index 2a25212..6de187a 100644 --- a/commands/E2.md +++ b/commands/E2.md @@ -9,4 +9,4 @@ E2 (Everyman 2) **Adaptation difficulty**: Moderate **Ideal scheduling**: Core close to midnight, nap before work, early-afternoon nap ----------------------------------------------- -More information about Everyman schedules can be found at +More information about E2 can be found at \ No newline at end of file diff --git a/commands/E3.md b/commands/E3.md index d4b291b..6c624fa 100644 --- a/commands/E3.md +++ b/commands/E3.md @@ -8,4 +8,4 @@ E3 (Everyman 3) **Adaptation difficulty**: Hard **Ideal scheduling**: Core as close to dusk as possible to gain more SWS, one nap around 04:00, one nap post-dawn, one early-afternoon nap. All naps should contain REM and little light sleep only. ----------------------------------------------- -More information about Everyman schedules can be found at +More information about E3 can be found at \ No newline at end of file diff --git a/commands/E4.md b/commands/E4.md index f83a936..f03e27c 100644 --- a/commands/E4.md +++ b/commands/E4.md @@ -11,4 +11,4 @@ E4 (Everyman 4) **Adaptation difficulty**: Very hard **Ideal scheduling**: Core before midnight, 2 naps before the day starts, noon nap, afternoon nap ----------------------------------------------- -More information about Everyman schedules can be found at +More information about E4 can be found at \ No newline at end of file diff --git a/commands/E5.md b/commands/E5.md index d026a02..ef6694c 100644 --- a/commands/E5.md +++ b/commands/E5.md @@ -11,3 +11,4 @@ E5 (Everyman 5) **Ideal scheduling**: Sleeps are scheduled to start every 4 hours which resembles Uberman. Transition step between DC4 and Uberman and also useful as a fallback from Uberman should adaptation fail. Generally inferior to E4 unless keeping Uberman rhythm is useful (the extra nap leads to slower sleep onset) ----------------------------------------------- More information about Uberman and related transitional schedules can be found at +More information about E5 can be found at \ No newline at end of file diff --git a/commands/HELP.md b/commands/HELP.md index 7383e98..ab0c07f 100644 --- a/commands/HELP.md +++ b/commands/HELP.md @@ -1,22 +1,21 @@ -__**Nap God Commands**__ -**Schedule list** `+schedules` -**Tips and tricks** `!help` -**Adaptation log help** `+loghelp` -**History help** `+histhelp` +__**NapGod Commands**__ +**Schedule list:** `+schedules` +**Information:** `!help` +**Adaptation log help:** `+loghelp` +**History help:** `+histhelp` ----------------------------------------------- -**Set your sleep schedule** `+set [schedule-name]` -**Set your napchart** `+set [napchart-link]` -**Set your timezone** `+settz [timezone]` +**Set your sleep schedule:** `+set [schedule-name]` +**Set your napchart:** `+set [napchart-link]` +**Set your timezone:** `+settz [timezone]` ----------------------------------------------- If `[username]` is omitted, the commands default to yourself. -**Look up a user's sleep status** `+status [username]` -**Look up a user's timezone** `+gettz [username]` -**Look up a user's napchart** `+get [username]` -**Look up a user's schedule history** -`+hist [username] [page]` or `+histfull [username] [page]` +**Look up a user's sleep status:** `+status [username]` +**Look up a user's timezone:** `+gettz [username]` +**Look up a user's napchart:** `+get [username]` +**Look up a user's schedule history:** `+hist [username] [page]` or `+histfull [username] [page]` ----------------------------------------------- -**Create a new napchart** `+create [time-ranges]` -**Show a napchart** `+nc [napchart-link]` -**Generate Nap God report** `+report` -**Enter Forced Productivity** `+focus [duration]` -**Leave Forced Productivity** `+unfocus` +**Create a new napchart:** `+create [time-ranges (e.g. 23:00-05:00, 13:00-13:20)]` +**Show a napchart:** `+nc [napchart-link]` +**Generate NapGod report:** `+report` +**Enter Forced Productivity:** `+focus [duration]` +**Leave Forced Productivity:** `+unfocus` \ No newline at end of file diff --git a/commands/LOGHELP.md b/commands/LOGHELP.md index edc043b..85843fd 100644 --- a/commands/LOGHELP.md +++ b/commands/LOGHELP.md @@ -1,4 +1,4 @@ ---- Nap God Adaptation Logging --- +--- NapGod Adaptation Logging --- **To log in a free format:** Type `+freelog` then write your adaptation log in the private message the bot sent you. diff --git a/commands/MHELP.md b/commands/MHELP.md index 8c19677..37a5998 100644 --- a/commands/MHELP.md +++ b/commands/MHELP.md @@ -1,8 +1,8 @@ ---- Nap God moderator help --- +--- NapGod moderator help --- ----------------------------------------------- -**To make the Nap God say something**: `+say [message]` also send attachments -**To make the Nap God say something in another channel**: `+say [#channel] [message]` also send attachements +**To make the NapGod say something**: `+say [message]` also send attachments +**To make the NapGod say something in another channel**: `+say [#channel] [message]` also send attachements **To set someone's schedule and napchart**: `+mset [schedule-name] [napchart-link] [username]`. Only the standard schedules are supported. Use none in place of the napchart link if you want the user not to have a napchart (any existing chart they have will be removed). **To add the adapted-schedule role**: `+adapted [schedule-name] [username]`. It doesn't support modified schedule. **To toggle the currently adapted role**: `+adapted [username]`. It add the adapted-schedule role of the currently set schedule. diff --git a/commands/MONO.md b/commands/MONO.md index 6fcd027..cdf8cca 100644 --- a/commands/MONO.md +++ b/commands/MONO.md @@ -8,4 +8,4 @@ Mono (Monophasic) **Mechanism**: One sleep per day, ideally sleeping in one long chunk through ALL graveyard hours (00:00-08:00) **Adaptation difficulty**: Walk in the park **Ideal scheduling**: Core at midnight, wake at 8:00 AM ------------------------------------------------ +----------------------------------------------- \ No newline at end of file diff --git a/commands/MONOPHASIC.md b/commands/MONOPHASIC.md index 6fcd027..cdf8cca 100644 --- a/commands/MONOPHASIC.md +++ b/commands/MONOPHASIC.md @@ -8,4 +8,4 @@ Mono (Monophasic) **Mechanism**: One sleep per day, ideally sleeping in one long chunk through ALL graveyard hours (00:00-08:00) **Adaptation difficulty**: Walk in the park **Ideal scheduling**: Core at midnight, wake at 8:00 AM ------------------------------------------------ +----------------------------------------------- \ No newline at end of file diff --git a/commands/NAPTATION.md b/commands/NAPTATION.md index 8e164c2..18aec71 100644 --- a/commands/NAPTATION.md +++ b/commands/NAPTATION.md @@ -10,4 +10,4 @@ Naptation (Naptation) **Adaptation difficulty**: Variable **Ideal scheduling**: Nap once every 1.7 hours. As adaptation progresses, naps can slowly be removed ----------------------------------------------- -More information about Uberman and related transitional schedules can be found at +More information about Uberman and related transitional schedules can be found at \ No newline at end of file diff --git a/commands/QC0.md b/commands/QC0.md index c1836ab..a117065 100644 --- a/commands/QC0.md +++ b/commands/QC0.md @@ -11,3 +11,4 @@ QC0 (Quad Core 0) **Adaptation difficulty**: Hard **Ideal scheduling**: One core sleep around or before midnight, the next 2 cores are ~2.5-3h apart from each other and the last core is in early/mid afternoon with a longer wake gap. ----------------------------------------------- +More information about QC0 can be found at \ No newline at end of file diff --git a/commands/SCHEDULES.md b/commands/SCHEDULES.md index 251f42e..e2ff93f 100644 --- a/commands/SCHEDULES.md +++ b/commands/SCHEDULES.md @@ -1,16 +1,29 @@ **Schedule List** -To view information about a sleep schedule, type `+[schedule-name]`, e.g. `+DC1` +To view information about a sleep schedule, type `+[schedule-name]` (e.g. `+DC1`). ----------------------------------------------- -Non-polyphasic schedules: `Mono` `Random` -Biphasic schedules: `E1` `Segmented` `Siesta` `BiphasicX` -Everyman schedules: `E2` `E3` `E4` `E5` `Trimaxion` `SEVAMAYL` -Dual core schedules: `Bimaxion` `DC1` `DC2` `DC3` `DC4` -Tri core schedules: `TC1` `TC2` `Triphasic` -Experimental/Unproven schedules: `CAMAYL` `QC0` `DUCAMAYL` -Nap only schedules: `Dymaxion` `Naptation` `SPAMAYL` `Tesla` `Uberman` +**Non-polyphasic schedules:** +`Mono` `Random` + +**Biphasic schedules:** +`Biphasic-X` `Segmented` `Siesta` `E1` + +**Everyman schedules:** +`E1` `E2` `E3` `E4` `E5` `Trimaxion` `SEVAMAYL` + +**Dual-Core schedules:** +`DC1` `DC2` `DC3` `DC4` `Bimaxion` `DUCAMAYL` + +**Tri-Core schedules:** +`Triphasic` `TC1` `TC2` + +**Experimental/Unproven schedules:** +`QC0` `CAMAYL` + +**Nap-only schedules:** +`Uberman` `Naptation` `Tesla` `Dymaxion` `SPAMAYL` ----------------------------------------------- -Supported schedule variants are `shortened` `extended` `flipped` `modified` and `recovery` +Supported schedule variants are `shortened` `extended` `flipped` `modified` and `recovery`. -Use `+set` followed by a schedule name to set a schedule. For example, `+set DC1` -You may set a schedule variant after a dash, e.g. `+set DC1-extended`. -For schedules not listed use `+set Experimental`. +Use `+set` followed by a schedule name to set a schedule (e.g. `+set DC1`). +You may set a schedule variant after a dash (e.g. `+set DC1-extended`). +For schedules not listed use `+set Experimental`. \ No newline at end of file diff --git a/commands/SEGMENTED.md b/commands/SEGMENTED.md index 4b088a1..877079e 100644 --- a/commands/SEGMENTED.md +++ b/commands/SEGMENTED.md @@ -8,3 +8,4 @@ Segmented (Segmented) **Adaptation difficulty**: Easy **Ideal scheduling**: 1 core around 21:00, should not be later than 22:00ish, 1 core till morning ----------------------------------------------- +More information about Segmented can be found at \ No newline at end of file diff --git a/commands/SEVAMAYL.md b/commands/SEVAMAYL.md index 43954d4..7e85a6d 100644 --- a/commands/SEVAMAYL.md +++ b/commands/SEVAMAYL.md @@ -10,3 +10,4 @@ SEVAMAYL (Sleep EVeryman As Much As You Like) **Adaptation difficulty**: Variable **Ideal scheduling**: Around a 4-4.5 hour core (3 x 80-90 mins) with about 2-6 naps of 10-20 minutes in length. Favor natural wakes. Cycles may naturally compress to 80m with frequent sleeps, like E3; plan for 90m cycles until there are many early natural wakes. Nap spacing should take into account natural periods of tiredness. In the evening 6 hour gaps are common, whereas alertness may wane after 3-4 hours awake in the morning. Some longer pronaps of <45m might be plausible during REM peak (6-9am) if all SWS has already been accounted for. The core might be flexed and/or varied max 90m in length, as optional variables after adapted to a base schedule. ----------------------------------------------- +More information about SEVAMAYL can be found at \ No newline at end of file diff --git a/commands/SIESTA.md b/commands/SIESTA.md index f99e848..08c9d90 100644 --- a/commands/SIESTA.md +++ b/commands/SIESTA.md @@ -10,4 +10,4 @@ Siesta (Siesta) **Adaptation difficulty**: Easy **Ideal scheduling**: Core around midnight, siesta at noon ----------------------------------------------- -More information about Biphasic schedules can be found at +More information about Siesta can be found at \ No newline at end of file diff --git a/commands/SPAMAYL.md b/commands/SPAMAYL.md index c1c9d92..37f7097 100644 --- a/commands/SPAMAYL.md +++ b/commands/SPAMAYL.md @@ -10,3 +10,4 @@ SPAMAYL (Sleep Polyphasically As Much As You Like) **Adaptation difficulty**: Insanely hard **Ideal scheduling**: Most naps should be spread during graveyard hours to avoid the need to nap during the day with work, social life, etc ----------------------------------------------- +More information about SPAMAYL can be found at \ No newline at end of file diff --git a/commands/TC1.md b/commands/TC1.md index 24ae237..7dc07e5 100644 --- a/commands/TC1.md +++ b/commands/TC1.md @@ -8,4 +8,4 @@ TC1 (Tri Core 1) **Adaptation difficulty**: Moderate **Ideal scheduling**: 3 core sleeps are concentrated during the night to boost alertness for the whole day, so only one small nap in the afternoon is needed. 3-hour rhythm among each core sleep is recommended. Distance of wake time among each core sleep could be shortened if possible, but should not be less than 2 hours. Such a schedule will include a dusk core, night core, and dawn core. ----------------------------------------------- -More information about Tri Core schedules can be found at +More information about TC1 can be found at \ No newline at end of file diff --git a/commands/TC2.md b/commands/TC2.md index c92aed2..97020b9 100644 --- a/commands/TC2.md +++ b/commands/TC2.md @@ -8,4 +8,4 @@ TC2 (Tri Core 2) **Adaptation difficulty**: Moderate **Ideal scheduling**: Evening core, graveyard core, dawn core and 2 daytime naps ----------------------------------------------- -More information about Tri Core schedules can be found at +More information about TC2 can be found at \ No newline at end of file diff --git a/commands/TESLA.md b/commands/TESLA.md index f5d969d..4364672 100644 --- a/commands/TESLA.md +++ b/commands/TESLA.md @@ -11,4 +11,4 @@ Tesla (Tesla) **Adaptation difficulty**: Insanely hard **Ideal scheduling**: Arranging naps to fit in 4 aforementioned circadian needs to rest ----------------------------------------------- -More information about Tesla can be found at +More information about Tesla can be found at diff --git a/commands/TRIMAXION.md b/commands/TRIMAXION.md index 7408c89..7b47050 100644 --- a/commands/TRIMAXION.md +++ b/commands/TRIMAXION.md @@ -10,4 +10,4 @@ Trimaxion (Trimaxion) **Adaptation difficulty**: Very hard **Ideal scheduling**: Distribution of sleep resembles Dymaxion. Transition step to Dymaxion and also as a fallback from Dymaxion should adaptation fail. ----------------------------------------------- -More information about Dymaxion and related transitional schedules can be found at +More information about Trimaxion can be found at \ No newline at end of file diff --git a/commands/TRIPHASIC.md b/commands/TRIPHASIC.md index 5bea3f7..80c4f24 100644 --- a/commands/TRIPHASIC.md +++ b/commands/TRIPHASIC.md @@ -9,4 +9,4 @@ Triphasic (Triphasic) **Adaptation difficulty**: Somewhat hard **Ideal scheduling**: One core sleep around 21:00, one around 05:30, one around noon ----------------------------------------------- -More information about Tri Core schedules can be found at +More information about Triphasic can be found at \ No newline at end of file diff --git a/commands/UBERMAN.md b/commands/UBERMAN.md index 1e33f69..88e8bc7 100644 --- a/commands/UBERMAN.md +++ b/commands/UBERMAN.md @@ -11,4 +11,4 @@ Uberman (Uberman) **Adaptation difficulty**: Insanely hard **Ideal scheduling**: Time slots free for rotation, and equidistant sleep is recommended ----------------------------------------------- -More information about Uberman and related transitional schedules can be found at +More information about Uberman and related transitional schedules can be found at \ No newline at end of file diff --git a/commands/help/adapt-methods.md b/commands/help/adapt-methods.md index 1b7e9c3..d1325ea 100644 --- a/commands/help/adapt-methods.md +++ b/commands/help/adapt-methods.md @@ -1,5 +1,8 @@ -1. Cold turkey: You jump straight from monosleep into your desired schedule. +**Cold turkey:** +Jump straight from monosleep into your desired schedule. -2. Naptation: Stay awake for around 36h then start napping for 20m (adapting to nap-only schedules like Uberman), to practice napping. +**Naptation:** +Stay awake for around 36h then start napping for 20m (adapting to nap-only schedules like Uberman), to practice napping. -3. Gradual adaptation: start with easy schedules, then move to harder ones by cutting down total sleep after each adaptation. +**Gradual adaptation:** +Start with easy schedules, then move to harder ones by cutting down total sleep after each adaptation. \ No newline at end of file diff --git a/commands/help/adapt-success.md b/commands/help/adapt-success.md index c74ea3d..ff7f491 100644 --- a/commands/help/adapt-success.md +++ b/commands/help/adapt-success.md @@ -1,6 +1,8 @@ -Signs to recognize when you have adapted to a schedule, in order of importance: -1. Feel energized and productive when awake, no memory loss, elevation in mood and good appetite. -2. Wake up feeling refreshed whether the nap or the core. No sleep inertia. -3. Fall asleep fast in all sleeps, even if you don't prepare some time beforehand to sleep. -4. Wake naturally without the need for alarms. This requires long entrainment with a sleep cycle, often months for it to be consistent. -5. You might remember more dreams from your sleep, and more vivid dreams (the dreams can come from the end of your core sleep, or you can even dream right when you fall asleep shortly). Some people remember fewer dreams, due to consistently waking from light sleep as an adaptation to rigid sleep times. +**Signs to recognize when you have adapted to a schedule, in order of importance:** +**1.** Feel energized and productive when awake, no memory loss or microsleeps. Elevation in mood and good appetite. +**2.** Wake up feeling refreshed from both naps and cores. No sleep inertia. +**3.** Fall asleep quickly in all sleeps, even if you don't prepare some time beforehand to sleep. + +**The following are not necessary to be adapted, but are common in polyphasic schedule adaptations:** +**4.** Wake naturally without the need for alarms. This requires long entrainment with a sleep cycle, often months for it to be consistent. +**5.** Remember more dreams from your sleep, and have more vivid dreams. Dreams occur most often from the end of your core sleep, but it's possible to dream shortly after you fall asleep as well. (**Disclaimer:** Some people remember fewer dreams, due to consistently waking from light sleep as an adaptation to rigid sleep times.) \ No newline at end of file diff --git a/commands/help/adaptation.md b/commands/help/adaptation.md index 3f3114f..ac7ced1 100644 --- a/commands/help/adaptation.md +++ b/commands/help/adaptation.md @@ -1,11 +1,11 @@ -First stage: -Sleep and wake up are so easy in each sleep, core sleep and naps, because sleep deprivation hasn't kicked in. Sleep quality is the same as in monosleep. Sleep stages haven't compressed. Sleep cycle is still the same (90m one cycle, presumably). +**First stage:** +Falling asleep and waking up are easy in each sleep (core sleep and naps) because sleep deprivation hasn't kicked in. Sleep quality is the same as in mono sleep. Sleep stages haven't compressed. Sleep cycle is still the same (typically 90m one cycle). -Second stage: -Starts feeling tired in the day, at some points of time. Waking up becomes harder, as total sleep is reduced. Feeling of sleepiness becomes more apparent, and sleep debts accumulate. +**Second stage:** +Tiredness is present some of the day. Waking up becomes harder as total sleep is reduced. Feeling of sleepiness becomes more apparent, and sleep debts accumulate. -Third stage: -This is where the screwups begin. Sleep debts accumulate enough to often cause an oversleep. Here it's important to maximize your alarms. (if and how much you oversleep depends on how much sleep you get in your schedule. The shorter it is, the more likely you are to oversleep). This is also the stage where you start to remember dreams in your nap(s)/core(s). Falling asleep becomes very hard for some sleeps, and during others you fall asleep very easily, but waking up from those is very hard. Repartitioning has begun. Your sleep cycle can be reduced, with the reduction of light sleep. +**Third stage:** +This is where the screwups begin. Sleep debts accumulate enough to often cause an oversleep. It's important to maximize your alarms to prevent this. (If and how much you oversleep depends on how much sleep you get in your schedule. The shorter it is, the more likely you are to oversleep). This is also the stage where many start to remember dreams in your nap(s)/core(s). Falling asleep becomes very hard for some sleeps, and during others falling asleep is easy, but waking up from those sleeps is much harder. Repartitioning has begun. Your sleep cycle can be reduced with the reduction of light sleep. -Fourth stage: -If you bypass stage 3 (by oversleeping only minimally/not at all) you enter stage 4! There's a clear difference between stage 3 and 4, where 4 feels more like stage 2. During this stage the symptoms get progressivly better. As time progresses you can start to wake naturally before alarm rings from time to time, have more vivid dreams, and falling asleep won't be an issue any longer. Waking up also becomes very easy, and you start to feel alert in the day. When nap times come, sleepiness sharply rise at that moment, and when you wake up from nap, you're fresh again till the next sleep. When you meet all !adapt-success signs you've adapted! +**Fourth stage:** +If you bypass stage 3 (by oversleeping only minimally/not at all) you enter stage 4! There's a clear difference between stage 3 and 4, where 4 feels more like stage 2. During this stage the symptoms get progressively better. As time progresses you may start to wake naturally before your alarm from time to time, have more vivid dreams, and falling asleep won't be an issue any longer. Waking up also becomes very easy, and you start to feel alert in the day. When nap times come, sleepiness sharply rises at that moment, and when you wake up from nap, you're fresh again till the next sleep. When you meet all `!adapt-success` signs you've adapted! \ No newline at end of file diff --git a/commands/help/alarms.md b/commands/help/alarms.md index 9de51e3..a36d1b5 100644 --- a/commands/help/alarms.md +++ b/commands/help/alarms.md @@ -1,6 +1,11 @@ -Have multiple devices with multiple alarms go off at 0, 1, 2, 5, 10, 15, 20m after wake. Have the first alarm be some upbeat music that makes sure you wake up with the feeling of being able to do anything! -Make smart use of barcode alarms; for example you could place a code in the fridge (pushing you to drink a glass of cold water),or in the shower. Turn off the alarms after they each go off, don't turn them off all at once. +**1.** Have multiple devices with multiple alarms go off at 0, 1, 2, 5, 10, 15, 20m after wake. Have the first alarm be some upbeat music that makes sure you wake up with the feeling of being able to do anything! -It's imperative to use more than one device, since if that device fails you likely won't get up. +**2.** Make smart use of barcode alarms; for example you could place a code in the fridge (pushing you to drink a glass of cold water),or in the shower. -Popular options for alarms are "Alarmy", and "Can't wake up". Or ask about what different people use in #sleep_tech, if you want something special. If you have a person that could wake you, make a backup alarm that's loud enough for them to hear, and make sure they know to wake you no matter what +**3.** Turn off the alarms after they each go off, don't turn them off all at once. + +**4.** It's imperative to use more than one device, since if that device fails you likely won't wake up. + +**5.** Keep each alarm device away from your bed so that you are required to get out of bed to turn it off. + +Popular app options for alarms are "Alarmy", and "Can't wake up". Ask about what different people use in #sleep_tech if you want something special. If you have a person that could wake you, make a backup alarm that's loud enough for them to hear, and make sure they know to wake you no matter what. \ No newline at end of file diff --git a/commands/help/alcohol.md b/commands/help/alcohol.md index 970731e..638ba2b 100644 --- a/commands/help/alcohol.md +++ b/commands/help/alcohol.md @@ -1,2 +1,2 @@ -Leads to changes in the balance between REM and SWS, and can mess with cycle lengths. Higher consumption wrecks sleep quality and makes you feel groggy after waking. -Moderate consumption with some time before sleep shouldn't cause issues. However, it's best avoided during adaptation completely. +Alcohol consumption leads to changes in the balance between REM and SWS, and can mess with cycle lengths. Higher consumption wrecks sleep quality and makes you feel groggy after waking. +Moderate consumption with some time before sleep shouldn't cause issues. However, it's best avoided during adaptation completely. \ No newline at end of file diff --git a/commands/help/beforeyoustart.md b/commands/help/beforeyoustart.md index 241ea6c..d235c44 100644 --- a/commands/help/beforeyoustart.md +++ b/commands/help/beforeyoustart.md @@ -1,9 +1,9 @@ When choosing a polyphasic lifestyle, before attempting a schedule, please make sure you think through of the following: -***1.*** Are you below 18? If you are, it's still possible to be polyphasic, but it's important not to reduce sleep lower than 7 hours. For more info, see !underage +**1.** Are you 18 or younger? If you are, it's still possible to be polyphasic, but it's important not to reduce sleep below 7 hours total. For more info, see `!underage`. -***2.*** Do you have sleep disorders? If you have insomnia, polyphasic sleep will help you. If you have other severe disorders like narcolepsy, sleep apnea, or something else, you shouldn't become polyphasic, or should consult a physician about your conditions first. +**2.** Do you have sleep disorders? If you have insomnia, polyphasic sleep will likely help you. If you have other severe disorders like narcolepsy, sleep apnea, or something else, consult a physician about your conditions first before becoming polyphasic. -***3.*** Do you have any physical illnesses? If you have chronic diseases like diabetes, again, consult your physician. +**3.** Do you have any physical illnesses? If you have chronic diseases like diabetes, again, consult your physician. -***4.*** Can you be polyphasic long term? Look ahead in your work/study schedule, and your future life, several months ahead. Adaptation to a sleep schedule usually takes one month, if you're strict. So, if you only have, for example, a month and a half, you shouldn't attempt polyphasic sleep at all, because you have little time to enjoy the period of success before having to switch. It's then just not worth the effort and and reduced productivity you put in. +**4.** Can you be polyphasic long term? Look several months ahead in your work/study schedule, and your future life. Adaptation to a sleep schedule usually takes one-two months, if you're strict. So if you only have, for example, a month and a half you shouldn't attempt polyphasic sleep at all, because you have little time to enjoy the period of success before having to switch, if you're able to adapt in that time at all. It's just not worth the effort and and reduced productivity that occurs during adaptation in such cases. diff --git a/commands/help/bestschedule.md b/commands/help/bestschedule.md index 5ee5d2e..2129b93 100644 --- a/commands/help/bestschedule.md +++ b/commands/help/bestschedule.md @@ -1,3 +1,3 @@ -Depends on your own need. Important considerations are your other appointments and obligations, as well as age, exercise amount, and if you wake up easily during the night. -You can look at the schedules at napchart.com, or in #botspam_shitpost under the +help command. -For recommendations, ask in #beginners and someone will be able to assist you. +This depends entirely on your own needs. Important considerations are your other appointments and obligations, as well as age, exercise amount, and if you wake up easily during the night. +You can look at the schedules at https://napchart.com/App, or in #botspam using the `+help` command. +For schedule recommendations, try ScheduleHelper's `-FindSchedules` command in #botspam, and ask for assistance in #beginners. One of our knowledgeable advisors or experienced members will assist you. \ No newline at end of file diff --git a/commands/help/caffeine.md b/commands/help/caffeine.md index 285fd07..3bae200 100644 --- a/commands/help/caffeine.md +++ b/commands/help/caffeine.md @@ -1,5 +1,5 @@ -Caffeine shouldn't be consumed at all during adaptation. It can help you, but you'll feel worse after the effects of the caffeine fade out. Caffeine's half-life is on average 6.5h (the time it takes for the caffeine amount in your body to be halved; it takes about 12-18h to be mostly removed). Therefore, it's better to consume decaffeinated drinks. +Caffeine shouldn't be consumed at all during adaptation. It can help you feel better in the short-term, but you'll feel worse after the effects of the caffeine fade out. Caffeine's half-life (the time it takes for the caffeine amount in your body to be halved; it takes about 12-18h to be mostly removed) is on average 6.5h. Therefore, it's better to consume decaffeinated drinks. -Caffeine replaces valuable REM and SWS with light sleep, meaning that even if you would fall asleep, your quality suffers a lot. +Caffeine prevents or limits entry into deeper vital sleep stages, effectively replacing valuable REM and SWS with light sleep. This means that that even if you would fall asleep, your sleep quality will suffer substantially. -The one exception is Segmented; here it's okay to consume a moderate amount in the morning. Note that use past noon should still be avoided. +The only exception is Segmented. It's okay to consume a moderate amount of caffeine in the morning. Note that use past noon should still be avoided. Use https://coffeecalc.cc to determine how much caffeine you can intake without reducing your sleep quality. \ No newline at end of file diff --git a/commands/help/cannabis.md b/commands/help/cannabis.md index 8100eb2..b54a273 100644 --- a/commands/help/cannabis.md +++ b/commands/help/cannabis.md @@ -1 +1 @@ -A very limited amount of research has been done with regards to cannabis affecting sleep. Research and anecdotal evidence points to cannabis reducing the amount of REM sleep and increasing SWS, possibly also increasing it's daily need. Because of this it should be completely avoided during adaptation, and consumption should atleast be kept at a moderate amount after adaptation. See !drugs. +A very limited amount of research has been done with regards to cannabis affecting sleep. Research and anecdotal evidence points to cannabis reducing the amount of REM sleep and increasing SWS, possibly also increasing its daily need. Because of this it should be completely avoided during adaptation, and consumption should at least be kept at a moderate amount after adaptation. See `!drugs` for more information. diff --git a/commands/help/circadian.md b/commands/help/circadian.md index 67a4395..219939d 100644 --- a/commands/help/circadian.md +++ b/commands/help/circadian.md @@ -1,7 +1,7 @@ -Your circadian rythm is set by blue light and food intake (also partly by temperature and physical activity); to keep it intact it's wise to keep a 6-12 (preferably 8-10) hour dark period (with only red light allowed, see !darkperiod) coinciding with an 8-12 hour fasting period. Both the dark period and the fasting should start 2h prior to the core. Not doing so has a major bad influence on your core's sleep quality, and leads to elevated risks of getting diabetes, cancer and cardiovascular diseases. +Your circadian rythm is maintained and shifted by blue light and food intake (and to a lesser extent, temperature and physical activity). To keep your circadian intact it's wise to keep a 6-12 (preferably 8-10) hour dark period (with only red light allowed, see `!darkperiod`) coinciding with an 8-12 hour fasting period. Both the dark period and fasting should start 2h prior to the core. Not doing so has a highly negative influence on your core's sleep quality, and leads to elevated risks of getting diabetes, cancer and cardiovascular diseases. -The length of the dark period can directly affect the amount of SWS in the core, which means minor tweaking of the length of the dark period can be benefitial in order to get high amounts of quality sleep. The effects are easiest seen with a sleep tracker, see !sleeptracker. +The length of the dark period can directly affect the amount of SWS in the core, which means minor tweaking of the length of the dark period can be benefitial in order to get high amounts of quality sleep. The effects are easiest seen with a sleep tracker, see `!sleeptracker`. -If your core doesn't start 20-24 it is wise to have the dark period be slightly cooler than the rest of the day. In this case getting a daylight lamp to use outside of the dark period is also recommended. +If your core doesn't start within the hours of 20:00-24:00 it is wise to have the dark period be slightly cooler than the rest of the day. In this case getting a daylight lamp to use outside of the dark period is also recommended. -Also try to limit physical activities during the dark period. +Try to limit physical activities that raise your heart rate during your dark period. \ No newline at end of file diff --git a/commands/help/compression.md b/commands/help/compression.md index 87a9bdf..6818e7c 100644 --- a/commands/help/compression.md +++ b/commands/help/compression.md @@ -1,3 +1,3 @@ -Sleepcycle compression is mostly observed in the dualcore line. Segmented creates a gap between the two cores (first core SWS sleep, second core REM sleep), which allows both the SWS peak and REM peak (about 9h apart) to be "hit" during sleep, and removes one cycle. This causes the sleep cycles to increase in length (105m). DC1 removes one REM-heavy cycle and adds one 20m nap, and the cycles compress some (100m). DC2 adds another nap, and compresses the cycles down further. (80m) +Sleep cycle compression is mostly observed in dual core schedules. Segmented creates a gap between the two cores which allows both the SWS peak (typically 21:00-24:00) and REM peak (typically 06:00-09:00) to be overlapped during sleep allowing for the removal of a sleep cycle. This causes the sleep cycles to increase in length (105m). DC1 removes one REM-heavy cycle and adds one 20m nap, and the cycles compress some (100m). DC2 adds another nap, and compresses the cycles down further. (80m) -All schedules except DC1 and Segmented should first be scheduled to have 90m cycles from the start; if you start to regularly wake up before the alarm after the third week of adaptation, you can assume the cycles have compressed more. In that case the alarms can be altered to accommodate this. +All schedules except DC1 and Segmented should first be scheduled to have 90m cycles from the start. If you start to regularly naturally wake before your alarm after the third week of adaptation, you can assume the cycles have compressed. In that case the alarms can be altered to accommodate this. \ No newline at end of file diff --git a/commands/help/darkperiod.md b/commands/help/darkperiod.md index 89ff26e..3db7229 100644 --- a/commands/help/darkperiod.md +++ b/commands/help/darkperiod.md @@ -1,8 +1,6 @@ -Melatonin is essential for entering SWS, however it's production is delayed by all light types except red. Because of this all non-red light types should be completly blocked off during the dark period, which should start 2h prior to the core (first core on DC schedules, night core on Triphasic) and continue for 6-12h (preferably 8-10h) after that (time spent sleeping counts as inside the dark period). The reason it should continue even after your wake time (if you have a short core) is to ensure the stability of the circadian rhythm. Darkness is stil preferred over red light, so using night themes is the best option. The light blocking can be done by either wearing blue-green light blocking glasses or by using programs such as F.lux, sunsetscreen etc on a low kelvin setting (around 1000K). Having red lightbulbs is also an option. +Melatonin is essential for entering SWS, however its production is delayed by all light wavelengths except red. Because of this, all non-red light should be completely blocked off during the dark period, which should start 2h prior to the core (first core on DC schedules, night core on Tri-Core) and continue for 6-12h (preferably 8-10h) after that (time spent sleeping is included as part of the dark period). The Dark Period should continue even after your wake time (if you have a short core) to ensure the stability of the circadian rhythm. The light blocking can be done by either wearing blue-green light blocking glasses or by using programs such as F.lux, sunsetscreen etc on a low kelvin setting (around 1000K). Installing red LED bulbs is also an option. -Schedule line specifics -DC: if your cores are within 5h from eachother the dark period should cover the whole core gap. -E: the dark period should extended until the end of the first nap as long as the total duration of the dark period does not exceed 12h. -Triphasic: the gap between the night and dawn cores should be covered in the dark period - -For why this is important, see !circadian +**Schedule line specifics** +`DC:` If your cores are within 5h of each other, the dark period should cover the whole core gap. +`E:` The dark period should extended until the end of the first nap as long as the total duration of the dark period does not exceed 12h. +`TC:` The gap between the night and dawn cores should be covered in the dark period. \ No newline at end of file diff --git a/commands/help/dayblock.md b/commands/help/dayblock.md index 4348e05..a7e5be8 100644 --- a/commands/help/dayblock.md +++ b/commands/help/dayblock.md @@ -1 +1 @@ -If you can't nap at all during the day, or you can nap during the day but you can't stick to one particular time everyday, please choose Segmented sleep, or a biphasic variant that has the nap after work (5-6 PM) and then have another sleep late in the morning and wake later, for example. +If you can't nap at all during the day, or you can nap during the day but you can't sleep at the same exact particular time every day, you should choose Segmented sleep or a biphasic variant that has the nap after work (17:00-18:00) and then another sleep late in the morning with a later wake, for example. \ No newline at end of file diff --git a/commands/help/diet.md b/commands/help/diet.md index d08aafe..143b43a 100644 --- a/commands/help/diet.md +++ b/commands/help/diet.md @@ -1,5 +1,5 @@ -Intermittent fasting is fine for polyphasic sleep, and a ketogenic (low-carb) diet should pose no problems. Make sure to keep at least an 8-hour fasting period (no food) that coincides with the dark period. +Intermittent fasting is acceptable for polyphasic sleep, and a ketogenic (low-carb) diet should pose no problems. Make sure to keep at least an 8-hour fasting period (no food or non-water liquids) that coincides with the dark period. On E2 and E3, it's best to not eat until after the first nap. On DC schedules, it's important not to eat between the cores. -For more advice, ask in #fitness_and_nutrition +For more advice, ask in #fitness_and_nutrition. \ No newline at end of file diff --git a/commands/help/discipline.md b/commands/help/discipline.md index 6159d3d..8df3971 100644 --- a/commands/help/discipline.md +++ b/commands/help/discipline.md @@ -1 +1 @@ -When adapting to a schedule, stick to ALL sleep times in your schedule tightly for the first month. Go to bed at the same time everyday (highly recommended). Even if you don't fall asleep fast at first, keep sticking with your schedule, and eventually you will be fast asleep when sleep times come. Try not to oversleep during adaptation. Small mess-ups should still be tolerable and you can still adapt after around one month or so. +When adapting to a schedule, make sure to stick precicely to ALL sleep times in your schedule for the first month. Go to bed at the same time every day without exception. Even if you don't fall asleep fast at first, keep sticking with your scheduled sleep times, and eventually you will fall asleep asleep quickly when sleep times come. Avoid oversleeping at all costs during adaptation. Small mess-ups should still be tolerable and you can still adapt after around one-two months. See `!alarms` for advice for avoiding oversleeps. \ No newline at end of file diff --git a/commands/help/drugs.md b/commands/help/drugs.md index 76cb768..be4ea5b 100644 --- a/commands/help/drugs.md +++ b/commands/help/drugs.md @@ -1 +1 @@ -Avoid all drugs that alters your sleep either directly (messes with sleep stages/cycle lengths, makes you sleepy/more alert etc) or indirectly (makes you lose control in some way). This is especially important during adaptation, check in #fitness_and_nutrition or read some studies if you're unsure about a certain drug. +Avoid any drug that alters your sleep either directly (by altering sleep stages/cycle lengths, making you sleepier/more alert, etc) or indirectly (by making you you lose control or motivation in some way). This is especially important during adaptation. Check in #fitness_and_nutrition or read some studies if you're unsure about a certain drug. \ No newline at end of file diff --git a/commands/help/dst.md b/commands/help/dst.md index 0d40d2e..e441e93 100644 --- a/commands/help/dst.md +++ b/commands/help/dst.md @@ -1,20 +1,15 @@ DST is known as Daylight Saving Time. -DST can be hard on your schedule, since rotating it during adaptation will confuse your body as to when it's supposed to sleep. Tiredness/groggyness during the wrong times is not uncommon. There are 3 ways to deal with DST: +DST can be hard on your schedule because altering sleep times during adaptation will confuse your body as to when it's supposed to sleep. Tiredness/grogginess during the wrong times is not uncommon. There are 2 ways to deal with DST: -***1.*** -Rotate the schedule 1h in a single day. -Pros: fast change, works if schedule doesn't allow anything else -Cons: sets your adaptation back several days, and you'll feel groggy for a while, increasing the risk of oversleeps +**1. Rotate the schedule 1h in a single day.** +**Pros:** Fast change, works if schedule doesn't allow anything else. +**Cons:** Sets your adaptation back several days, and you'll feel groggy for a while, increasing the risk of oversleeps. This can also initiate a stage 3/4 loop that prevents adaptation entirely in some cases. -***2.*** -Switch by a small amount of time for a number of days (max around 10m/day) -Pros: might not actually set you back at all -Cons: takes a long time and precise planning to execute. Also requires a schedule that allows this +**2. Stick to the old schedule:** +**Pros:** No setback whatsoever. +**Cons:** Requires you to have a schedule that allows it shifting by an hour. -***3.*** -Stick to the old schedule -Pros: no setback whatsoever -Cons: requires you to have a schedule that allows it +**Do not** rotate your schedule by a small increment of time over the course of a number of days, as this has been shown to destabilize your circadian rhythm more than shifting all at once. -If you're planning to start a polyphasic sleep schedule but have DST coming up soon it's wise to either go with the schedule you'll end up with in the end or wait until DST passes before switching schedules. +If you're planning to start a polyphasic sleep schedule but have DST coming up soon it's wise to either go with the schedule you'll end up with in the end or wait until DST passes before switching schedules. \ No newline at end of file diff --git a/commands/help/dualcore.md b/commands/help/dualcore.md index 7322607..5a8b3fe 100644 --- a/commands/help/dualcore.md +++ b/commands/help/dualcore.md @@ -1,5 +1,5 @@ -***Dual Core schedules:*** -The idea with the Dual Core (DC) line is to split the core into 2 parts to hit both the sws (21-24) and rem (06-09) peaks to acchieve the highest quality sleep. Due to the placement of the cores the first core will contain mostly SWS, while the other one will contain mostly REM. -People who often wake up during the night without being able to fall back asleep easily are often naturally Segmented, and the DC-line is recommended for them. -Cycle compression is present in the DC-line (see !compression). -If you aren't able to sleep at these times ask in #beginners if you will be able to adapt to a DC schedule! +**Dual Core schedules:** +The premise behind the Dual Core (DC) line is that splitting the night core into 2 parts to allow each core to overlap with a vital sleep peak. The first core overlaps with the SWS peak (21:00-24:00) and second core overlaps with the REM peak (06:00-09:00) to achieve the highest quality sleep. Due to the placement of the cores, the first core will contain mostly SWS, while the second will contain mostly REM. +People who often wake up during the night without being able to fall back asleep easily are often naturally Segmented, and the DC line is recommended for them. +Cycle compression is often present in the DC line (see `!compression`). +If you aren't able to sleep at these times ask in #beginners if you will be able to adapt to a DC schedule! \ No newline at end of file diff --git a/commands/help/everyman.md b/commands/help/everyman.md index aafed79..1bb36d9 100644 --- a/commands/help/everyman.md +++ b/commands/help/everyman.md @@ -1,8 +1,8 @@ -***Everyman:*** -The Everyman (E) line has one single core and an amount of naps during the day. The idea behind this line is that 90m chunks of the core are traded for an equivalent number of 20m naps during the day. +**Everyman:** +The Everyman (E) line has a single core and naps during the day. The premise of this schedule line is that 90m chunks of the core are traded for an equivalent number of 20m naps during the day. The core of the E schedules can be scheduled slightly later than the DC ones, since the core should contain both SWS and REM. -*A too late core will not get you sufficient SWS* +*A core that is scheduled too late will not allow you to achieve sufficient SWS.* -After adaptation the naps of E1 and E2 can be quite flexible; in order to gain some flexibility with E3 the core has to be extended to 3,5h. DO NOT flex at all during adaptation. -E4 is below the minimum sleep threshold, and should generally be avoided. +After adaptation the naps of E1 and E2 can be quite flexible; in order to gain some flexibility with E3 the core should be extended to 3.5h. **DO NOT** flex at all during adaptation. +E4 and E5 are below the minimum sleep threshold, and should generally be avoided. \ No newline at end of file diff --git a/commands/help/exercise.md b/commands/help/exercise.md index c907795..b8835a6 100644 --- a/commands/help/exercise.md +++ b/commands/help/exercise.md @@ -1,9 +1,11 @@ -***Exercise:*** -People who do alot of intense muscle building (HIIT, lifting, etc) need at least 3 cycles in their core (first core for DC) to handle the increased SWS need. Cardio doesn't increase the SWS need significantly. +**Exercise:** +People who do a lot of intense muscle building (HIIT, lifting, etc) need at least 3 sleep cycles in their core (first core for DC) to handle the increased SWS need. Cardio doesn't increase the SWS need significantly. -Most people should leave a 2h gap between exercising and sleeping in order to avoid having the exercising interfere with the sleep. +Most people should have at least 2h after exercising before sleeping in order to avoid having the exercising interfere with their sleep. It is advised to do cardio in the morning and lifting in the evening post-adaptation. During adaptation it's best to avoid increasing the SWS need, since it can cause an oversleep later. Because sleep deprivation hinders muscle gain, you also won't get the desired results. Exercising can be beneficial to you during adaptation, if it's integrated into your morning routine to avoid oversleeping. + +It is best to avoid raising your heart rate during dark period, so avoid cardio and intense workouts during DP. \ No newline at end of file diff --git a/commands/help/experiments.md b/commands/help/experiments.md index d2c5bb3..6e75003 100644 --- a/commands/help/experiments.md +++ b/commands/help/experiments.md @@ -1 +1 @@ -The Experiments group aims to study how different substances and activities (like caffeine, meditation, and sugar) affect sleep with the aid of EEG sleep trackers. This improves the legitimacy of the community and helps exchange speculative claims into scientific ones. After enough data is gathered the results will be posted on the polyphasic website. The Experiments group is looking for adapted polyphasic or monophasic sleepers with sleep trackers, people who plan on getting sleep trackers or people who are willing to help contribute to the community by analyzing data, programming or are otherwise just curious for what happens in the R&D side of the server. If any of these criteria fit you please tag a moderator and ask them to give you the ‘Experimenter’ role! +The Experiments group aims to study how different substances and activities (such as caffeine, meditation, and sugar) affect sleep with the aid of EEG sleep trackers. This improves the legitimacy of the community and helps exchange speculative claims into scientific ones. After enough data is gathered, the results will be posted on the polyphasic website. The Experiments group is looking for adapted polyphasic or monophasic sleepers with sleep trackers, people who plan on getting sleep trackers, or people who are willing to help contribute to the community by analyzing data, programming, or are otherwise just curious for what happens in the R&D side of the server. If any of these criteria fit you please tag a moderator and ask them to give you the `Experimenter` role! \ No newline at end of file diff --git a/commands/help/eyestrain.md b/commands/help/eyestrain.md index c084a86..c8225ee 100644 --- a/commands/help/eyestrain.md +++ b/commands/help/eyestrain.md @@ -1,2 +1,2 @@ -***Eyestrain:*** -If you have problems with eye strain during screen use, it is suggested that you take regular breaks and switch to paper media for reading. Also from 2h prior to the core for 6-8h (preferably 8h) forwards you should only allow red light to hit your eyes. Do this by using programs such as F.lux on your computer, by having red light in your house, or by wearing red-tinted glasses. +**Eyestrain:** +If you have problems with eye strain during screen use, it is suggested that you take regular breaks and switch to paper media for reading, and to look at somethinig farther away for 20s to allow your eyes to relax. Also for a period of 6-12h (preferably 8-10), beginning 2h prior to the first cor, you should avoid light (especially blue light). Red light is the least harmful, and does not have to be avoided (but high levels of red light are still undesirable). Do this by using programs such as F.lux on your computer, by having red light in your house, or by wearing red-tinted glasses. See `!darkperiod` for more information. \ No newline at end of file diff --git a/commands/help/fallasleep.md b/commands/help/fallasleep.md index 02b83aa..45009c6 100644 --- a/commands/help/fallasleep.md +++ b/commands/help/fallasleep.md @@ -1,5 +1,6 @@ -***Falling asleep:*** -Try to lower your body temperature to fall asleep more easily. Create a sleep-inducing environment like the dark, try focusing on your breath, inhale and exhale at regular intervals. -Keep away from thoughts; perhaps try reading something entertaining before bed. Have a hot shower around 1h before sleep time. listen to lulling music, brown/white noise or ASMR. Stay away from electronics (esp. screens) at least 15m before bedtime. +**Falling asleep:** +Try to lower your body temperature to fall asleep more easily. Create a sleep-inducing environment by lowering the light level in the room, remain calm, and try focusing on your breath. Inhale and exhale at regular intervals. +Try to avoid getting caught in stimulating trains of thought, and perhaps try reading something entertaining before bed. Have a hot shower around 1h before sleep time. Listen to lulling music, brown/white noise or ASMR. Stay away from electronics (esp. screens) at least 15m before bedtime. +Remaining calm is essential for falling asleep, so it is most helpful to accept that you may not fall asleep quickly (or at all for naps at first), and enjoy the relaxing, meditative personal time. Remember that laying down and attempting to sleep will help the body learn when it's time to sleep, causing you to fall asleep faster in the future. In addition, simply laying down and resting provides a wakefulness boost, albeit smaller than if you fall asleep. Don't get discouraged, and keep trying. -If you fail to fall asleep even after a long time on the schedule doing a harder one, like Naptation, E3 etc, until you fall asleep reliably is an option. The ability to nap is a skill that's been anecdotally proven to stick even after going back to mono for a long time, so recovering after learning to fall asleep is recommended. See !recovery +If you fail to fall asleep even after a long time on the schedulem, spending some time on a harder schedule like Naptation, E3, etc. until you fall asleep reliably can be helpful. The ability to nap is a skill that has been anecdotally proven to stick even after going back to mono sleep for a long time, so recovering after learning to fall asleep is recommended. See `!recovery` for more information. \ No newline at end of file diff --git a/commands/help/flexing.md b/commands/help/flexing.md index 48dc562..53c8cc3 100644 --- a/commands/help/flexing.md +++ b/commands/help/flexing.md @@ -1,14 +1,12 @@ -- Flexing means to start one or more scheduled sleeps at different times on different days, keeping the sleep length the same. It's strongly discouraged for beginner polysleepers, and has the best chance of success after being adapted for a month or two to a strict schedule. -- Nap times can be flexed as little as 15 minutes in either direction, or as much as 2-3hours either direction, which takes longer to adapt to. -- Always keep at least 2-3hrs gap between sleeps even if flexing. -- Napping in peak SWS pressure of circadian rhythm (broadly 20:00 through 02:00) is still strongly discouraged. -- Gradually increasing flex range is recommended, and you can start with flexing just one nap to be safe. -- Flexing the core is risky and not recommended, but possible to a small degree for experienced polysleepers. -- Length of adaptation takes some number of weeks that increases with difficulty of base schedule, number of sleeps flexed, range of flexing, and how much (if at all) you are flexing a core. +Flexing is when you start one or more scheduled sleeps at different times than scheduled, but keeping the sleep length the same. This is strongly discouraged for beginner polysleepers (especially during adaptation), as it can prevent adaptation or even cause you to unadapt. Flexing should only be done in small increments, after being adapted for a month or two to a strict schedule. -- Tricks to make flexing a schedule easier: -> don't flex core, -> increase core lengths 30m (e.g. to 3.5h for E3 or 5h for E2), -> increase core lengths by a 90m cycle (e.g. to 4.5h for E3 or 6h for E2) -> don't flex the first nap, if there are more than one -> choose a schedule with at least 5.5hrs total sleep per day. (As far as only 4.5h daily, several people have adapted to flexing naps in E3 with a 3.5h core and a stable first nap.) +Nap times can be flexed as little as 15m in either direction, or as much as 2-3h either direction, which takes longer to adapt to. Always keep at least 2-3h gaps between sleeps even when flexing. Gradually increasing flex range is recommended, and it's recommended to start by flexing just one nap by 15m to be safe. +The length of a flexing adaptation takes a varying weeks that increases with difficulty of base schedule, number of sleeps flexed, range of flexing, and how much (if at all) you are flexing your core(s). + +**Tricks to make flexing a schedule easier:** +> Avoid napping in peak SWS pressure of circadian rhythm (broadly 20:00-02:00). +> Avoid flexing your core(s) unless you are a experienced polysleeper, and/or are adapted to a higher TST schedule. +> Increase core lengths 30m (e.g. to 3.5h for E3 or 5h for E2). +> increase core lengths by a 90m cycle (e.g. to 4.5h for E3 or 6h for E2). +> Avoid flexing your first nap (if your schedule has more than one). +> Choose a schedule with at least 5.5h total sleep per day. (Several people have adapted to schedules with a 4.5h TST and flexed naps, such as E3 with a 3.5h core and a stable first nap.) diff --git a/commands/help/genetics.md b/commands/help/genetics.md index a5f2a50..39b13a2 100644 --- a/commands/help/genetics.md +++ b/commands/help/genetics.md @@ -1 +1 @@ -This module mentions people with specific genetic mutations that allow them to function at optimal level while thriving with much less sleep than a normal human being. We often need 7-8h of sleep per day (monophasic sleep) to be fully functional, however some people need less than 6h of total sleep each day. A common gene which affects the general sleep requirement is the DEC2 gene. The sleep compression can be much better than for regular people, enabling them to take on schedules like Uberman, Dymaxion, SPAMAYL, etc with the possibility to succeed long term. If you have lower sleep requirements, you should know that by the time you're an adult or so. Therefore, think twice before attempting these nap-only schedules, to maintain health benefits for long term. +Some people have specific genetic mutations that allow them to function at optimal levels with much less sleep than the average person. Most people need 7-8h of sleep per day on monophasic schedules to be fully functional, but some people need less than 6h of total sleep each day. A common gene which affects the general sleep requirement is the DEC2 gene. Their sleep compression is often much higher than most people, enabling them to attempt schedules like Bimaxion, Trimaxion, SPAMAYL (and in rare cases even Dymaxion or Uberman), with a higher possibility to succeed long term than most. If you have lower sleep requirements, you would likely know that by the time you're an adult. Therefore, think twice before attempting these extreme schedules, as they may have negative health effects in the long term. \ No newline at end of file diff --git a/commands/help/graveyard.md b/commands/help/graveyard.md index 67e821c..571c239 100644 --- a/commands/help/graveyard.md +++ b/commands/help/graveyard.md @@ -1 +1 @@ -The graveyard hours typically lasts from midnight to 8 AM. The need to rest during this period is very high, and so it's generally best to have a lot of sleep in these hours, for health benefits. +The graveyard hours typically lasts from midnight to 08:00. The need to rest during this period is greater than during the day, so it's generally best to have the majority of your sleep in these hours, which can also have benefits of improved health. \ No newline at end of file diff --git a/commands/help/help.md b/commands/help/help.md index 12db3e0..c58d85e 100644 --- a/commands/help/help.md +++ b/commands/help/help.md @@ -1,53 +1,40 @@ -!adapt-methods -!adapt-success -!adaptation -!alarms -!alcohol -!beforeyoustart -!bestschedule -!caffeine -!cannabis -!circadian -!compression -!darkperiod -!dayblock -!diet -!discipline -!drugs -!dst -!dualcore -!everyman -!exercise -!experiments -!eyestrain -!fallasleep -!flexing -!genetics -!graveyard -!howtobegin -!latecore -!memory -!melatonin -!nap-eat -!naplength -!napspot -!nicotine -!nightshift -!ns -!oss -!polyprep -!prematurewake -!products -!recovery -!repartition -!secondwind -!sickness -!skipnap -!sleepdebt -!sleeptracker -!smartalarm -!stayawake -!sugar -!tankphasic -!travelling +**General Polyphasic Info**``` +!beforeyoustart !jumpintoschedule +!ns !products +!polyprep !recovery !underage +``` +**Scheduling**``` +!bestschedule !dayblock +!dualcore !everyman +!graveyard !latecore +!naplength +``` +**Adaptation Information**``` +!adaptation !adapt-methods +!adapt-success !alarms +!discipline !dst +!exercise !eyestrain +!fallasleep !flexing +!howtobegin !microsleep +!napspot !nightshift +!oss !prematurewake +!repartition !sickness +!skipnap !stayawake +!travelling +``` +**Sleep Science**``` +!circadian !compression +!darkperiod !experiments +!genetics !melatonin +!memory !secondwind +!sleepdebt !sleepstages +!sleeptracker !smartalarm +!tankphasic +``` +**Substances**``` +!alcohol !caffeine +!cannabis !diet +!drugs !nap-eat +!nicotine !sugar +``` \ No newline at end of file diff --git a/commands/help/howtobegin.md b/commands/help/howtobegin.md index 004c04e..a99e69d 100644 --- a/commands/help/howtobegin.md +++ b/commands/help/howtobegin.md @@ -1,5 +1,5 @@ Now that you've got a schedule and learned other tips, how do you begin? Here are the following things to keep in mind: -1. You would want to fall asleep fast in your first core sleep, or first nap. If you have your core/nap earlier than your usual sleep time, try sleeping at the scheduled time anyways. If you aren't able to sleep that day you'll fall asleep easier the next day! -2. Prepare and make sure your alarms work! Lack of knowledge of alarm usage is recipe for adaptation failure! See !alarms -3. If you oversleep or undersleep, keep sticking to the schedule! If you constantly oversleep see !os -4. Make sure you look through other tips! +**1.** You would want to fall asleep fast in your first core sleep, or first nap. If you have your core/nap earlier than your usual sleep time, try sleeping at the scheduled time anyways. If you aren't able to sleep that day you'll fall asleep easier the next day! +**2.** Prepare and make sure your alarms work! Lack of knowledge of alarm usage is recipe for adaptation failure! See `!alarms` for more information. +**3.** If you oversleep or undersleep, keep sticking to the schedule! If you consistently oversleep see `!os`. +**4.** Make sure you look through other tips (use `!help` to see a full list). diff --git a/commands/help/jumpintoschedule.md b/commands/help/jumpintoschedule.md new file mode 100644 index 0000000..9ec120d --- /dev/null +++ b/commands/help/jumpintoschedule.md @@ -0,0 +1,13 @@ +**Before you start your schedule, you should get used to the future bedtime before starting, to minimize the amount of initial sleep deprivation you build up from the first night.** + +For example, you want to do mono->E1, but your current bedtime deviates from the one you want to have on E1: +`Current mono bedtime:` 24:00 +`Desired E1 bedtime:` 23:00 + +Jumping into the schedule right away would most likely lead to you not being able to fall asleep for at least an hour, so you would right away start with a lot more sleep deprivation. This will make oversleeping later in adaptation more likely. + + +If you have troubles shifting back your bedtime, you can try a few things to aid this process: +**1.** Apply a proper dark period about 2-3hrs prior your bedtime. This is a good practice for beginning any polyphasic schedule. +**2.** Shift by small amounts each day by ~30m intervals. +**3.** Take your time with it and do it gradually, laying in bed for hours straight without sleeping won't help you. \ No newline at end of file diff --git a/commands/help/latecore.md b/commands/help/latecore.md index 486ede0..736417a 100644 --- a/commands/help/latecore.md +++ b/commands/help/latecore.md @@ -1,3 +1,3 @@ -Having a late core is possible in theory, but it's going to be hard to maintain practically. If the core doesn't start between 20 and 24 (21-23 for DC schedules) optimal circadian management is going to be required (see !circadian). The less sleeping time the core has the harder having a late core is going to be. +Having a late core is possible in theory, but it's going to be hard to maintain practically. If the core doesn't start between 20:00-24:00 (21:00-23:00 for DC schedules), optimal circadian management is going to be required (see `!circadian`). The less sleeping time the core has, the harder having a late core is going to be. -It's easier to pull off a late core if the bedtime doesn't change after starting adaptation. If there's a big switch in the time when the core starts the risk of getting an SWS rebound increases a lot, even for schedules with over 2 cycles in the core. +It's easier to pull off a late core if the bedtime doesn't change after starting adaptation. If there's a big switch in the time when the core starts, the risk of getting an SWS rebound increases a lot, even for schedules with over 2 cycles in the core. \ No newline at end of file diff --git a/commands/help/melatonin.md b/commands/help/melatonin.md index 56489e4..f6dc8d8 100644 --- a/commands/help/melatonin.md +++ b/commands/help/melatonin.md @@ -1,2 +1,2 @@ -Melatonin is useful for setting core bedtime earlier or later than it has been, just like its common use for jetlag. This is especially useful for setting your circadian rhythm on the first 1-4 days of your new schedule. -For polyphasic, it's recommended NOT to use extended time-release melatonin, as those are designed for mono-length sleeps. Typically only take for a few nights at a time. Amount of melatonin effective will vary per person. Toxicity of melatonin is known to be extremely low, but common doses range from 1-5mg, or 10mg in rare cases. +Melatonin is useful for setting core bedtime earlier or later than it has been, just like its common use for jetlag. This is especially useful for setting your circadian rhythm on the first 1-4 days of your new schedule. +For polyphasic schedules, it's recommended NOT to use extended time-release melatonin, as those are designed for mono-length sleeps (~8h). Typically only take for a few nights at a time. The optimal amount of melatonin will vary per person. Toxicity of melatonin is known to be extremely low, but common doses range from 1-5mg, and 10mg in rare cases. \ No newline at end of file diff --git a/commands/help/memory.md b/commands/help/memory.md index 2993f46..816606e 100644 --- a/commands/help/memory.md +++ b/commands/help/memory.md @@ -1,11 +1,11 @@ -During adaptation your memory can be expected to be impaired due to lowered amounts of REM and SWS, but after adaptation it will restored to that of a natural wakes mono or possibly better due to the frequent breaks (naps). +During adaptation your memory can be expected to be impaired due to lowered amounts of REM and SWS, but after adaptation it will restored to that of a natural wakes mono or possibly better due to the more frequent breaks throughout the day (naps or cores). -SWS is responsible for storage of declarative/explicit memory, i.e. recall of explicit factual information. like if you study for a history, or a biology test. X happened on date Y. A in the body does thing B. +SWS is responsible for storage of declarative/explicit memory, i.e. recall of explicit factual information. For example: if you study for a history, or a biology test; X happened on date Y; A in the body does thing B. -REM is responsible for storage of procedural memory, i.e. remembering how to do certain things by following a procedure. example include how to walk, how to ride a bike, how to play a specific piano piece. Rem is also responsible for emotionally related memory consolidation, and for spatial memory consolidation (together with light sleep), i.e. which way to walk to your friends house. +REM is responsible for storage of procedural memory, i.e. remembering how to do certain things by following a procedure. For example: how to walk, how to ride a bike, how to play a specific piano piece. Rem is also responsible for emotionally related memory consolidation, and for spatial memory consolidation (together with light sleep), i.e. which way to walk to your friend's house. -If you're trying to remember procedures by repetition, napping is a good way to boost that. if you're trying to remember chunks of information, you won't get any gain there until your core sleep and its best to study that stuff before the core. +If you're trying to remember procedures by repetition, napping is a good way to boost that. If you're trying to remember chunks of information, you'll experience the most improvement after your core sleep. It is best to study these types of things before your core(s). -If you have to follow some procedure every time, for example you do X, then Y, then Z, and it leads to Q, and you're following the procedure over and over, REM sleep will help. If you have to just recall some piece of information off the top of your head, SWS sleep will help. +If you have to follow some procedure every time, for example you do X, then Y, then Z, and it leads to Q, and you're following the procedure over and over, REM sleep will help. If you need to recall some piece of information off the top of your head, SWS sleep will help. -Many things require a bit of both SWS and REM. When you are learning something you probably have some sort of impact on most of the memory types, so getting good quality sleep is going to help you regardless, it's better to study, sleep, then take the test, than it is to pull an all nighter. you're much more likely to have good recall after sleeping. +Many things require a bit of both SWS and REM. When you are learning something, you probably have some sort of impact on most of the memory types, so getting good quality sleep is going to help you regardless. It's better to study, sleep, and then take the test, than it is to pull an all nighter. You're much more likely to have better recall after sleeping. \ No newline at end of file diff --git a/commands/help/microsleep.md b/commands/help/microsleep.md new file mode 100644 index 0000000..487093d --- /dev/null +++ b/commands/help/microsleep.md @@ -0,0 +1,11 @@ +Microsleeping occurs when the body is so sleep deprived that it forcibly shuts itself down for a few seconds, up to a minute or two (any longer is called a crash) in order to regain some vital sleeps. It's essentially your body's way of saying "if you won't sleep enough, I'll force you to!". + +Microsleeps are generally preceeded by an alertness dip, and often occur in cycles of 2-5 microsleeps in a row. It's best to stand up and move around (see `!stayawake`) to prevent getting caught in microsleep cycles and then subsequently crashing. + +Microsleeps can be difficult to avoid, but it's imperative that you limit them as much as possible for the following reasons + +**1.** If you have consistent microsleeps every day, they can become repartitioned into your sleep schedule, causing you to microsleep at the same time every day. + +**2.** The more you microsleep on a daily basis, the more likely you are to continue doing so in subsequent days, which may lead to crashes (oversleeps). + +**3.** If you microsleep an extreme amount, it can even delay your adaptation by preventing you from achieving high enough levels of sleep deprivation to begin the repartitioning process. \ No newline at end of file diff --git a/commands/help/nap-eat.md b/commands/help/nap-eat.md index 1a6af57..121f8de 100644 --- a/commands/help/nap-eat.md +++ b/commands/help/nap-eat.md @@ -1 +1,3 @@ -Eat a regular meal around 2-3h before a nap (digestion before sleep), or after a nap. Some light snacks are ok within 1-2h before nap. +Digestion activates your nervous system which increases sleep onset times, and prevents or limits your body from entering the deeper vital stages of sleep. + +It is best to eat meals at least 2-3h before a nap (to allow time for digestion before sleep), or after a nap. Some light snacks such as fruit are okay within 1-2h before nap. \ No newline at end of file diff --git a/commands/help/naplength.md b/commands/help/naplength.md index b8a2dd9..a9a6dd7 100644 --- a/commands/help/naplength.md +++ b/commands/help/naplength.md @@ -1,2 +1,5 @@ -Generally, the nap lengths are best to be 20 minutes. Don't allow yourself more than 2m to fall asleep (stick with 20m preferably). Once sleep deprivation starts to kick in you will fall asleep within minutes, and if your naps are any longer you risk entering SWS; which is both hard and unpleasant to wake from. If you want to sleep longer, try aiming for a full cycle of 90m. -If you don't have the ability to take 20m naps then two 15m naps could replace one 20m. Keep all naps the same length. +30 minute naps are notoriously difficult to wake up from because you enter SWS around 25 minutes in on average, and SWS can cause bad sleep inertia, zombie mode (a lack of awareness upon waking that causes you to turn off your alarms without fully waking up, and then go back to sleep), or worse, simply sleeping through your alarm in some extreme cases. It's also unhealthy to interrupt SWS. For these reasons, we usually recommend 20m over 30m for naps. + +Don't allow yourself more than 2m to fall asleep (ideally, stick with 20m total nap time). Once sleep deprivation starts to kick in, you will fall asleep within minutes, and if your naps are any longer you risk entering SWS. If you want to sleep longer, try aiming for a full cycle of 90m. + +If you don't have the ability to take 20m naps then two 15m naps could replace one 20m. Keep all naps the same length. \ No newline at end of file diff --git a/commands/help/napspot.md b/commands/help/napspot.md index 90f3943..706169d 100644 --- a/commands/help/napspot.md +++ b/commands/help/napspot.md @@ -1 +1 @@ -Try to avoid sleeping in bed since it increases the risk of oversleeping. Sleeping on a flat surface (with carpet) is recommended for spine assistance, waking on time, and other health benefits. It's possible to train yourself to sleep while sitting, being in a car or laying on an uncomfortable surface. Stick to it and you'll fall asleep eventually! +Try to avoid sleeping in bed since it increases the risk of oversleeping. Sleeping on a flat surface (with carpet) is recommended for spine health, waking on time, and other health benefits. It's possible to train yourself to sleep while sitting in a chair or car, or laying on an uncomfortable surface. Stick with it and you'll fall asleep eventually! \ No newline at end of file diff --git a/commands/help/nicotine.md b/commands/help/nicotine.md index b1c241b..d28546e 100644 --- a/commands/help/nicotine.md +++ b/commands/help/nicotine.md @@ -1 +1 @@ -Nicotine should be completely avoided while doing a Polyphasic Sleeping schedule. Nicotine has a half life of about 2 hours after which it gets turned into cotine with a half-life of about 19 hours. Both of these are stimulants, which means they will make it harder to fall asleep and reduce the quality of the sleep you do get (replacing SWS and REM with light sleep). Nicotine can also alter the circadian rhythm. +Nicotine should be completely avoided while doing a Polyphasic Sleeping schedule. Nicotine has a half life of about 2h after which it gets turned into cotine with a half-life of about 19 hours. Both of these are stimulants, which means they will make it harder to fall asleep and reduce the quality of the sleep you do get (replacing SWS and REM with light sleep). Nicotine can also alter your circadian rhythm, which is both unhealthy and harmful to your adaptation. \ No newline at end of file diff --git a/commands/help/nightshift.md b/commands/help/nightshift.md index 561e14c..222f395 100644 --- a/commands/help/nightshift.md +++ b/commands/help/nightshift.md @@ -1,5 +1,6 @@ For those who work night shifts, polyphasic sleep can be possible, if: -1. You can have a short nap at work. -2. Your night shift schedule is stable everyday, for a long time to come. -3. You don't have any health problems (night shift workers tend to have higher blood pressure, heart rate, even some sleep disorders, due to messed-up biological clock). -For health benefits, any form of biphasic sleep is a good choice. One core sleep after work, when you go home, and a small nap before you go to work is a good approach to take on. Everyman sleep can be chosen, but, beware of tougher adaptation process. +**1.** You can have a short nap at work. +**2.** Your night shift schedule is stable everyday, for the foreseeable future. +**3.** You don't have any health problems (night shift workers tend to have higher blood pressure, heart rate, even some sleep disorders, due to destabilized circadian rhythm). + +For health benefits, any form of biphasic sleep is a good choice. A good approach is to have one core sleep after work when you go home, and a small nap before you go to work. Everyman schedules are viable, but beware of their tougher adaptation process in this context. \ No newline at end of file diff --git a/commands/help/ns.md b/commands/help/ns.md index c032fe0..b8e4266 100644 --- a/commands/help/ns.md +++ b/commands/help/ns.md @@ -1,6 +1,6 @@ -NS stands for Newcomer Syndrome, which often happens to new polyphasic sleepers, who aim for the hardest sleep schedules like Uberman, Tesla, and Dymaxion; knowing that they DON'T have the mutations to sleep way less in the day without ever feeling tired (If you have this gene, you have known it by the time you became an adult already). This syndrome is severe because it cultivates the misconception that everyone can sleep as little as 2 hours per day; while gaining superhuman productivity. (You most likely can not.) +NS stands for "Newcomer Syndrome", which often occurs in new polyphasic sleepers, who decide to the hardest sleep schedules like Uberman, Tesla, and Dymaxion knowing that they DON'T have the short sleeper genes that would allow them to sleep less in the day without feeling tired. (If you have this gene, you would have known by the time you became an adult). This syndrome is severe because it cultivates the misconception that everyone can sleep as little as 2 hours per day while gaining superhuman productivity. (You most likely can not.) -The adaptation to these hostile schedules is extremely severe, let alone sticking with them long term (can still cause physical/mental exhaustion long-term, due to the great lack of amount of deep sleep stages to provide sufficient recovery for daily sleep need). +The adaptation to these hostile schedules is extremely severe, and sticking with them long term can cause severe physical/mental exhaustion due to the extreme lack of amount of vital sleep stages that are normally present. If you're a newcomer, please be realistic in choosing a suitable sleep schedule for yourself, and take your time to consider what's best for your own well-being. -Try to stay above 4h of sleep if you're over 21. If you're between 18 and 21 you should get at least 5 hours of sleep, and if you're underage, see !underage +Try to sleep for more than 4h a day if you're over 21. If you're between 18 and 21 you should get at least 5h of sleep, and if you're underage, see `!underage`. \ No newline at end of file diff --git a/commands/help/oss.md b/commands/help/oss.md index 173f3c9..5fc8465 100644 --- a/commands/help/oss.md +++ b/commands/help/oss.md @@ -1,9 +1,7 @@ -OSS stands for "oversleeping syndrome." This applies to those who keep oversleeping when adapting to a sleep schedule, but still keep moving on and claiming they will adapt eventually. The syndrome is also fatal for adaptation, because: +OSS stands for "OverSleeping Syndrome." This applies to those who keep consistently oversleeping while adapting to a sleep schedule, but keep continuing and expecting to adapt eventually. The syndrome is also fatal for adaptation, because: -***1.*** -Continuing to oversleep and to try to adapt will mess up one's circadian rhythm and sleep compression entirely. The body is trying to adjust to a certain sleep cycle length, but this can only happen with **no** oversleeping. +**1.** Continuing to oversleep while trying to adapt will mess up one's circadian rhythm and sleep compression entirely. The body is trying to adjust to a certain sleep cycle length, but this can only happen with **no** oversleeping. -***2.*** -As sleep is not stabilized (oversleeping when supposed to be awake), the person will fail to adapt to a schedule and thus will constantly be plagued in sleep deprivation. Long-term sleep deprivation leads to obesity, diabetes, increased heart rate, headaches, fatigue, frequent anger, etc... +**2.** As sleep is not stabilized (oversleeping during intended waking time), the person will fail to adapt to a schedule and thus will constantly be plagued in sleep deprivation. Long-term sleep deprivation leads to obesity, diabetes, increased heart rate, headaches, fatigue, frequent anger and more negative symptoms. -The solution to this syndrome is generally to go back to monophasic sleep for at least 1-2 weeks to regain homeostasis, then attempt to adapt to a polyphasic schedule again. This is called "recovery" (see `!recovery`). +The solution to this syndrome is generally to go back to monophasic sleep or another non-reducing schedule for at least 1-2 weeks to regain homeostasis, then attempt to adapt to a polyphasic schedule again. This is called "recovery" (see `!recovery`). \ No newline at end of file diff --git a/commands/help/polyprep.md b/commands/help/polyprep.md index 772c823..5129754 100644 --- a/commands/help/polyprep.md +++ b/commands/help/polyprep.md @@ -1,11 +1,11 @@ --- Take some time to prepare for your schedule if possible. Quit caffeine, nicotine, drugs and extra sugar before starting. Start eating healthier and exercising. --- Begin teaching yourself to get up the moment you wake up. Start having both a night and morning routine. --- Inform people around you about what you will be doing and how this is going to be affecting both you and them. --- Start scouting out possible locations where you can nap. --- Read up to understand polyphasic adaptation and what to expect. That includes other !help commands like !adaptation and !os, , and asking any questions in the Discord. --- Consider shifting your current core wake time or bedtime toward your new core's bedtime or wake time, if either is possible. --- Install and practice using all apps you may need, like alarm apps, F.lux/Twilight/Sunsetscreen, or productivity apps. --- Ensure your health and safety if you have any stress-aggravated medical conditions, like cardiovascular problems or seizures or suicidal thoughts, as you will be going through weeks of mild to severe sleep deprivation. Severity depends on the person and the schedule. See a doctor to determine if short-term sleep deprivation is an acceptable risk for you. --- Create at least two huge lists: -1) Tasks toward major, motivating goals that inspire your interest in more time or better sleep. -2) Easy, time-consuming tasks that you can make yourself do while tired and unmotivated, like cleaning or cooking. +**1.** Take some time to prepare for your schedule if possible. Quit caffeine, nicotine, drugs and excess sugar before starting. Start eating healthier and exercising. +**2.** Begin teaching yourself to get up the moment you wake up. Start having both a night and morning routine. +**3.** Inform people around you about what you will be attempting and how this may affect both you and them. +**4.** Start scouting out possible locations where you can nap. +**5.** Read up to understand polyphasic adaptation and what to expect. That includes other `!help` commands like `!adaptation` and `!oss`, , and asking any questions in #general_polyphasic, #beginners, or another relevant channel. +**6.** Consider shifting your current core wake time or bedtime toward your new core's bedtime or wake time if either is possible, and implement the dark period you will be following when you begin your schedule. +**7.** Install and practice using all apps you may need, like alarm apps (see `!alarms`), F.lux/Twilight/Sunsetscreen, or productivity apps. +**8.** Ensure your health and safety if you have any stress-aggravated medical conditions, like cardiovascular problems or seizures or suicidal thoughts, as you will be going through weeks of mild to severe sleep deprivation. Severity depends on the person and the schedule. See a doctor to determine if short-term sleep deprivation is an acceptable risk for you. +**9.** Create at least two huge lists: + **1.** Tasks toward major, motivating goals that inspire your interest in more time or better sleep. + **2.** Easy, time-consuming tasks that you can make yourself do while tired and unmotivated, like cleaning or cooking. diff --git a/commands/help/prematurewake.md b/commands/help/prematurewake.md index 4334a63..cbdb8f2 100644 --- a/commands/help/prematurewake.md +++ b/commands/help/prematurewake.md @@ -1 +1 @@ -If you naturaly wake prematurely (<5m on a nap, <30m on a core), get out of bed. Don't try to cram in more sleep until the alarm rings. You might fall asleep and wake up in SWS, or sleep through your alarm. Falling back asleep could also be difficult and thus you'd spend time unnecessarily trying to do so. +If you naturaly wake prematurely (<5m on a nap, <30m on a core), get out of bed. Don't try to cram more sleep until the alarm rings. You might fall asleep and wake up in SWS, or sleep through your alarm. Falling back asleep could also be difficult and thus you'd waste time unnecessarily trying to do so. \ No newline at end of file diff --git a/commands/help/products.md b/commands/help/products.md index 215dfaf..25b1dce 100644 --- a/commands/help/products.md +++ b/commands/help/products.md @@ -1,7 +1,8 @@ More information regarding products can be found on: -We do not endorse any specific products from specific sellers! For alternatives, ask in #sleep_tech! -Amazon requires that the following sentance is mentioned: +We do not endorse any specific products from specific sellers! For alternatives, ask in #sleep_tech. + +*Amazon requires that the following sentance is mentioned:* As an Amazon Associate I earn from qualifying purchases. Some fellow polyphasers now offer redistributions of items with long shipping times, or exclusive items. Check here: diff --git a/commands/help/recovery.md b/commands/help/recovery.md index 7c40977..1fe8bd0 100644 --- a/commands/help/recovery.md +++ b/commands/help/recovery.md @@ -1,19 +1,20 @@ -Recovery is the concept of sleeping with natural wakes until all sleep deprivation is gone. This is usually done for 1-2 weeks, but it can take less time or more time depending on the amount of sleep deprivation accumulated. While doing recovery one should have a set time for the start of the sleep. +Recovery is the concept of sleeping with natural wakes until all sleep deprivation is gone. This usually takes about 1-2 weeks, but it can take more or less time depending on the amount of sleep deprivation accumulated. While doing recovery one should have a consistent start time for your sleep(s). Recovery is usually done: --before doing a polyphasic sleep schedule, if one is sleep deprived --after falling into OS --after one oversleep so big you know you won't be able to continue due to the huge setback. +**1.** Before doing a polyphasic sleep schedule, if one is sleep deprived. +**2.** After falling into OSS (see `!OSS`). +**3.** After an oversleep big enough that you know you won't be able to continue. -Mono-recovery is the prefered recovering schedule (one core), but it's also possible to recover on biphasic schedules (will likely take longer due to the alleviated sleep deprivation during the day): -E1-recovery, one 20m nap during the day and a core in the night without an alarm -Siesta-recovery, one 90m core during the day and a core in the night without an alarm -Segmented-recovery, one 3,5h core, followed by a break and another core without an alarm. +Mono-recovery (one core) is the prefered recovering schedule, but it's also possible to recover on biphasic schedules (will likely take longer due to the alleviated sleep deprivation during the day): +**E1-recovery:** One 20m nap during the day and a core in the night without an alarm. +**Siesta-recovery:** One 90m core during the day and a core in the night without an alarm. +**Segmented-recovery:** One 3.5h core, followed by a break and another core without an alarm. Recovering from a polyphasic schedule often follows this pattern: A few days with a short core (due to the body remembering to wake up early) -> many days with a long core --> 2-3 days of core times of the usual length -This is when one is done recovering, when the sleep has stabilized at a set length that's of similar length to before attempting polyphasic sleep, around 6-8h for most adults +-> 2-3 days of core times of the usual length. -If recovery with natural wakes is impossible due to scheduling limitations doing it with as much sleep as one can get is possible, but recovering will take a longer amount of time. +You are likely done recovering when the sleep has stabilized at a set length that's of similar length to before attempting polyphasic sleep, around 6-8h for most adults. + +If recovery with natural wakes is impossible due to scheduling limitations, you can recover simply by attempting to get as much sleep as you can get, but recovery will take longer. \ No newline at end of file diff --git a/commands/help/repartition.md b/commands/help/repartition.md index 47662f4..bc3578a 100644 --- a/commands/help/repartition.md +++ b/commands/help/repartition.md @@ -1,6 +1,7 @@ -During adaptation and after adaptation to a polyphasic schedule is successful, sleep stage repartition is complete. Repartition means the rearrangement of sleep stages into each sleep (core/nap) in your schedule. This results in a nap possibly full of SWS in the evening, another nap full of REM around dawn for example. +After successfully adaptating to a polyphasic schedule, sleep stage repartition is complete. Repartition means the rearrangement of vital sleep stages into each sleep (core/nap) in your schedule. This results in situations where a sleeper may have a nap full of SWS in the evening, and a nap full of REM around dawn. -***Before repartitioning***: When one first begins polyphasic sleep, sleep stages have not been repartitioned. The process of falling asleep goes like this: Sleeper enters NREM1 (Non-REM), light sleep, with wakeful state for some time, then NREM2, starting to fall asleep and reality of surrounding fades and awareness gradually becomes null, NREM3 (or SWS, aka slow-wave sleep), a stage that they sleep the deepest, and there's usually no dreaming in this stage, and finally REM (rapid eye movement) where dreams occur. And this process applies to monophasic sleepers. +**Before repartitioning**: When one first begins polyphasic sleep, sleep stages have not been repartitioned. The process of falling asleep goes like this: Sleeper enters NREM1 (Non-REM; light sleep), with wakeful state for some time, then NREM2, starting to fall asleep and reality of surrounding fades and awareness gradually becomes null, NREM3 (or SWS, Slow-Wave Sleep), the deepest sleep stage, and finally REM (Rapid Eye Movement), where dreams occur. This process applies to monophasic sleepers as well. -***After repartitioning***: Once adaptation is complete, your sleep schedule is stabilized in each sleep. It's common to expect a very dreamy nap around dawn in your location, suggesting that the nap is REM dominant. You will obviously go through NREM1 and NREM2 (takes some time to fall asleep), but you bypass NREM3 to enter REM. Since adaptation is successful, you wake up easily and after around 15m of REM (this number is just an example), you enter NREM1, then wake up comfortably. If you nap late in the day, close to evening, the results vary - you might enter REM very fast after lying down, or it could be an SWS dominant nap, in which you can't recall dreams, or sleep very deeply. Or you could get both SWS and REM in just a 20m nap, which is still possible. -**Conclusively**, after repartitioning is complete, NREM1 and NREM2 are reduced in your sleeps, saving space for SWS and REM which are more important for physical and mental functions. +**After repartitioning**: Once adaptation is complete, your sleep schedule is stabilized in most sleeps. It's common to expect a very dreamy nap around dawn, suggesting that the nap is REM dominant. You will obviously go through NREM1 and NREM2 (takes some time to fall asleep), but you bypass NREM3 to enter REM. Since adaptation is successful, you wake up easily and after around 15m of REM (this number is just an example), you will likely enter NREM1 and wake up comfortably. If you nap late in the day, results vary - you might enter REM very quickly after lying down, or it could be an SWS dominant nap, in which you won't recall dreams and you'll sleep very deeply. You may also get both SWS and REM in just a 20m nap. + +**Conclusively**, after repartitioning is complete, NREM1 and NREM2 are reduced in your sleeps, saving space for SWS and REM which are more important for physical and mental functions. \ No newline at end of file diff --git a/commands/help/secondwind.md b/commands/help/secondwind.md index ac089f9..b88cf46 100644 --- a/commands/help/secondwind.md +++ b/commands/help/secondwind.md @@ -1 +1 @@ -https://en.wikipedia.org/wiki/Second_wind_(sleep) +https://en.wikipedia.org/wiki/Second_wind_(sleep) \ No newline at end of file diff --git a/commands/help/sickness.md b/commands/help/sickness.md index 0e13573..d3a0fbd 100644 --- a/commands/help/sickness.md +++ b/commands/help/sickness.md @@ -1,4 +1,4 @@ -When you're sick with anything more than a mild flu (with symptoms above the neck), it's best to return to monosleep, to fully recover before continue polyphasic sleep. If you are adapted to a schedule and get sick, you can still be polyphasic, but lengthen your core sleep(s) and nap(s) to extend recovery. During sleep deprivation of polyphasic sleep, it will be worse for your immune system to resist sickness. -Try boosting your immune system before trying to adapt again. Make sure you're eating healthy, exercising and so on! +When you're sick with anything more than a mild flu (with symptoms above the neck), it's best to return to mono to fully recover before continue polyphasic sleep. If you are adapted to a poly schedule and get sick, you can still be polyphasic, but lengthen your core sleep(s) and nap(s) to extend recovery. During sleep deprivation of polyphasic sleep, it will be harder for your immune system to resist sickness. +Try boosting your immune system before trying to adapt again. Make sure you're eating healthily, exercising and so on! -Naps can be replaced by an extra full cycle; do not use a random length. +Naps should be replaced by an extra full cycle; do not use a random length. \ No newline at end of file diff --git a/commands/help/skipnap.md b/commands/help/skipnap.md index 1056468..a5dd221 100644 --- a/commands/help/skipnap.md +++ b/commands/help/skipnap.md @@ -1,8 +1,8 @@ -During adaptation (first month), it's best to follow your schedule strictly, and avoid oversleeping and skipping nap or changing your sleep schedule around continuously. -If you're going to miss sleep it's best to skip rather than to move, since moving counts as an oversleep (any sleep outside of schedule), which sets you back. +During adaptation (first month), it's imperative to follow your schedule strictly and avoid oversleeping and skipping naps or changing your sleep schedule at all. +If you cannot avoid missing a sleep it's best to skip rather than to move, since moving counts as an oversleep (any sleep outside of schedule), which sets you back. Losing a nap means you'll increase the risk of an oversleep later, so be sure you're prepared for this. Set up extra alarms or ask someone to check on you to make sure you're awake. Move your sleeps only if you know not doing so will result in an even bigger oversleep later. Make sure it's not too close to the next nap/core sleep (spare around 4h before the next core sleep, if your nap is 30m or below). -If you have to skip some parts of your core do it in chunks of 90m (full cycles) to avoid waking up in the middle of them (increased SWS wake risk). If you have to skip your whole core try to at least get some naps in during that time. +If you have to skip some parts of your core do it in chunks of 90m (full cycles) to avoid waking up in the middle of them (increased SWS wake risk). If you have to skip your whole core try to at least get some naps in during that time. \ No newline at end of file diff --git a/commands/help/sleepdebt.md b/commands/help/sleepdebt.md index 50d332c..0a8e9a8 100644 --- a/commands/help/sleepdebt.md +++ b/commands/help/sleepdebt.md @@ -1,4 +1,4 @@ -Depending on how much sleep you sleep on monophasic schedule, sleep debt can hit you hard or not at all when you are adapting to a polyphasic pattern. Generally, expect sleep debts to build and hit you around week 2 or 3, if you don't oversleep. +Depending on how long you sleep on monophasic schedule, sleep debt can hit you hard or not at all when you are adapting to a polyphasic schedule. Generally, expect sleep debt to build and hit you around week 2 or 3 if you don't oversleep. Eventualy the sleep debt will allow you to fall asleep instantly for your sleeps. When enough sleep debt builds up you'll get a REM rebound, which inserts REM into the beginning of every sleep, and on schedules with a split SWS core/with low amounts of sleep you can also expect an SWS rebound to occour. -Repartition happens because of sleep debt and sticking to your schedule, see !repartition +Repartitioning happens because of sleep debt if you rigidly adhere to your schedule. See `!repartition` for more information. \ No newline at end of file diff --git a/commands/help/sleepstages.md b/commands/help/sleepstages.md new file mode 100644 index 0000000..214fc05 --- /dev/null +++ b/commands/help/sleepstages.md @@ -0,0 +1,9 @@ +SWS (aka deep sleep or NREM3), REM, and Light Sleep (aka NREM1 and NREM2) are all stages of sleep. + +**SWS** (Slow-Wave Sleep) is a vital sleep stage, and the deepest stage of sleep, during which the glymphatic system is activated. Read more here: + +**REM** (Rapid-Eye Movement) is a vital sleep stage, and is most well-known for having more frequent occurrences of dreaming. Read more here: + +**Light Sleep** is a non-vital sleep stage (though it is theorized that it is healthy to have at least 20% light sleep in your core(s)). It is mostly a transitional stage of sleep, though it serves other purposes, and is usually the most pleasant to wake from. Read more here: + +The average sleep cycle is 90m long, though they can vary person to person. They usually begin with Light Sleep, then transition to SWS, Light Sleep, and then REM, before restarting. Read more here: \ No newline at end of file diff --git a/commands/help/sleeptracker.md b/commands/help/sleeptracker.md index e412953..d82be5b 100644 --- a/commands/help/sleeptracker.md +++ b/commands/help/sleeptracker.md @@ -1,7 +1,7 @@ Most products claiming to track your sleep are not accurate, since they are based only on body movement. This includes most fitness trackers and apps. Generally, anything that's not on your head won't be able to produce a reliable result. -Sleeptrackers that the users here are experienced with are the Olimex openEEG (+-200$); and the Zeo. -The Olimex is a semi-DIY solution that produces great results; the Zeo is an out-of the box solution but only available secondhand. Expect to pay 60-100$ for a Zeo. The Zeo is less accurate than the Olimex. +Sleep trackers that the users here are experienced with include the Olimex openEEG (+-200$); and the Zeo. +The Olimex is a semi-DIY solution that produces great results; the Zeo is an out-of the box solution but only available secondhand. Expect to pay 40-100$ for a Zeo. The Zeo is less accurate than the Olimex. Other head-mounted solutions may or may not provide the right results; when in doubt, ask in #sleep_tech for more information! diff --git a/commands/help/smartalarm.md b/commands/help/smartalarm.md index 5d22e8b..18e9703 100644 --- a/commands/help/smartalarm.md +++ b/commands/help/smartalarm.md @@ -1,4 +1,4 @@ -App or smartband-based smartalarms will be very unreliable; since they rely on sub-par sleeptracking to work. (look at !sleeptracker for the accuracy reports; most are below 50% accurate.) -The Zeo Bedside's "gentle wake up" could be considered if on mono; Wake up lights can be considered for mono, E1, Siesta, and the second core of Segmented. +App or smartband-based "smart alarms" are unreliable because they rely on sub-par sleeptracking to work. (See `!sleeptracker` for the accuracy reports; most are below 50% accurate.) +The Zeo Bedside's "gentle wake up" could be considered if on mono, and wake-up lights can be considered for mono, E1, Siesta, and the second core of Segmented. -The different wake-up times of "smartalarms" will keep you from stabilizing to waking up the same time each day on your own. This means that in the long-term, you'd wake up feeling good on more days if you keep a regular alarm than if you'd use an unpredictable smart-alarm. Poly can't normally handle the random sleep reductions; cutting out 30m is a big deal. +The different wake-up times of "smart alarms" will keep you from stabilizing to waking up the same time each day on your own. This means that in the long-term, you'd wake up feeling good on more days if you keep a regular alarm than if you'd use an unpredictable smart-alarm. Poly can't normally handle the random sleep reductions; cutting out 30m can be highly impactful. \ No newline at end of file diff --git a/commands/help/stayawake.md b/commands/help/stayawake.md index 40ae300..5e5b7a3 100644 --- a/commands/help/stayawake.md +++ b/commands/help/stayawake.md @@ -1 +1 @@ -If you're too sleepy, try increasing body temperature to stay awake. That includes eating protein, do some exercise (jumping jacks, walking, a set of pushups, plank, etc), or focus on doing something you love. Keep your mind in an excited state. +If you're too sleepy, try increasing body temperature to stay awake. That includes eating protein, exercising (jumping jacks, walking, pushups, planking, etc), or focus on doing something you enjoy or excites you. You can also improve alertness by increasing blood flow to the brain via methods like eating ice chips or doing handstands. \ No newline at end of file diff --git a/commands/help/sugar.md b/commands/help/sugar.md index b8b88f8..0b4db83 100644 --- a/commands/help/sugar.md +++ b/commands/help/sugar.md @@ -1,3 +1,3 @@ -Consuming too much sugar should be avoided. After consumption of mainly sugar you get a boost in energy for up to 45 minutes, during which it's going to be very hard to fall asleep. Abundant sugar mixed with plenty of fiber, protein, and/or fat should reduce the intensity of the sugar high but make it last up to a couple hours. When this wears off, you'll reach an energy low for as long as a couple hours where you risk oversleeping. +Consuming too much sugar should be avoided. After consumption of mainly sugar you get a boost in energy for up to 45 minutes, during which it's difficult to fall asleep. Abundant sugar mixed with plenty of fiber, protein, and/or fat should reduce the intensity of the sugar high, and can make it last up to a couple hours. When this wears off, you'll reach an energy low for as long as a couple hours where you risk oversleeping. -The quality of your sleep will also suffer. SWS will be replaced by light sleep and you'll be more prone to waking up in the middle of your sleep (which will also result in a lower quality sleep). +The quality of your sleep will also suffer as a result of too much sugar. SWS will be replaced by light sleep and you'll be more prone to waking up in the middle of your sleep (which will also result in a lower quality sleep). \ No newline at end of file diff --git a/commands/help/tankphasic.md b/commands/help/tankphasic.md index e7f8afe..c2881be 100644 --- a/commands/help/tankphasic.md +++ b/commands/help/tankphasic.md @@ -1,9 +1,10 @@ -This module is to help newcomers visualize how polyphasic sleep can be described via battery charging principles. Now that you have understood what REM and SWS mean, how repartition works (type !repartition if you haven't) and what the post-adaptation period is like, here's the battery-charge principle that shows the relationship of how our body gets REM, SWS and our performance on polyphasic sleep: +Polyphasic sleep can be understood more easily though battery charging principles. If you don't know what REM and SWS mean see `!sleepstages`. If you aren't familiar with how repartition works see `!repartition`. -We have *two different batteries* - (REM battery and SWS battery) and they usually refill when we're asleep. These two batteries have different capacities and they recharge at different speeds. The charging circuit has to switch between them to make sure they're both decently filled because it can only charge one at a time. -Now if one of the batteries is completely empty (REM runs out faster), you don't have enough power left to wake up, sorry, or you just shut off without warning...and when its very low, some stuff shuts off completely to save power (zombie mode, in which you oversleep and later wake and don't remember anything) or it intermittently shuts off for small periods of time to try and slow down the battery drain (microsleep, in which you doze off for a few seconds and up to some minutes). +This battery-charge principle shows the relationship of how our body gets REM, SWS and our performance on polyphasic sleep: - When the battery is just low, but not very low, you feel sleep deprived (like when you get the red power indicator light, or that annoying "your battery is running low" popup warning). When the battery is medium or higher you feel okay (green light, no warnings). Like a normal battery it takes way way more time to get from empty to full than it takes to get from empty to medium. The SWS battery doesn't usualy drain fully on schedules with >5h of sleep. +We have *two different batteries* (REM battery and SWS battery) and they usually refill when we're asleep. These two batteries have different capacities and they recharge at different speeds. The charging circuit has to switch between them to make sure they're both decently filled because it can only charge one at a time. +If one of the batteries is completely empty (more often REM, since it runs out faster), you don't have enough power left to wake up, or you just shut off without warning. When its very low, some stuff shuts off completely to save power (zombie mode, in which you oversleep and later wake and don't remember anything) or it intermittently shuts off for small periods of time to try and slow down the battery drain (see `!microsleep`). + + When the battery is just low, but not very low, you feel sleep deprived (like when you get the red power indicator light, or that annoying "your battery is running low" popup warning). When the battery is medium or higher you feel okay (green light, no warnings). Like a normal battery it takes way way more time to get from empty to full than it takes to get from empty to medium. The SWS battery doesn't usualy drain fully on schedules with >5h of sleep. The **objective on polysleep** is to set up the charging routine and battery level in such a way that you're batteries are full and get filled the instant they're drained (because of rebounds). diff --git a/commands/help/travelling.md b/commands/help/travelling.md index 72fac3f..16769cd 100644 --- a/commands/help/travelling.md +++ b/commands/help/travelling.md @@ -1,13 +1,19 @@ -Being on a polyphasic schedule while also travelling is possible but hard to pull off. If time zones are switched there are 3 recommend options; -Sticking with the original schedule -Rotating the schedule to fit the new timezone -Returning to monophasic sleep +Being on a polyphasic schedule while also travelling is difficult, but possible. If time zones are switched there are 3 recommend options: + +**1.** Sick with the original schedule. +**2.** Rotate the schedule to fit the new timezone. +**3.** Return to monophasic sleep for the duration of the trip. The optimal route is to stick with the original schedule during the travel, but depending on the duration of the stay rotating the schedule should also be possible. Note that rotating the schedule will cause adaptation to be set back. During adaptation it’s important to stick to all sleeping times, which is why many delay their adaptation until after they’ve travelled. -Jetlag happens when you travel through different time zones. If you go with changing your schedule during the stay you will initially struggle to fall asleep fast in the new time zone, and your schedule will become a mess. Depending on how long your trip is, how long you stay in the new region, and how long you have been polyphasic the travel can be hard or relatively easy to handle. +Jetlag occurs when you travel through different time zones. If you decide to change your schedule during the stay you will likely initially struggle to fall asleep fast in the new time zone, and your schedule may become a mess. Depending on how long your trip is, how long you stay in the new region, and how long you have been polyphasic, the travel can be difficult or relatively easy to handle. + +Tips for optimal polyphasic travelling: -Plan the trip so your core aligns with the flight if possible. +**1.** Plan the trip so your core aligns with the flight if possible. -Try not to core in the airports, as you will be vulnerable to thefts, personal safety, etc. +**2.** Try not to core in the airports, as you will be vulnerable to thefts, personal safety, etc. -If you're adapted you can flex the naps if possible. Skipping will also be more manageable, and small oversleeps tolerable. +**3.** If you're adapted, you can flex the naps if possible. Skipping will also be more manageable, and small oversleeps tolerable. -If you haven't started your schedule yet waiting until after the travel is possibly the best option. +**4.** If you haven't started your schedule yet, waiting until after you travel is often the best option. diff --git a/commands/help/underage.md b/commands/help/underage.md index ff1f635..bab6ad0 100644 --- a/commands/help/underage.md +++ b/commands/help/underage.md @@ -1,15 +1,16 @@ -***Underage*** -Under-aged people, especially those under 16 should avoid cutting any sleep at all. Those over 16 are strongly recommended to do one of the following schedules, since both their brain and body is still developing, and cutting out light sleep could have effects that are detrimental for the body in the future: -- E1 (6h20m) -- Siesta (6h30, even Siesta-extended is plausable, clocking in at 7,5h sleep) -- Segmented (7h). +**Underage** +Underage people- especially those under 16- should avoid reducing their total sleep entirely. Those over 16 are strongly recommended to do one of the following schedules, since both their brain and body are still developing, and cutting light sleep could have effects that are detrimental for the body in the future: -Siesta is good if you have no previous napping experience, since it has a full sleep cycle during the day (it's very easy to adapt to sleeping a full cycle, since both rem and sws could easily be inserted into it). Siesta has a 5h core in the night, and a 1,5h core in the day. Siesta-extended is even more favoured for underaged people, since it gives the recommened 7h30m of sleep. The schedule for Siesta-extended is 6h of sleep in the night (4 cycles), and 1,5h core in the day (1 cycle). +**1.** E1 (6h20m) +**2.** Siesta (6h30, even Siesta-extended is plausable with 7.5h sleep) +**3.** Segmented (7h). -E1 is a strange one. It has the possibility to be too easy, and you could have to wait several weeks to be able to sleep for the nap, since so little sleep is actually cut (for underaged people more sleep is actually cut, so it might still be relativly easy to learn to fall asleep for the nap). If you go for E1 without previous napping experience and you fail to fall asleep for the naps within a reasonable timeframe see !fallasleep. +Siesta is good if you have no previous napping experience, since it has a full sleep cycle during the day. It's very easy to adapt to sleeping a full cycle, since both rem and sws could easily be inserted into it. Siesta has a 5h core in the night, and a 1.5h core in the day. Siesta-extended is even more favorable for underaged people, since it gives the recommened 7h30m of sleep. Siesta-extended has a 6h night core (4 cycles), and a 1.5h day core (1 cycle). -Segmented is a bit harder, but still easy. It's better to do segmented if you normally wake up in the night. Otherwise the quality of the sleep should be the same as the rest. +E1 is a strange one. It has the possibility to be too easy, and you could have to wait several weeks to be able to sleep for the nap, since so little sleep is actually cut (for underaged people more sleep is actually cut, so it might still be relativly easy to learn to fall asleep for the nap). If you go for E1 without previous napping experience and you fail to fall asleep for the naps within a reasonable timeframe see `!fallasleep`. -They work with different mechanics though; Siesta takes advantage of the statistically more likely rem period that happens at the 4,5-5h mark, and adds a cycle in the day. E1 trades a full cycle (of light sleep and rem) for a rem-filled nap, while segmented removes a cycle and makes the cycles longer to compensate. +Segmented is a bit harder, but still generally easy. It's better to do segmented if you normally wake up during the night. Otherwise, the quality of the sleep should be the same as the other options. -You can look at each of them in <#257401368807997440> with the commands +siesta +segmented and +e1. +Each of these options operate on different mechanics. Siesta takes advantage of the statistically likely REM period that happens at the 4.5-5h mark, and adds a cycle in the day. E1 trades a full cycle of light sleep and REM for a REM-filled nap, while segmented removes a cycle but makes the cycles longer to compensate. + +You can look at each of them in #botspam with the commands `+siesta`, `+segmented`, and `+e1`. \ No newline at end of file diff --git a/config.json.sample b/config.json.sample index 9c7846b..56258ec 100644 --- a/config.json.sample +++ b/config.json.sample @@ -7,6 +7,6 @@ "modonly": true, "reportInterval": 2, "maxTimeFocus": 6000, - "nc_endpoint": "http://thumb.napchart.com:1771/api", + "nc_endpoint": "http://api.napchart.com/v1/", "cachePath": "/napchart" } diff --git a/server/commands/create.command.js b/server/commands/create.command.js index be47a02..b71ebc3 100644 --- a/server/commands/create.command.js +++ b/server/commands/create.command.js @@ -1,7 +1,7 @@ const { URL } = require("url"); const _ = require("lodash"); const UserModel = require("./../models/user.model"); -const { getOrGenImg, makeNapChartImageUrl, createChart } = require("./../imageCache"); +const { getOrGenImg, makeNapchartImageUrl, createChart } = require("./../imageCache"); module.exports = { @@ -24,7 +24,6 @@ async function create(args, message, dry) { console.log("CMD : CREATE"); console.log("ARGS : ", args); timeelems = []; - i = 0; try { args.forEach((arg)=>{ let times = arg.split('-'); @@ -36,12 +35,11 @@ async function create(args, message, dry) { } timeelems.push({ - start: s, end: e, - id: i++, lane: 0, text: "", - color: "red" + color: "red", + start: s }); }); } catch (err) { @@ -52,17 +50,15 @@ async function create(args, message, dry) { return; } let data = { - data:JSON.stringify({ - chartData:{ - elements: timeelems, - shape: "circle", - lanes: 1 - }, - metaInfo:{ - title:"", - description:"" - } - }) + chartData: { + elements: timeelems, + colorTags: [], + lanes: 1, + shape: "circle", + lanesConfig: {} + }, + title: "Custom Napchart for " + message.member.user.username, + description: "" }; //data = JSON.stringify(data) console.log("INFO : ","Napchart payload", data); diff --git a/server/commands/exportlogs.command.js b/server/commands/exportlogs.command.js index 944bba1..771ad71 100644 --- a/server/commands/exportlogs.command.js +++ b/server/commands/exportlogs.command.js @@ -1,7 +1,7 @@ const LogModel = require("./../models/log.model"); const schedules = require("./schedules").schedules; const { URL } = require("url"); -const { getOrGenImg, makeNapChartImageUrl } = require("./../imageCache"); +const { getOrGenImg, makeNapchartImageUrl } = require("./../imageCache"); const { promisify } = require('util'); const writeFileAsync = promisify(require('fs').writeFile); diff --git a/server/commands/get.command.js b/server/commands/get.command.js index 9726500..c609e14 100644 --- a/server/commands/get.command.js +++ b/server/commands/get.command.js @@ -1,7 +1,7 @@ const { URL } = require('url'); const _ = require('lodash'); const UserModel = require('./../models/user.model'); -const { getOrGenImg, makeNapChartImageUrl } = require('./../imageCache'); +const { getOrGenImg, makeNapchartImageUrl } = require('./../imageCache'); const config = require('../../config.json'); const { findMember } = require('./find'); const { executeFunction, dateToStringSimple } = require('./utility'); @@ -31,7 +31,7 @@ function diffTimeCut(d1, d2 = new Date()) { i++; } let resUnit = timeCut[Math.min(i, timeCut.length - 1)].k; - if (res > 1) { + if (res > 1 || res === 0) { resUnit += 's'; } return `${res} ${resUnit}`; diff --git a/server/commands/getstatus.command.js b/server/commands/getstatus.command.js index d7d10a8..70d1965 100644 --- a/server/commands/getstatus.command.js +++ b/server/commands/getstatus.command.js @@ -3,6 +3,7 @@ const config = require('../../config.json'); const { findMember } = require('./find'); const request = require('request'); const { executeFunction, dateToStringSimple, minToTZ, bold, h_n_m, tick } = require('./utility'); +const { getNapchartId } = require('./napchart'); const api_url = config.nc_endpoint; @@ -76,19 +77,19 @@ async function get(message, args, dry) { msg += "\n```"; if (!userDB.currentScheduleChart) { if (schedule.includes("Random")) { - msg += "Eww! This user is on " + bold(schedule) + " schedule!\nNot even Nap God knows when they will sleep next."; + msg += "Eww! This user is on " + bold(schedule) + " schedule!\nNot even NapGod knows when they will sleep next."; } else if (schedule.includes("MAYL") || schedule.includes("X")) { - msg += "Wow! This user is on " + bold(schedule) + " schedule!\nNot even Nap God knows when they will sleep next."; + msg += "Wow! This user is on " + bold(schedule) + " schedule!\nNot even NapGod knows when they will sleep next."; } else { - msg += "This user has not set a napchart, so Nap God cannot know when they will sleep next."; + msg += "This user has not set a napchart, so NapGod cannot know when they will sleep next."; } } message.channel.send(msg); } else { - message.channel.send("Error: User " + bold(member.value.displayName) + " has not set a timezone. You can set a timezone with `+settz [timezone]`") + message.channel.send("`Error:` User " + bold(member.value.displayName) + " has not set a timezone. You can set a timezone with `+settz [timezone]`") } } @@ -97,7 +98,7 @@ async function getNapchart(username, napchartUrl) { let napchart = { url: napchartUrl, sleeps: '' }; try { const data = await getNapchartPromise(napchartUrl); - data.chartData.elements.forEach((element) => { + data.chartDocument.chartData.elements.forEach((element) => { if (element.color === 'red' && element.lane === 0) { if (napchart.sleeps) { napchart.sleeps += ','; @@ -118,9 +119,10 @@ async function getNapchart(username, napchartUrl) { } function getNapchartPromise(napchartUrl) { return new Promise((resolve, reject) => { + nurl = getNapchartId(napchartUrl); request( { - url: api_url + '/get?chartid=' + napchartUrl.split('/').pop(), + url: api_url + 'getChart/' + nurl, json: true, headers: { 'User-Agent': 'request' }, }, diff --git a/server/commands/mset.backend.js b/server/commands/mset.backend.js index 7b765f3..8f7e2c2 100644 --- a/server/commands/mset.backend.js +++ b/server/commands/mset.backend.js @@ -1,7 +1,7 @@ const { URL } = require('url'); const _ = require('lodash'); const UserModel = require('./../models/user.model'); -const { getOrGenImg, makeNapChartImageUrl } = require('./../imageCache'); +const { getOrGenImg, makeNapchartImageUrl } = require('./../imageCache'); const config = require('../../config.json'); const set = require('./set.backend').setInternalPromise; @@ -117,7 +117,7 @@ async function mset(args, message, dry) { args[0] + '`.\n'; msg += - 'Nap Chart set for ' + member.user.tag + ' to ' + args[1] + '.'; + 'Napchart set for ' + member.user.tag + ' to ' + args[1] + '.'; if (!dry) { message.channel.send(msg); } @@ -207,7 +207,7 @@ async function mset(args, message, dry) { } } else { msg = 'Schedule set for ' + usr.user.tag + ' to `' + args[0] + '`.\n'; - msg += 'Nap Chart set for ' + usr.user.tag + ' to ' + args[1] + '.'; + msg += 'Napchart set for ' + usr.user.tag + ' to ' + args[1] + '.'; if (!dry) { message.channel.send(msg); } diff --git a/server/commands/mset.command.js b/server/commands/mset.command.js index de213b2..fb60155 100644 --- a/server/commands/mset.command.js +++ b/server/commands/mset.command.js @@ -1,7 +1,7 @@ const { URL } = require('url'); const _ = require('lodash'); const UserModel = require('./../models/user.model'); -const { getOrGenImg, makeNapChartImageUrl } = require('./../imageCache'); +const { getOrGenImg, makeNapchartImageUrl } = require('./../imageCache'); const config = require('../../config.json'); const mset = require('./mset.backend').msetInternal; diff --git a/server/commands/napchart.js b/server/commands/napchart.js index f97ac64..5a201e5 100644 --- a/server/commands/napchart.js +++ b/server/commands/napchart.js @@ -2,14 +2,16 @@ const { nc_endpoint } = require('../../config.json'); const request = require('request'); module.exports = { - getNapchart: getNapchart + getNapchart: getNapchart, + getNapchartId: getNapchartId } function getNapchartPromise(napchartUrl) { - return new Promise((resolve, reject) => { + return new Promise((resolve, reject) => { + napchartId = getNapchartId(napchartUrl); request( { - url: nc_endpoint + '/get?chartid=' + napchartUrl.split('/').pop(), + url: nc_endpoint + 'getChart/' + napchartId, json: true, headers: { 'User-Agent': 'request' }, }, @@ -30,7 +32,7 @@ async function getNapchart(username, napchartUrl) { let napchart = { url: napchartUrl, sleeps: '' }; try { const data = await getNapchartPromise(napchartUrl); - data.chartData.elements.forEach((element) => { + data.chartDocument.chartData.elements.forEach((element) => { if (element.color === 'red' && element.lane === 0) { if (element.start >= 24 * 60 || element.end >= 24 * 60) { throw "Invalid napchart."; @@ -54,3 +56,10 @@ async function getNapchart(username, napchartUrl) { return null; } } + +function getNapchartId(napchartUrl) { + let napchartId = napchartUrl.substring(napchartUrl.indexOf(".com/") + 5); + if (napchartId.includes("/") && napchartId.includes("-")) napchartId = napchartId.split('-').pop(); + else if (napchartId.includes("/")) napchartId = napchartId.split('/').pop(); + return napchartId; +} diff --git a/server/commands/print.command.js b/server/commands/print.command.js index c52dcba..abcfc8d 100644 --- a/server/commands/print.command.js +++ b/server/commands/print.command.js @@ -1,5 +1,5 @@ const { URL } = require("url"); -const { getOrGenImg, makeNapChartImageUrl } = require("./../imageCache"); +const { getOrGenImg, makeNapchartImageUrl } = require("./../imageCache"); const config = require("../../config.json"); const _ = require("lodash"); diff --git a/server/commands/rebuild.command.js b/server/commands/rebuild.command.js index 15fdecd..eda0729 100644 --- a/server/commands/rebuild.command.js +++ b/server/commands/rebuild.command.js @@ -1,7 +1,7 @@ const { URL } = require("url"); const _ = require("lodash"); const UserModel = require("./../models/user.model"); -const { getOrGenImg, makeNapChartImageUrl } = require("./../imageCache"); +const { getOrGenImg, makeNapchartImageUrl } = require("./../imageCache"); const config = require("../../config.json"); const set = require("./set.backend") const mset = require("./mset.backend") diff --git a/server/commands/set.backend.js b/server/commands/set.backend.js index 874a0c7..985e23a 100644 --- a/server/commands/set.backend.js +++ b/server/commands/set.backend.js @@ -2,12 +2,15 @@ const url = require("url"); const _ = require("lodash"); const UserModel = require("./../models/user.model"); const ReportModel = require("./../models/report.model"); -const { getOrGenImg, makeNapChartImageUrl } = require("./../imageCache"); +const { getOrGenImg, makeNapchartImageUrl } = require("./../imageCache"); const schedules = require("./schedules").schedules; const modifiers = require("./schedules").modifiers; const { getNapchart } = require('./napchart.js'); -const napchartPathRegex = /^\w{5,6}$/ +//const ncRegex_OldScheme = /^(([a-z]|\d){5,6})$/ +//const ncRegex_Snapshot = /^snapshot\/((\w|\d){9})$/ +//const ncRegex_UserChart = /^\w{6,100}\/.*\-\w{6,9}$/ +const napchartPathRegex = /^(([a-z]|\d){5,6})$|^snapshot\/((\w|\d){9})$|^\w{6,100}\/.*\-\w{6,9}$/ module.exports = { @@ -42,8 +45,8 @@ module.exports = { } await set(args, message, dry, author, member, false); } else { - msg = "Bad input format: Use `+set [schedule-name]` or `+set [napchart-link]`. Use `+set none` to remove your chart without changing schedule."; - console.log("MSG : ", msg); + msg = "Bad input format: Use `+set [schedule-name]` or `+set [napchart-link]`. Use `+set none` to remove your chart without changing schedule."; + console.log("MSG : ", msg); if(!dry){message.channel.send(msg);} } return true; @@ -62,6 +65,7 @@ async function set(args, message, dry, author, member, silent) { complete = true; let msg = ""; let urlPossible = args.length === 2 ? args[1] : args[0]; + if (urlPossible.slice(-1) === "/") urlPossible = urlPossible.toString().substring(0, urlPossible.length - 1); let schedulePossible = args[0]; let { is_nurl, nurl } = checkIsUrlAndGet(urlPossible); let { is_schedule, schedn, schedfull } = checkIsSchedule(schedulePossible); @@ -93,7 +97,7 @@ async function set(args, message, dry, author, member, silent) { upd = buildUserInstance(); upd.currentScheduleChart = null; await saveUserSchedule(message, upd); - msg = "Nap Chart has been removed for **" + displayname + "**."; + msg = "Napchart has been removed for **" + displayname + "**."; console.log("MSG : ", msg); if(!dry&&!silent){message.channel.send(msg);} return false; @@ -186,17 +190,21 @@ async function set(args, message, dry, author, member, silent) { // We received Napchart, process it: if (is_nurl) { // Include http(s) when specifying URLs - msg = "Nap Chart set for " + author.tag + " to " + nurl.href + "."; + msg = "Napchart set for " + author.tag + " to " + nurl.href + "."; console.log("MSG : ", msg); fullmsg += msg + "\n"; rembed = await getOrGenImg(nurl, message, dry); + rembed.setColor(message.member.displayColor); + rembed.setAuthor(author.tag, author.avatarURL); + rembed.setDescription(fullmsg); + fullmsg = ""; msgopt = { embed: rembed }; } else if (args.length === 2 && args[1] === "none") { console.log("ACT : ", "Remove napchart from database for " +author.username); upd = buildUserInstance(); upd.currentScheduleChart = null; await saveUserSchedule(message, upd); - msg = "Nap Chart has been removed for **" + displayname + "**."; + msg = "Napchart has been removed for **" + displayname + "**."; console.log("MSG : ", msg); fullmsg += msg + "\n"; if (args.length == 1) { complete = false; } diff --git a/server/commands/set.command.js b/server/commands/set.command.js index b8196e7..67d56f3 100644 --- a/server/commands/set.command.js +++ b/server/commands/set.command.js @@ -1,7 +1,7 @@ const { URL } = require("url"); const _ = require("lodash"); const UserModel = require("./../models/user.model"); -const { getOrGenImg, makeNapChartImageUrl } = require("./../imageCache"); +const { getOrGenImg, makeNapchartImageUrl } = require("./../imageCache"); const schedules = require("./schedules"); const set = require("./set.backend").setInternal; diff --git a/server/commands/updatereport.command.js b/server/commands/updatereport.command.js index fab788b..f5ee61e 100644 --- a/server/commands/updatereport.command.js +++ b/server/commands/updatereport.command.js @@ -1,7 +1,7 @@ const config = require('../../config.json'); const UserModel = require('./../models/user.model'); const ReportModel = require('./../models/report.model'); -const { getOrGenImg, makeNapChartImageUrl } = require('./../imageCache'); +const { getOrGenImg, makeNapchartImageUrl } = require('./../imageCache'); const { URL } = require('url'); const fs = require('fs'); const _ = require('lodash'); @@ -125,7 +125,7 @@ function generateHTML(message, users, dry) { napchart = 'No napchart is currently set
'; } else { napchart = `Current napchart: ${user.currentScheduleChart}
`; - let { napChartId, imgurl } = makeNapChartImageUrl( + let { napchartId, imgurl } = makeNapchartImageUrl( new URL(user.currentScheduleChart) ); napchartimg = `

`; @@ -158,7 +158,7 @@ function generateHTML(message, users, dry) { \n\ \n\ \n\ - Nap God Report ${n}\n\ + NapGod Report ${n}\n\ \n\ \n\ -

Nap God Report ${n}

\n\ +

NapGod Report ${n}

\n\ ${body}\n\ \n\ `; diff --git a/server/imageCache.js b/server/imageCache.js index 64de348..955a721 100644 --- a/server/imageCache.js +++ b/server/imageCache.js @@ -5,6 +5,7 @@ const fs = require('fs'); const { URL } = require('url'); const axios = require('axios'); const { nc_endpoint } = require('../config.json'); +const { getNapchartId } = require('./commands/napchart'); module.exports = { getOrGenImg: function (nurl, message, dry = false) { @@ -13,29 +14,29 @@ module.exports = { nurl = new URL(nurl); } nurl.protocol = 'http:'; - let { napChartId, imgurl } = makeNapChartImageUrl(nurl); - console.log(napChartId, '----', imgurl); - let is_cached = fs.existsSync('/napcharts/cdn/' + napChartId + '.png'); - let cacheurl = 'http://cache.polyphasic.net/cdn/' + napChartId + '.png'; + let { napchartId, imgurl } = makeNapchartImageUrl(nurl); + console.log(napchartId, '----', imgurl); + let is_cached = fs.existsSync('/napcharts/cdn/' + napchartId + '.png'); + let cacheurl = 'http://cache.polyphasic.net/cdn/' + napchartId + '.png'; console.log('INFO : ', 'Image search res', is_cached); let msgImg = null; if (!is_cached) { console.log( 'INFO : ', - 'Downloading napchart: ' + napChartId, + 'Downloading napchart: ' + napchartId, ' -- IMGURL:', imgurl ); request.get({ url: imgurl, encoding: 'binary' }, (err, _, res) => { fs.writeFile( - '/napcharts/cdn/' + napChartId + '.png', + '/napcharts/cdn/' + napchartId + '.png', res, 'binary', (err) => { setTimeout(function () { console.log('MSG : ', 'RichEmbed[' + nurl.href + ']'); msgImg = new Discord.RichEmbed() - .setImage(cacheurl) + .setImage(imgurl) .setURL(nurl.href); resolve(msgImg); }, 200); @@ -58,16 +59,16 @@ module.exports = { //}); }); }, - makeNapChartImageUrl: makeNapChartImageUrl, + makeNapchartImageUrl: makeNapchartImageUrl, createChart: function (data) { - let url = `${nc_endpoint}/create`; + let url = `${nc_endpoint}createSnapshot`; console.log('url', url); return new Promise(function (resolve, reject) { axios .post(url, data) .then((res) => { console.log('INFO : ', 'Chart created', res); - let nurl = 'http://napchart.com/' + res.data.chartid; + let nurl = 'http://napchart.com/' + res.data.chartDocument.chartid; resolve(nurl); }) .catch((error) => { @@ -78,10 +79,10 @@ module.exports = { }, }; -function makeNapChartImageUrl(nurl) { - let napChartId = nurl.pathname.substring(1); - let imgurl = `${nc_endpoint}/getImage/?width=600&shape=circle&height=600&chartid=${napChartId}`; - return { napChartId, imgurl }; +function makeNapchartImageUrl(nurl) { + let napchartId = getNapchartId(nurl.href); + let imgurl = `${nc_endpoint}getImage/${napchartId}?hr=1`; + return { napchartId, imgurl }; } async function sleepBlock(ms) {