seyfert
    Preparing search index...

    Class Guild<State>

    Type Parameters

    • State extends StructStates = "api"

    Hierarchy

    • ObjectToLower<Omit<APIGuild, "stickers" | "emojis" | "roles">>
    • DiscordBase
    • {
          api: APIRoutes;
          cache: Cache;
          client: UsingClient;
          createdAt: Date;
          createdTimestamp: number;
          partnered: boolean;
          rest: ApiHandler;
          shard: undefined | Shard;
          shardId: number;
          verified: boolean;
          bannerURL(options?: CDNUrlOptions): undefined | string;
          fetch(mode?: "rest" | "flow"): Promise<Guild<"cached" | "api">>;
          fetch(mode: "cache"): ReturnCache<undefined | Guild<"cached">>;
          iconURL(options?: CDNUrlOptions): undefined | string;
          leave(): Promise<undefined | void>;
          splashURL(options?: CDNUrlOptions): undefined | string;
          toString(): string;
      }
      • Guild
    Index

    Constructors

    • Type Parameters

      • State extends keyof StructWhen<any, "cached"> = "api"

      Parameters

      • client: UsingClient
      • data: APIGuild | GatewayGuildCreateDispatchData

      Returns Guild<State>

    Properties

    afkChannelId: null | string
    afkTimeout: 60 | 300 | 900 | 1800 | 3600
    applicationId: null | string
    approximateMemberCount?: number
    approximatePresenceCount?: number
    banner: null | string
    bans: {
        bulkCreate: (
            body: RESTPostAPIGuildBulkBanJSONBody,
            reason?: string,
        ) => Promise<RESTPostAPIGuildBulkBanResult>;
        create: (
            memberId: string,
            body?: RESTPutAPIGuildBanJSONBody,
            reason?: string,
        ) => Promise<void>;
        fetch: (userId: string, force?: boolean) => Promise<GuildBan>;
        list: (
            query?: RESTGetAPIGuildBansQuery,
            force?: boolean,
        ) => Promise<GuildBan[]>;
        remove: (memberId: string, reason?: string) => Promise<undefined>;
    } = ...
    cache: Cache
    channels: {
        create: <T extends GuildChannelTypes = GuildChannelTypes>(
            body: RESTPostAPIGuildChannelJSONBody & { type: T },
        ) => Promise<SeyfertChannelMap[T]>;
        delete: (id: string, reason?: string) => Promise<AllChannels>;
        edit: (
            id: string,
            body: RESTPatchAPIChannelJSONBody,
            reason?: string,
        ) => Promise<AllChannels>;
        editPositions: (
            body: RESTPatchAPIGuildChannelPositionsJSONBody,
        ) => Promise<undefined>;
        fetch: (id: string, force?: boolean) => Promise<AllChannels>;
        list: (force?: boolean) => Promise<AllChannels[]>;
    } = ...
    client: UsingClient
    createdAt: Date
    createdTimestamp: number
    defaultMessageNotifications: GuildDefaultMessageNotifications
    description: null | string
    discoverySplash: null | string
    emojis: {
        create: (
            body: Omit<RESTPostAPIGuildEmojiJSONBody, "image"> & {
                image: ImageResolvable;
            },
        ) => Promise<GuildEmoji>;
        edit: (
            emojiId: string,
            body: RESTPatchAPIGuildEmojiJSONBody,
            reason?: string,
        ) => Promise<GuildEmoji>;
        fetch: (emojiId: string, force?: boolean) => Promise<GuildEmoji>;
        list: (force?: boolean) => Promise<GuildEmoji[]>;
    } = ...
    explicitContentFilter: GuildExplicitContentFilter
    features: GuildFeature[]
    hubType: null | GuildHubType
    icon: null | string
    iconHash?: null | string
    id: string
    invites: {
        create: (
            data: CreateInviteFromChannel,
        ) => Promise<
            {
                approximateMemberCount?: number;
                approximatePresenceCount?: number;
                channel: null
                | { id: string; name: null | string; type: ChannelType };
                code: string;
                createdAt: string;
                expiresAt?: null | string;
                guild?: {
                    banner: null | string;
                    description: null | string;
                    features: GuildFeature[];
                    icon: null | string;
                    id: string;
                    name: string;
                    nsfwLevel: GuildNSFWLevel;
                    premiumSubscriptionCount?: number;
                    splash: null | string;
                    vanityUrlCode: null | string;
                    verificationLevel: GuildVerificationLevel;
                };
                guildScheduledEvent?: | {
                    channelId: string;
                    creator?: APIUser;
                    creatorId?: null
                    | string;
                    description?: null | string;
                    entityId: null | string;
                    entityMetadata: null;
                    entityType: StageInstance;
                    guildId: string;
                    id: string;
                    image?: null | string;
                    name: string;
                    privacyLevel: GuildScheduledEventPrivacyLevel;
                    recurrenceRule: null | APIGuildScheduledEventRecurrenceRule;
                    scheduledEndTime: null | string;
                    scheduledStartTime: string;
                    status: GuildScheduledEventStatus;
                    userCount?: number;
                }
                | {
                    channelId: string;
                    creator?: APIUser;
                    creatorId?: null
                    | string;
                    description?: null | string;
                    entityId: null | string;
                    entityMetadata: null;
                    entityType: Voice;
                    guildId: string;
                    id: string;
                    image?: null | string;
                    name: string;
                    privacyLevel: GuildScheduledEventPrivacyLevel;
                    recurrenceRule: null | APIGuildScheduledEventRecurrenceRule;
                    scheduledEndTime: null | string;
                    scheduledStartTime: string;
                    status: GuildScheduledEventStatus;
                    userCount?: number;
                }
                | {
                    channelId: null;
                    creator?: APIUser;
                    creatorId?: null
                    | string;
                    description?: null | string;
                    entityId: null | string;
                    entityMetadata: { location: string };
                    entityType: External;
                    guildId: string;
                    id: string;
                    image?: null | string;
                    name: string;
                    privacyLevel: GuildScheduledEventPrivacyLevel;
                    recurrenceRule: null | APIGuildScheduledEventRecurrenceRule;
                    scheduledEndTime: null | string;
                    scheduledStartTime: string;
                    status: GuildScheduledEventStatus;
                    userCount?: number;
                };
                inviter?: {
                    accentColor?: null
                    | number;
                    avatar: null | string;
                    avatarDecorationData?: null | APIAvatarDecorationData;
                    banner?: null | string;
                    bot?: boolean;
                    discriminator: string;
                    email?: null | string;
                    flags?: UserFlags;
                    globalName: null | string;
                    id: string;
                    locale?: string;
                    mfaEnabled?: boolean;
                    premiumType?: UserPremiumType;
                    publicFlags?: UserFlags;
                    system?: boolean;
                    username: string;
                    verified?: boolean;
                };
                maxAge: number;
                maxUses: number;
                targetApplication?: {
                    approximateGuildCount?: number;
                    approximateUserInstallCount?: number;
                    bot?: APIUser;
                    botPublic?: boolean;
                    botRequireCodeGrant?: boolean;
                    coverImage?: string;
                    customInstallUrl?: string;
                    description?: string;
                    flags?: ApplicationFlags;
                    guild?: APIPartialGuild;
                    guildId?: string;
                    icon?: null
                    | string;
                    id?: string;
                    installParams?: APIApplicationInstallParams;
                    integrationTypesConfig?: APIApplicationIntegrationTypesConfigMap;
                    interactionsEndpointUrl?: null | string;
                    name?: string;
                    owner?: APIUser;
                    primarySkuId?: string;
                    privacyPolicyUrl?: string;
                    redirectUris?: string[];
                    roleConnectionsVerificationUrl?: null | string;
                    rpcOrigins?: string[];
                    slug?: string;
                    tags?: [string, string?, string?, string?, string?];
                    team?: null | APITeam;
                    termsOfServiceUrl?: string;
                    verifyKey?: string;
                };
                targetType?: InviteTargetType;
                targetUser?: {
                    accentColor?: null
                    | number;
                    avatar: null | string;
                    avatarDecorationData?: null | APIAvatarDecorationData;
                    banner?: null | string;
                    bot?: boolean;
                    discriminator: string;
                    email?: null | string;
                    flags?: UserFlags;
                    globalName: null | string;
                    id: string;
                    locale?: string;
                    mfaEnabled?: boolean;
                    premiumType?: UserPremiumType;
                    publicFlags?: UserFlags;
                    system?: boolean;
                    username: string;
                    verified?: boolean;
                };
                temporary: boolean;
                type: InviteType;
                uses: number;
            },
        >;
        delete: (
            code: string,
            reason?: string,
        ) => Promise<
            {
                approximateMemberCount?: number;
                approximatePresenceCount?: number;
                channel: null
                | { id: string; name: null | string; type: ChannelType };
                code: string;
                expiresAt?: null | string;
                guild?: {
                    banner: null | string;
                    description: null | string;
                    features: GuildFeature[];
                    icon: null | string;
                    id: string;
                    name: string;
                    nsfwLevel: GuildNSFWLevel;
                    premiumSubscriptionCount?: number;
                    splash: null | string;
                    vanityUrlCode: null | string;
                    verificationLevel: GuildVerificationLevel;
                };
                guildScheduledEvent?: | {
                    channelId: string;
                    creator?: APIUser;
                    creatorId?: null
                    | string;
                    description?: null | string;
                    entityId: null | string;
                    entityMetadata: null;
                    entityType: StageInstance;
                    guildId: string;
                    id: string;
                    image?: null | string;
                    name: string;
                    privacyLevel: GuildScheduledEventPrivacyLevel;
                    recurrenceRule: null | APIGuildScheduledEventRecurrenceRule;
                    scheduledEndTime: null | string;
                    scheduledStartTime: string;
                    status: GuildScheduledEventStatus;
                    userCount?: number;
                }
                | {
                    channelId: string;
                    creator?: APIUser;
                    creatorId?: null
                    | string;
                    description?: null | string;
                    entityId: null | string;
                    entityMetadata: null;
                    entityType: Voice;
                    guildId: string;
                    id: string;
                    image?: null | string;
                    name: string;
                    privacyLevel: GuildScheduledEventPrivacyLevel;
                    recurrenceRule: null | APIGuildScheduledEventRecurrenceRule;
                    scheduledEndTime: null | string;
                    scheduledStartTime: string;
                    status: GuildScheduledEventStatus;
                    userCount?: number;
                }
                | {
                    channelId: null;
                    creator?: APIUser;
                    creatorId?: null
                    | string;
                    description?: null | string;
                    entityId: null | string;
                    entityMetadata: { location: string };
                    entityType: External;
                    guildId: string;
                    id: string;
                    image?: null | string;
                    name: string;
                    privacyLevel: GuildScheduledEventPrivacyLevel;
                    recurrenceRule: null | APIGuildScheduledEventRecurrenceRule;
                    scheduledEndTime: null | string;
                    scheduledStartTime: string;
                    status: GuildScheduledEventStatus;
                    userCount?: number;
                };
                inviter?: {
                    accentColor?: null
                    | number;
                    avatar: null | string;
                    avatarDecorationData?: null | APIAvatarDecorationData;
                    banner?: null | string;
                    bot?: boolean;
                    discriminator: string;
                    email?: null | string;
                    flags?: UserFlags;
                    globalName: null | string;
                    id: string;
                    locale?: string;
                    mfaEnabled?: boolean;
                    premiumType?: UserPremiumType;
                    publicFlags?: UserFlags;
                    system?: boolean;
                    username: string;
                    verified?: boolean;
                };
                targetApplication?: {
                    approximateGuildCount?: number;
                    approximateUserInstallCount?: number;
                    bot?: APIUser;
                    botPublic?: boolean;
                    botRequireCodeGrant?: boolean;
                    coverImage?: string;
                    customInstallUrl?: string;
                    description?: string;
                    flags?: ApplicationFlags;
                    guild?: APIPartialGuild;
                    guildId?: string;
                    icon?: null
                    | string;
                    id?: string;
                    installParams?: APIApplicationInstallParams;
                    integrationTypesConfig?: APIApplicationIntegrationTypesConfigMap;
                    interactionsEndpointUrl?: null | string;
                    name?: string;
                    owner?: APIUser;
                    primarySkuId?: string;
                    privacyPolicyUrl?: string;
                    redirectUris?: string[];
                    roleConnectionsVerificationUrl?: null | string;
                    rpcOrigins?: string[];
                    slug?: string;
                    tags?: [string, string?, string?, string?, string?];
                    team?: null | APITeam;
                    termsOfServiceUrl?: string;
                    verifyKey?: string;
                };
                targetType?: InviteTargetType;
                targetUser?: {
                    accentColor?: null
                    | number;
                    avatar: null | string;
                    avatarDecorationData?: null | APIAvatarDecorationData;
                    banner?: null | string;
                    bot?: boolean;
                    discriminator: string;
                    email?: null | string;
                    flags?: UserFlags;
                    globalName: null | string;
                    id: string;
                    locale?: string;
                    mfaEnabled?: boolean;
                    premiumType?: UserPremiumType;
                    publicFlags?: UserFlags;
                    system?: boolean;
                    username: string;
                    verified?: boolean;
                };
                type: InviteType;
            },
        >;
        list: () => Promise<
            {
                approximateMemberCount?: number;
                approximatePresenceCount?: number;
                channel: null
                | { id: string; name: null | string; type: ChannelType };
                code: string;
                createdAt: string;
                expiresAt?: null | string;
                guild?: {
                    banner: null | string;
                    description: null | string;
                    features: GuildFeature[];
                    icon: null | string;
                    id: string;
                    name: string;
                    nsfwLevel: GuildNSFWLevel;
                    premiumSubscriptionCount?: number;
                    splash: null | string;
                    vanityUrlCode: null | string;
                    verificationLevel: GuildVerificationLevel;
                };
                guildScheduledEvent?: | {
                    channelId: string;
                    creator?: APIUser;
                    creatorId?: null
                    | string;
                    description?: null | string;
                    entityId: null | string;
                    entityMetadata: null;
                    entityType: StageInstance;
                    guildId: string;
                    id: string;
                    image?: null | string;
                    name: string;
                    privacyLevel: GuildScheduledEventPrivacyLevel;
                    recurrenceRule: null | APIGuildScheduledEventRecurrenceRule;
                    scheduledEndTime: null | string;
                    scheduledStartTime: string;
                    status: GuildScheduledEventStatus;
                    userCount?: number;
                }
                | {
                    channelId: string;
                    creator?: APIUser;
                    creatorId?: null
                    | string;
                    description?: null | string;
                    entityId: null | string;
                    entityMetadata: null;
                    entityType: Voice;
                    guildId: string;
                    id: string;
                    image?: null | string;
                    name: string;
                    privacyLevel: GuildScheduledEventPrivacyLevel;
                    recurrenceRule: null | APIGuildScheduledEventRecurrenceRule;
                    scheduledEndTime: null | string;
                    scheduledStartTime: string;
                    status: GuildScheduledEventStatus;
                    userCount?: number;
                }
                | {
                    channelId: null;
                    creator?: APIUser;
                    creatorId?: null
                    | string;
                    description?: null | string;
                    entityId: null | string;
                    entityMetadata: { location: string };
                    entityType: External;
                    guildId: string;
                    id: string;
                    image?: null | string;
                    name: string;
                    privacyLevel: GuildScheduledEventPrivacyLevel;
                    recurrenceRule: null | APIGuildScheduledEventRecurrenceRule;
                    scheduledEndTime: null | string;
                    scheduledStartTime: string;
                    status: GuildScheduledEventStatus;
                    userCount?: number;
                };
                inviter?: {
                    accentColor?: null
                    | number;
                    avatar: null | string;
                    avatarDecorationData?: null | APIAvatarDecorationData;
                    banner?: null | string;
                    bot?: boolean;
                    discriminator: string;
                    email?: null | string;
                    flags?: UserFlags;
                    globalName: null | string;
                    id: string;
                    locale?: string;
                    mfaEnabled?: boolean;
                    premiumType?: UserPremiumType;
                    publicFlags?: UserFlags;
                    system?: boolean;
                    username: string;
                    verified?: boolean;
                };
                maxAge: number;
                maxUses: number;
                targetApplication?: {
                    approximateGuildCount?: number;
                    approximateUserInstallCount?: number;
                    bot?: APIUser;
                    botPublic?: boolean;
                    botRequireCodeGrant?: boolean;
                    coverImage?: string;
                    customInstallUrl?: string;
                    description?: string;
                    flags?: ApplicationFlags;
                    guild?: APIPartialGuild;
                    guildId?: string;
                    icon?: null
                    | string;
                    id?: string;
                    installParams?: APIApplicationInstallParams;
                    integrationTypesConfig?: APIApplicationIntegrationTypesConfigMap;
                    interactionsEndpointUrl?: null | string;
                    name?: string;
                    owner?: APIUser;
                    primarySkuId?: string;
                    privacyPolicyUrl?: string;
                    redirectUris?: string[];
                    roleConnectionsVerificationUrl?: null | string;
                    rpcOrigins?: string[];
                    slug?: string;
                    tags?: [string, string?, string?, string?, string?];
                    team?: null | APITeam;
                    termsOfServiceUrl?: string;
                    verifyKey?: string;
                };
                targetType?: InviteTargetType;
                targetUser?: {
                    accentColor?: null
                    | number;
                    avatar: null | string;
                    avatarDecorationData?: null | APIAvatarDecorationData;
                    banner?: null | string;
                    bot?: boolean;
                    discriminator: string;
                    email?: null | string;
                    flags?: UserFlags;
                    globalName: null | string;
                    id: string;
                    locale?: string;
                    mfaEnabled?: boolean;
                    premiumType?: UserPremiumType;
                    publicFlags?: UserFlags;
                    system?: boolean;
                    username: string;
                    verified?: boolean;
                };
                temporary: boolean;
                type: InviteType;
                uses: number;
            }[],
        >;
    } = ...
    joinedAt: StructPropState<number, State, "create">
    large: StructPropState<boolean, State, "create">
    maxMembers?: number
    maxPresences?: null | number
    maxStageVideoChannelUsers?: number
    maxVideoChannelUsers?: number
    memberCount: StructPropState<number, State, "create">
    members: {
        add: (
            id: string,
            body: RESTPutAPIGuildMemberJSONBody,
        ) => Promise<undefined | GuildMember>;
        addRole: (memberId: string, id: string) => Promise<undefined>;
        ban: (
            id: string,
            body?: RESTPutAPIGuildBanJSONBody,
            reason?: string,
        ) => Promise<void>;
        edit: (
            id: string,
            body: RESTPatchAPIGuildMemberJSONBody,
            reason?: string,
        ) => Promise<GuildMember>;
        fetch: (memberId: string, force?: boolean) => Promise<GuildMember>;
        kick: (id: string, reason?: string) => Promise<void>;
        list: (
            query?: RESTGetAPIGuildMembersQuery,
            force?: boolean,
        ) => Promise<GuildMember[]>;
        removeRole: (memberId: string, id: string) => Promise<undefined>;
        resolve: (
            resolve: GuildMemberResolvable,
        ) => Promise<undefined | GuildMember>;
        search: (
            query?: RESTGetAPIGuildMembersSearchQuery,
        ) => Promise<GuildMember[]>;
        unban: (id: string, reason?: string) => Promise<undefined>;
    } = ...
    mfaLevel: GuildMFALevel
    moderationRules: {
        create: (
            body: RESTPostAPIAutoModerationRuleJSONBody,
        ) => Promise<AutoModerationRule>;
        delete: (ruleId: string, reason?: string) => Promise<undefined>;
        edit: (
            ruleId: string,
            body: RESTPatchAPIAutoModerationRuleJSONBody,
            reason?: string,
        ) => Promise<AutoModerationRule>;
        fetch: (ruleId: string) => Promise<AutoModerationRule>;
        list: () => Promise<AutoModerationRule[]>;
    } = ...
    name: string
    nsfwLevel: GuildNSFWLevel
    owner?: boolean
    ownerId: string
    partnered: boolean
    permissions?: string
    preferredLocale:
        | "id"
        | "en-US"
        | "en-GB"
        | "bg"
        | "zh-CN"
        | "zh-TW"
        | "hr"
        | "cs"
        | "da"
        | "nl"
        | "fi"
        | "fr"
        | "de"
        | "el"
        | "hi"
        | "hu"
        | "it"
        | "ja"
        | "ko"
        | "lt"
        | "no"
        | "pl"
        | "pt-BR"
        | "ro"
        | "ru"
        | "es-ES"
        | "es-419"
        | "sv-SE"
        | "th"
        | "tr"
        | "uk"
        | "vi"
    premiumProgressBarEnabled: boolean
    premiumSubscriptionCount?: number
    premiumTier: GuildPremiumTier
    publicUpdatesChannelId: null | string
    roles: {
        create: (body: RESTPostAPIGuildRoleJSONBody) => Promise<GuildRole>;
        delete: (roleId: string, reason?: string) => Promise<void>;
        edit: (
            roleId: string,
            body: RESTPatchAPIGuildRoleJSONBody,
            reason?: string,
        ) => Promise<GuildRole>;
        editPositions: (
            body: RESTPatchAPIGuildRolePositionsJSONBody,
        ) => Promise<GuildRole[]>;
        list: (force?: boolean) => Promise<GuildRole[]>;
    } = ...
    rulesChannelId: null | string
    safetyAlertsChannelId: null | string
    shard: undefined | Shard
    shardId: number
    splash: null | string
    stickers: {
        create: (
            payload: CreateStickerBodyRequest,
            reason?: string,
        ) => Promise<Sticker>;
        delete: (stickerId: string, reason?: string) => Promise<void>;
        edit: (
            stickerId: string,
            body: RESTPatchAPIGuildStickerJSONBody,
            reason?: string,
        ) => Promise<Sticker>;
        fetch: (stickerId: string, force?: boolean) => Promise<Sticker>;
        list: () => Promise<Sticker[]>;
    } = ...
    systemChannelFlags: GuildSystemChannelFlags
    systemChannelId: null | string
    templates: {
        create: (
            body: RESTPostAPIGuildTemplatesJSONBody,
        ) => Promise<GuildTemplate>;
        delete: (code: string) => Promise<GuildTemplate>;
        edit: (
            code: string,
            body: RESTPatchAPIGuildTemplateJSONBody,
        ) => Promise<GuildTemplate>;
        fetch: (code: string) => Promise<GuildTemplate>;
        list: () => Promise<GuildTemplate[]>;
        sync: (code: string) => Promise<GuildTemplate>;
    } = ...
    unavailable?: StructPropState<boolean, State, "create">
    vanityUrlCode: null | string
    verificationLevel: GuildVerificationLevel
    verified: boolean
    webhooks: { list: () => Promise<Webhook[]> } = ...
    welcomeScreen?: {
        description: null | string;
        welcomeChannels: {
            channelId: string;
            description: string;
            emojiId: null | string;
            emojiName: null | string;
        }[];
    }
    widgetChannelId?: null | string
    widgetEnabled?: boolean

    Accessors

    Methods

    • Parameters

      • body: RESTPatchAPIGuildJSONBody
      • Optionalreason: string

      Returns Promise<Guild<"api">>