Skip to content

Commit

Permalink
Fix talking in locked/hidden voice channels
Browse files Browse the repository at this point in the history
  • Loading branch information
LunaUrsa committed Feb 19, 2024
1 parent 85e2152 commit 6695299
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 124 deletions.
49 changes: 0 additions & 49 deletions assets/data/combinedDB.json
Original file line number Diff line number Diff line change
Expand Up @@ -45662,55 +45662,6 @@
}
]
},
{
"url": "https://psychonautwiki.org/wiki/TMA",
"name": "TMA",
"toxicity": [
"toxic dose is unknown"
],
"addictionPotential": "not habit-forming",
"tolerance": {
"full": "almost immediately after ingestion",
"half": "3 days",
"zero": "7 days"
},
"crossTolerances": [
"psychedelic"
],
"roas": [
{
"name": "Oral",
"dosage": [
{
"name": "Threshold",
"value": "40 70"
},
{
"name": "Light",
"value": "70-140 70"
},
{
"name": "Common",
"value": "140-170 70"
},
{
"name": "Strong",
"value": "170-200 70"
},
{
"name": "Heavy",
"value": "200 70"
}
],
"duration": [
{
"name": "Total",
"value": "6-12 hours"
}
]
}
]
},
{
"url": "https://psychonautwiki.org/wiki/TMA-2",
"name": "TMA-2",
Expand Down
75 changes: 0 additions & 75 deletions assets/data/psychonautDB.json
Original file line number Diff line number Diff line change
Expand Up @@ -35381,81 +35381,6 @@
}
}
},
{
"url": "https://psychonautwiki.org/wiki/TMA",
"name": "TMA",
"summary": "",
"addictionPotential": "not habit-forming",
"toxicity": [
"toxic dose is unknown"
],
"crossTolerances": [
"psychedelic"
],
"commonNames": null,
"class": {
"chemical": [
"Amphetamine"
],
"psychoactive": [
"Psychedelic",
"Stimulants"
]
},
"tolerance": {
"full": "almost immediately after ingestion",
"half": "3 days",
"zero": "7 days"
},
"uncertainInteractions": null,
"unsafeInteractions": null,
"dangerousInteractions": null,
"roa": {
"oral": {
"name": "oral",
"dose": {
"units": "70",
"threshold": 40,
"heavy": 200,
"common": {
"min": 140,
"max": 170
},
"light": {
"min": 70,
"max": 140
},
"strong": {
"min": 170,
"max": 200
}
},
"duration": {
"afterglow": null,
"comeup": null,
"duration": null,
"offset": null,
"onset": null,
"peak": null,
"total": {
"min": 6,
"max": 12,
"units": "hours"
}
},
"bioavailability": null
},
"sublingual": null,
"buccal": null,
"insufflated": null,
"rectal": null,
"transdermal": null,
"subcutaneous": null,
"intramuscular": null,
"intravenous": null,
"smoked": null
}
},
{
"url": "https://psychonautwiki.org/wiki/TMA-2",
"name": "TMA-2",
Expand Down
6 changes: 6 additions & 0 deletions src/discord/commands/guild/d.voice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ async function tentLock(
.permissionsFor(voiceChannel.guild.roles.everyone)
.has(PermissionsBitField.Flags.Connect) === true
) {
voiceChannel.members.forEach(member => {
voiceChannel.permissionOverwrites.edit(member, { Connect: true });
});
voiceChannel.permissionOverwrites.edit(voiceChannel.guild.roles.everyone, { Connect: false });
verb = 'locked';
} else {
Expand All @@ -62,6 +65,9 @@ async function tentHide(
.permissionsFor(voiceChannel.guild.roles.everyone)
.has(PermissionsBitField.Flags.ViewChannel) === true
) {
voiceChannel.members.forEach(member => {
voiceChannel.permissionOverwrites.edit(member, { ViewChannel: true });
});
voiceChannel.permissionOverwrites.edit(voiceChannel.guild.roles.everyone, { ViewChannel: false });
verb = 'hidden';
} else {
Expand Down

0 comments on commit 6695299

Please sign in to comment.