Skip to content

Class: GroupBase

structures.GroupBase

Table of contents

Constructors

Properties

Methods

Constructors

constructor

+ new GroupBase(data: GroupBaseOptions, client: default): GroupBase

Parameters:

Name Type
data GroupBaseOptions
client default

Returns: GroupBase

Defined in: structures/Group.ts:108

Properties

client

client: default

Defined in: structures/Group.ts:106


id

id: number

Defined in: structures/Group.ts:107


name

name: null | string

Defined in: structures/Group.ts:108

Methods

acceptJoinRequest

acceptJoinRequest(userId: number): Promise<unknown>

Parameters:

Name Type
userId number

Returns: Promise<unknown>

Defined in: structures/Group.ts:306


acceptJoinRequests

acceptJoinRequests(options: Pick<AcceptJoinRequestsOptions, userIds>): Promise<unknown>

Parameters:

Name Type
options Pick<AcceptJoinRequestsOptions, userIds>

Returns: Promise<unknown>

Defined in: structures/Group.ts:285


acceptRelationshipRequest

acceptRelationshipRequest(type: allies | enemies, withGroup: number): Promise<unknown>

Parameters:

Name Type
type allies | enemies
withGroup number

Returns: Promise<unknown>

Defined in: structures/Group.ts:465


acceptRelationshipRequests

acceptRelationshipRequests(options: Pick<DeclineRelationshipRequestsOptions, withGroups | relationshipType>): Promise<unknown>

Parameters:

Name Type
options Pick<DeclineRelationshipRequestsOptions, withGroups | relationshipType>

Returns: Promise<unknown>

Defined in: structures/Group.ts:444


canSelfManage

canSelfManage(): Promise<boolean>

Returns whether the authenticated user can manage the group or not

Returns: Promise<boolean>

Defined in: structures/Group.ts:142


changeOwner

changeOwner(userId: number): Promise<unknown>

Parameters:

Name Type
userId number

Returns: Promise<unknown>

Defined in: structures/Group.ts:375


claim

claim(): Promise<unknown>

Returns: Promise<unknown>

Defined in: structures/Group.ts:382


createRelationship

createRelationship(options: Pick<CreateRelationshipOptions, relationshipType | withGroup>): Promise<unknown>

Parameters:

Name Type
options Pick<CreateRelationshipOptions, relationshipType | withGroup>

Returns: Promise<unknown>

Defined in: structures/Group.ts:458


createRole

createRole(options: Pick<CreateRoleOptions, name | description | rank | usingGroupFunds>): Promise<Pick<{ description: string ; groupId: number ; id: number ; memberCount: number ; name: string ; rank: number }, id | name | description | rank | memberCount>>

Parameters:

Name Type
options Pick<CreateRoleOptions, name | description | rank | usingGroupFunds>

Returns: Promise<Pick<{ description: string ; groupId: number ; id: number ; memberCount: number ; name: string ; rank: number }, id | name | description | rank | memberCount>>

Defined in: structures/Group.ts:590


createSocialLink(options: Pick<PostSocialLinkOptions, url | type | title>): Promise<{ id: number ; title: string ; type: string ; url: string }>

Parameters:

Name Type
options Pick<PostSocialLinkOptions, url | type | title>

Returns: Promise<{ id: number ; title: string ; type: string ; url: string }>

Defined in: structures/Group.ts:514


createWallPost

createWallPost(options: Pick<CreateWallPostOptions, body | captchaToken | captchaProvider>): Promise<{ body: string ; created: string ; id: number ; poster: { buildersClubMembershipType: string ; displayName: string ; userId: number ; username: string } ; updated: string }>

Parameters:

Name Type
options Pick<CreateWallPostOptions, body | captchaToken | captchaProvider>

Returns: Promise<{ body: string ; created: string ; id: number ; poster: { buildersClubMembershipType: string ; displayName: string ; userId: number ; username: string } ; updated: string }>

Defined in: structures/Group.ts:550


declineJoinRequest

declineJoinRequest(userId: number): Promise<unknown>

Parameters:

Name Type
userId number

Returns: Promise<unknown>

Defined in: structures/Group.ts:292


declineJoinRequests

declineJoinRequests(userIds: number[]): Promise<unknown>

Parameters:

Name Type
userIds number[]

