let guilds be set as discoverable
This commit is contained in:
parent
e3bcb9dd67
commit
5ed4772bc4
2 changed files with 26 additions and 2 deletions
|
@ -165,6 +165,22 @@ class Guild extends SnowFlake {
|
||||||
{defaultIndex: sysmap.indexOf(this.properties.system_channel_id)},
|
{defaultIndex: sysmap.indexOf(this.properties.system_channel_id)},
|
||||||
sysmap,
|
sysmap,
|
||||||
);
|
);
|
||||||
|
console.log(textChannels, this.channels);
|
||||||
|
const options: ["DISCOVERABLE", "COMMUNITY", "INVITES_DISABLED"] = [
|
||||||
|
"DISCOVERABLE",
|
||||||
|
"COMMUNITY",
|
||||||
|
"INVITES_DISABLED",
|
||||||
|
];
|
||||||
|
const defaultIndex = options.findIndex((_) => this.properties.features.includes(_));
|
||||||
|
form.addSelect(
|
||||||
|
I18n.guild.howJoin(),
|
||||||
|
"features",
|
||||||
|
options.map((_) => I18n.guild[_]()),
|
||||||
|
{
|
||||||
|
defaultIndex: defaultIndex == -1 ? 1 : defaultIndex,
|
||||||
|
},
|
||||||
|
options,
|
||||||
|
);
|
||||||
|
|
||||||
form.addCheckboxInput(I18n.getTranslation("guild.sendrandomwelcome?"), "s1", {
|
form.addCheckboxInput(I18n.getTranslation("guild.sendrandomwelcome?"), "s1", {
|
||||||
initState: !(this.properties.system_channel_flags & 1),
|
initState: !(this.properties.system_channel_flags & 1),
|
||||||
|
@ -189,6 +205,11 @@ class Guild extends SnowFlake {
|
||||||
bits += (1 - e.s4) * 8;
|
bits += (1 - e.s4) * 8;
|
||||||
delete e.s4;
|
delete e.s4;
|
||||||
e.system_channel_flags = bits;
|
e.system_channel_flags = bits;
|
||||||
|
const temp = this.properties.features;
|
||||||
|
//@ts-ignore
|
||||||
|
temp.filter((_) => !options.includes(_));
|
||||||
|
temp.push(e.features);
|
||||||
|
e.features = temp;
|
||||||
});
|
});
|
||||||
|
|
||||||
form.addHR();
|
form.addHR();
|
||||||
|
@ -439,7 +460,6 @@ class Guild extends SnowFlake {
|
||||||
this.member_count = json.member_count;
|
this.member_count = json.member_count;
|
||||||
this.emojis = json.emojis;
|
this.emojis = json.emojis;
|
||||||
this.headers = this.owner.headers;
|
this.headers = this.owner.headers;
|
||||||
this.channels = [];
|
|
||||||
if (this.properties.icon !== json.icon) {
|
if (this.properties.icon !== json.icon) {
|
||||||
this.properties.icon = json.icon;
|
this.properties.icon = json.icon;
|
||||||
if (this.HTMLicon) {
|
if (this.HTMLicon) {
|
||||||
|
|
|
@ -237,7 +237,11 @@
|
||||||
"stickWelcomeReact?": "Prompt members of your guild to react with a sticker when someone joins!",
|
"stickWelcomeReact?": "Prompt members of your guild to react with a sticker when someone joins!",
|
||||||
"boostMessage?": "Send a message when someone boosts your guild!",
|
"boostMessage?": "Send a message when someone boosts your guild!",
|
||||||
"helpTips?": "Send helpful tips for your guild!",
|
"helpTips?": "Send helpful tips for your guild!",
|
||||||
"defaultNoti": "Set the default notification settings of your guild!"
|
"defaultNoti": "Set the default notification settings of your guild!",
|
||||||
|
"howJoin": "How can people join your guild?",
|
||||||
|
"COMMUNITY": "Apply to join",
|
||||||
|
"INVITES_DISABLED": "Invite only",
|
||||||
|
"DISCOVERABLE": "Discovery"
|
||||||
},
|
},
|
||||||
"role": {
|
"role": {
|
||||||
"displaySettings": "Display settings",
|
"displaySettings": "Display settings",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue