diff --git a/util/src/entities/Config.ts b/util/src/entities/Config.ts
index 063a4d4d..9eca84ad 100644
--- a/util/src/entities/Config.ts
+++ b/util/src/entities/Config.ts
@@ -4,6 +4,7 @@ import crypto from "crypto";
import { Snowflake } from "../util/Snowflake";
import { SessionsReplace } from "..";
import { hostname } from "os";
+import { Rights } from "../util/Rights";
@Entity("config")
export class ConfigEntity extends BaseClassWithoutId {
@@ -85,6 +86,7 @@ export interface ConfigValue {
maxReactions: number;
maxAttachmentSize: number;
maxBulkDelete: number;
+ maxEmbedDownloadSize: number;
};
channel: {
maxPins: number;
@@ -120,6 +122,7 @@ export interface ConfigValue {
secret: string | null;
};
ipdataApiKey: string | null;
+ defaultRights: string;
};
login: {
requireCaptcha: boolean;
@@ -191,7 +194,7 @@ export interface ConfigValue {
releases: {
useLocalRelease: Boolean; //TODO
upstreamVersion: string;
- }
+ };
},
metrics: {
timeout: number;
@@ -201,7 +204,7 @@ export interface ConfigValue {
endpoint: string;
traceSampleRate: number;
environment: string;
- }
+ };
}
export const DefaultConfigOptions: ConfigValue = {
@@ -232,29 +235,30 @@ export const DefaultConfigOptions: ConfigValue = {
},
limits: {
user: {
- maxGuilds: 100,
- maxUsername: 32,
- maxFriends: 1000,
+ maxGuilds: 1048576,
+ maxUsername: 127,
+ maxFriends: 5000,
},
guild: {
- maxRoles: 250,
- maxEmojis: 50, // TODO: max emojis per guild per nitro level
- maxMembers: 250000,
- maxChannels: 500,
- maxChannelsInCategory: 50,
- hideOfflineMember: 1000,
+ maxRoles: 1000,
+ maxEmojis: 2000,
+ maxMembers: 25000000,
+ maxChannels: 65535,
+ maxChannelsInCategory: 65535,
+ hideOfflineMember: 3,
},
message: {
- maxCharacters: 2000,
- maxTTSCharacters: 200,
- maxReactions: 20,
- maxAttachmentSize: 8388608,
- maxBulkDelete: 100,
+ maxCharacters: 1048576,
+ maxTTSCharacters: 160,
+ maxReactions: 2048,
+ maxAttachmentSize: 1024 * 1024 * 1024,
+ maxEmbedDownloadSize: 1024 * 1024 * 5,
+ maxBulkDelete: 1000,
},
channel: {
- maxPins: 50,
+ maxPins: 500,
maxTopic: 1024,
- maxWebhooks: 10,
+ maxWebhooks: 100,
},
rate: {
disabled: true,
@@ -263,9 +267,8 @@ export const DefaultConfigOptions: ConfigValue = {
window: 5,
},
global: {
- count: 20,
+ count: 250,
window: 5,
- bot: 250,
},
error: {
count: 10,
@@ -311,6 +314,36 @@ export const DefaultConfigOptions: ConfigValue = {
secret: null,
},
ipdataApiKey: "eca677b284b3bac29eb72f5e496aa9047f26543605efe99ff2ce35c9",
+ defaultRights: (
+ Rights.FLAGS.CREATE_CHANNELS +
+ Rights.FLAGS.CREATE_DMS +
+ Rights.FLAGS.CREATE_DM_GROUPS +
+ Rights.FLAGS.CREATE_GUILDS +
+ Rights.FLAGS.CREATE_INVITES +
+ Rights.FLAGS.CREATE_ROLES +
+ Rights.FLAGS.CREATE_TEMPLATES +
+ Rights.FLAGS.CREATE_WEBHOOKS +
+ Rights.FLAGS.JOIN_GUILDS +
+ Rights.FLAGS.PIN_MESSAGES +
+ Rights.FLAGS.SELF_ADD_REACTIONS +
+ Rights.FLAGS.SELF_DELETE_MESSAGES +
+ Rights.FLAGS.SELF_EDIT_MESSAGES +
+ Rights.FLAGS.SELF_EDIT_NAME +
+ Rights.FLAGS.SEND_MESSAGES +
+ Rights.FLAGS.USE_ACTIVITIES +
+ Rights.FLAGS.USE_VIDEO +
+ Rights.FLAGS.USE_VOICE +
+ Rights.FLAGS.INVITE_USERS +
+ Rights.FLAGS.SELF_DELETE_DISABLE +
+ Rights.FLAGS.DEBTABLE +
+ Rights.FLAGS.KICK_BAN_MEMBERS +
+ Rights.FLAGS.SELF_LEAVE_GROUPS +
+ Rights.FLAGS.SELF_ADD_DISCOVERABLE +
+ Rights.FLAGS.USE_ACHIEVEMENTS +
+ Rights.FLAGS.MANAGE_GUILDS +
+ Rights.FLAGS.MANAGE_MESSAGES +
+ Rights.FLAGS.USE_MASS_INVITES
+ ).toString()
},
login: {
requireCaptcha: false,
|