Returns: Promise<unknown>

Defined in: structures/Group.ts:263


declineRelationshipRequest

declineRelationshipRequest(type: allies | enemies, withGroup: number): Promise<unknown>

Parameters:

Name Type
type allies | enemies
withGroup number

Returns: Promise<unknown>

Defined in: structures/Group.ts:473


declineRelationshipRequests

declineRelationshipRequests(options: Pick<DeclineRelationshipRequestsOptions, withGroups | relationshipType>): Promise<unknown>

Parameters:

Name Type
options Pick<DeclineRelationshipRequestsOptions, withGroups | relationshipType>

Returns: Promise<unknown>

Defined in: structures/Group.ts:430


deleteRelationship

deleteRelationship(options: Pick<DeleteRelationshipOptions, relationshipType | withGroup>): Promise<unknown>

Parameters:

Name Type
options Pick<DeleteRelationshipOptions, relationshipType | withGroup>

Returns: Promise<unknown>

Defined in: structures/Group.ts:451


deleteRole

deleteRole(roleId: number): Promise<unknown>

Parameters:

Name Type
roleId number

Returns: Promise<unknown>

Defined in: structures/Group.ts:597


deleteSocialLink(id: number): Promise<unknown>

Parameters:

Name Type
id number

Returns: Promise<unknown>

Defined in: structures/Group.ts:521


deleteWallPost

deleteWallPost(id: number): Promise<unknown>

Parameters:

Name Type
id number

Returns: Promise<unknown>

Defined in: structures/Group.ts:557


getAllRolesPermissions

getAllRolesPermissions(): Promise<GetAllRolesPermissions>

Returns: Promise<GetAllRolesPermissions>

Defined in: structures/Group.ts:502


getAllies

getAllies(maxItems?: number, startItem?: number): Promise<GroupRelationships<allies>>

Parameters:

Name Type Default value
maxItems number 100
startItem? number -

Returns: Promise<GroupRelationships<allies>>

Defined in: structures/Group.ts:172


getEnemies

getEnemies(maxItems?: number, startItem?: number): Promise<GroupRelationships<enemies>>

Parameters:

Name Type Default value
maxItems number 100
startItem? number -

Returns: Promise<GroupRelationships<enemies>>

Defined in: structures/Group.ts:186


getFunds

getFunds(): Promise<number>

Gets the currently available funds in the group

Returns: Promise<number>

Defined in: structures/Group.ts:151


getGroup

getGroup(): Promise<Group>

Returns: Promise<Group>

Defined in: structures/Group.ts:200


getGuestPermissions

getGuestPermissions(): Promise<GroupRolePermissionsOptions>

Returns: Promise<GroupRolePermissionsOptions>

Defined in: structures/Group.ts:496


getIsMember

getIsMember(userId: number): Promise<null | GroupMember>

Parameters:

Name Type
userId number

Returns: Promise<null | GroupMember>

Defined in: structures/Group.ts:224


getIsPendingJoin

getIsPendingJoin(): Promise<boolean>

Returns: Promise<boolean>

Defined in: structures/Group.ts:370


getIsUserPrimaryGroup

getIsUserPrimaryGroup(userId: number): Promise<null | GroupMember>

Parameters:

Name Type
userId number

Returns: Promise<null | GroupMember>

Defined in: structures/Group.ts:564


getJoinRequest

getJoinRequest(userId: number): Promise<{ created: string ; requester: { displayName: string ; userId: number ; username: string } }>

Parameters:

Name Type
userId number

Returns: Promise<{ created: string ; requester: { displayName: string ; userId: number ; username: string } }>

Defined in: structures/Group.ts:299


getJoinRequests

getJoinRequests(options: Pick<GetJoinRequestsOptions, limit | cursor | sortOrder>): Promise<CursorPage<GroupJoinRequest>>

Parameters:

Name Type
options Pick<GetJoinRequestsOptions, limit | cursor | sortOrder>

Returns: Promise<CursorPage<GroupJoinRequest>>

Defined in: structures/Group.ts:270


getMember

getMember(userId: number): Promise<null | GroupMember>

Parameters:

Name Type
userId number

Returns: Promise<null | GroupMember>

Defined in: structures/Group.ts:204


getMembers

getMembers(options: Pick<GetMembersOptions, limit | cursor | sortOrder>): Promise<CursorPage<GroupMember>>

