mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-10 20:52:42 +01:00
update defaults
This commit is contained in:
parent
072a60fb03
commit
cc698225a0
@ -213,7 +213,7 @@ export class Guild extends BaseClass {
|
||||
owner: User;
|
||||
|
||||
@Column({ nullable: true })
|
||||
preferred_locale?: string; // only community guilds can choose this
|
||||
preferred_locale?: string;
|
||||
|
||||
@Column({ nullable: true })
|
||||
premium_subscription_count?: number;
|
||||
@ -301,22 +301,22 @@ export class Guild extends BaseClass {
|
||||
name: body.name || "Fosscord",
|
||||
icon: await handleFile(`/icons/${guild_id}`, body.icon as string),
|
||||
region: Config.get().regions.default,
|
||||
owner_id: body.owner_id,
|
||||
owner_id: body.owner_id, // TODO: need to figure out a way for ownerless guilds and multiply-owned guilds
|
||||
afk_timeout: 300,
|
||||
default_message_notifications: 0,
|
||||
default_message_notifications: 1, // defaults effect: setting the push default at mentions-only will save a lot
|
||||
explicit_content_filter: 0,
|
||||
features: [],
|
||||
id: guild_id,
|
||||
max_members: 250000,
|
||||
max_presences: 250000,
|
||||
max_video_channel_users: 25,
|
||||
max_video_channel_users: 200,
|
||||
presence_count: 0,
|
||||
member_count: 0, // will automatically be increased by addMember()
|
||||
mfa_level: 0,
|
||||
preferred_locale: "en-US",
|
||||
premium_subscription_count: 0,
|
||||
premium_tier: 0,
|
||||
system_channel_flags: 0,
|
||||
system_channel_flags: 4, // defaults effect: suppress the setup tips to save performance
|
||||
unavailable: false,
|
||||
nsfw: false,
|
||||
nsfw_level: 0,
|
||||
@ -326,7 +326,7 @@ export class Guild extends BaseClass {
|
||||
description: "No description",
|
||||
welcome_channels: [],
|
||||
},
|
||||
widget_enabled: false,
|
||||
widget_enabled: true, // NB: don't set it as false to prevent artificial restrictions
|
||||
}).save();
|
||||
|
||||
// we have to create the role _after_ the guild because else we would get a "SQLITE_CONSTRAINT: FOREIGN KEY constraint failed" error
|
||||
@ -337,6 +337,7 @@ export class Guild extends BaseClass {
|
||||
color: 0,
|
||||
hoist: false,
|
||||
managed: false,
|
||||
// NB: in Fosscord, every role will be non-managed, as we use user-groups instead of roles for managed groups
|
||||
mentionable: false,
|
||||
name: "@everyone",
|
||||
permissions: String("2251804225"),
|
||||
@ -358,7 +359,6 @@ export class Guild extends BaseClass {
|
||||
for (const channel of body.channels?.sort((a, b) => (a.parent_id ? 1 : -1))) {
|
||||
var id = ids.get(channel.id) || Snowflake.generate();
|
||||
|
||||
// TODO: should we abort if parent_id is a category? (to disallow sub category channels)
|
||||
var parent_id = ids.get(channel.parent_id);
|
||||
|
||||
await Channel.createChannel({ ...channel, guild_id, id, parent_id }, body.owner_id, {
|
||||
|
Loading…
Reference in New Issue
Block a user