Parameters:

Name Type
options Pick<GetMembersOptions, limit | cursor | sortOrder>

Returns: Promise<CursorPage<GroupMember>>

Defined in: structures/Group.ts:347


getMembersWithRole

getMembersWithRole(options: Pick<GetMembersWithRoleOptions, limit | cursor | sortOrder | roleId>): Promise<CursorPage<GroupMember>>

Parameters:

Name Type
options Pick<GetMembersWithRoleOptions, limit | cursor | sortOrder | roleId>

Returns: Promise<CursorPage<GroupMember>>

Defined in: structures/Group.ts:332


getPayouts

getPayouts(): Promise<GetGroupPayouts>

Returns: Promise<GetGroupPayouts>

Defined in: structures/Group.ts:403


getRelationshipRequests

getRelationshipRequests(options: Pick<GetGroupRelationshipsOptions, relationshipType | startRowIndex | maxRows>): Promise<GetGroupRelationships>

Parameters:

Name Type
options Pick<GetGroupRelationshipsOptions, relationshipType | startRowIndex | maxRows>

Returns: Promise<GetGroupRelationships>

Defined in: structures/Group.ts:437


getRelationships

getRelationships(options: Pick<GetGroupRelationshipsOptions, relationshipType | startRowIndex | maxRows>): Promise<GetGroupRelationships>

Parameters:

Name Type
options Pick<GetGroupRelationshipsOptions, relationshipType | startRowIndex | maxRows>

Returns: Promise<GetGroupRelationships>

Defined in: structures/Group.ts:423


getRevenueSummaryInTimeFrame

getRevenueSummaryInTimeFrame(timeFrame: Day | Week | Month | Year): Promise<GetGroupRevenueSummaryInTimeFrame>

Parameters:

Name Type
timeFrame Day | Week | Month | Year

Returns: Promise<GetGroupRevenueSummaryInTimeFrame>

Defined in: structures/Group.ts:158


getRolePermissions

getRolePermissions(roleId: number): Promise<GroupRolePermissionsOptions>

Parameters:

Name Type
roleId number

Returns: Promise<GroupRolePermissionsOptions>

Defined in: structures/Group.ts:481


getRoles

getRoles(): Promise<GroupRole[]>

Returns: Promise<GroupRole[]>

Defined in: structures/Group.ts:319


getSelfMembership

getSelfMembership(): Promise<GetSelfGroupMembership>

Returns: Promise<GetSelfGroupMembership>

Defined in: structures/Group.ts:313


getSettings

getSettings(): Promise<GetGroupSettings>

Returns: Promise<GetGroupSettings>

Defined in: structures/Group.ts:229


getSocialLinks(): Promise<GetSocialLinks>

Returns: Promise<GetSocialLinks>

Defined in: structures/Group.ts:508


getTransactions

getTransactions(options: Pick<GetGroupTransactionsOptions, transactionType | limit | cursor>): Promise<GetGroupTransactions>

Parameters:

Name Type
options Pick<GetGroupTransactionsOptions, transactionType | limit | cursor>

Returns: Promise<GetGroupTransactions>

Defined in: structures/Group.ts:165


getUniverses

getUniverses(options?: Pick<GetGroupUniversesOptions, limit | cursor | sortOrder>): Promise<CursorPage<PartialGameUniverse>>

Parameters:

Name Type
options? Pick<GetGroupUniversesOptions, limit | cursor | sortOrder>

Returns: Promise<CursorPage<PartialGameUniverse>>

Defined in: structures/Group.ts:116


getWallPosts

getWallPosts(options: Pick<GetWallPostsOptions, limit | cursor | sortOrder>): Promise<CursorPage<GroupWallPost>>

Parameters:

Name Type
options Pick<GetWallPostsOptions, limit | cursor | sortOrder>

Returns: Promise<CursorPage<GroupWallPost>>

Defined in: structures/Group.ts:535


join

join(options: Pick<JoinGroupOptions, captchaToken | captchaProvider>): Promise<unknown>

Parameters:

Name Type
options Pick<JoinGroupOptions, captchaToken | captchaProvider>

Returns: Promise<unknown>

Defined in: structures/Group.ts:362


kickMember

kickMember(userId: number): Promise<unknown>

Parameters:

Name Type
userId number

Returns: Promise<unknown>

Defined in: structures/Group.ts:388


payoutMembers

payoutMembers(options: Pick<PayoutMembersOptions, type | users>): Promise<unknown>

Parameters:

Name Type
options Pick<PayoutMembersOptions, type | users>

Returns: Promise<unknown>

Defined in: structures/Group.ts:409


removeAsPrimary

removeAsPrimary(): Promise<unknown>

Returns: Promise<unknown>

Defined in: structures/Group.ts:580


setAsPrimary

setAsPrimary(): Promise<unknown>

Returns: Promise<unknown>

Defined in: structures/Group.ts:584


updateDescription

updateDescription(description: string): Promise<UpdateGroupDescription>

Parameters:

Name Type
description string

Returns: Promise<UpdateGroupDescription>

Defined in: structures/Group.ts:242


updateIcon

updateIcon(file: unknown): Promise<unknown>

Parameters:

Name Type
file unknown

Returns: Promise<unknown>

Defined in: structures/Group.ts:256


updateMember

updateMember(userId: number, roleId: number): Promise<unknown>

Parameters:

Name Type
userId number
roleId number

Returns: Promise<unknown>

Defined in: structures/Group.ts:395


updateRecurringPayouts

updateRecurringPayouts(options: Pick<PayoutMembersOptions, type | users>): Promise<unknown>

Parameters:

Name Type
options Pick<PayoutMembersOptions, type | users>

Returns: Promise<unknown>

Defined in: structures/Group.ts:416


updateRole

updateRole(roleId: number, options: Pick<UpdateRoleOptions, name | description | rank>): Promise<Pick<{ description: string ; groupId: number ; id: number ; memberCount: number ; name: string ; rank: number }, id | name | description | rank | memberCount>>

Parameters:

Name Type
roleId number
options Pick<UpdateRoleOptions, name | description | rank>

Returns: Promise<Pick<{ description: string ; groupId: number ; id: number ; memberCount: number ; name: string ; rank: number }, id | name | description | rank | memberCount>>

Defined in: structures/Group.ts:604


updateRolePermissions

updateRolePermissions(roleId: number, permissions: Pick<UpdateRolePermissionsOptions, DeleteFromWall | PostToWall | InviteMembers | PostToStatus | RemoveMembers | ViewStatus | ViewWall | ChangeRank | AdvertiseGroup | ManageRelationships | AddGroupPlaces | ViewAuditLogs | CreateItems | ManageItems | SpendGroupFunds | ManageClan | ManageGroupGames>): Promise<unknown>

Parameters:

Name Type
roleId number
permissions Pick<UpdateRolePermissionsOptions, DeleteFromWall | PostToWall | InviteMembers | PostToStatus | RemoveMembers | ViewStatus | ViewWall | ChangeRank | AdvertiseGroup | ManageRelationships | AddGroupPlaces | ViewAuditLogs | CreateItems | ManageItems | SpendGroupFunds | ManageClan | ManageGroupGames>

Returns: Promise<unknown>

Defined in: structures/Group.ts:488


updateSettings

updateSettings(options: Pick<GetGroupSettings, isApprovalRequired | isBuildersClubRequired | areEnemiesAllowed | areGroupFundsVisible | areGroupGamesVisible>): Promise<unknown>

Parameters:

Name Type
options Pick<GetGroupSettings, isApprovalRequired | isBuildersClubRequired | areEnemiesAllowed | areGroupFundsVisible | areGroupGamesVisible>

Returns: Promise<unknown>

Defined in: structures/Group.ts:235


updateShout

updateShout(shout: string): Promise<null | { body: string ; created: string ; poster: { buildersClubMembershipType: string ; displayName: string ; userId: number ; username: string } ; updated: string }>

Parameters:

Name Type
shout string

Returns: Promise<null | { body: string ; created: string ; poster: { buildersClubMembershipType: string ; displayName: string ; userId: number ; username: string } ; updated: string }>

Defined in: structures/Group.ts:249


updateSocialLink(options: Pick<UpdateSocialLinkOptions, url | id | type | title>): Promise<unknown>

Parameters:

Name Type
options Pick<UpdateSocialLinkOptions, url | id | type | title>

Returns: Promise<unknown>

Defined in: structures/Group.ts:528