Class: PartialGroup
structures/Group.PartialGroup
Hierarchy
↳ PartialGroup
Table of contents
Constructors
Properties
Methods
- acceptJoinRequest
- acceptJoinRequests
- acceptRelationshipRequest
- acceptRelationshipRequests
- canSelfManage
- changeOwner
- claim
- createRelationship
- createRole
- createSocialLink
- createWallPost
- declineJoinRequest
- declineJoinRequests
- declineRelationshipRequest
- declineRelationshipRequests
- deleteRelationship
- deleteRole
- deleteSocialLink
- deleteWallPost
- getAllRolesPermissions
- getAllies
- getEnemies
- getFunds
- getGroup
- getGuestPermissions
- getIsMember
- getIsPendingJoin
- getIsUserPrimaryGroup
- getJoinRequest
- getJoinRequests
- getMember
- getMembers
- getMembersWithRole
- getPayouts
- getRelationshipRequests
- getRelationships
- getRevenueSummaryInTimeFrame
- getRolePermissions
- getRoles
- getSelfMembership
- getSettings
- getSocialLinks
- getTransactions
- getUniverses
- getWallPosts
- join
- kickMember
- payoutMembers
- removeAsPrimary
- setAsPrimary
- updateDescription
- updateIcon
- updateMember
- updateRecurringPayouts
- updateRole
- updateRolePermissions
- updateSettings
- updateShout
- updateSocialLink
Constructors
constructor
+ new PartialGroup(data
: PartialGroupOptions, client
: default): PartialGroup
Parameters:
Name | Type |
---|---|
data |
PartialGroupOptions |
client |
default |
Returns: PartialGroup
Inherited from: GroupBase
Defined in: structures/Group.ts:620
Properties
client
• client: default
Inherited from: GroupBase.client
Defined in: structures/Group.ts:106
id
• id: number
Defined in: structures/Group.ts:107
name
• name: null | string
Inherited from: GroupBase.name
Defined in: structures/Group.ts:108
Methods
acceptJoinRequest
▸ acceptJoinRequest(userId
: number): Promise<unknown>
Parameters:
Name | Type |
---|---|
userId |
number |
Returns: Promise<unknown>
Inherited from: GroupBase
Defined in: structures/Group.ts:306
acceptJoinRequests
▸ acceptJoinRequests(options
: Pick<AcceptJoinRequestsOptions, userIds>): Promise<unknown>
Parameters:
Name | Type |
---|---|
options |
Pick<AcceptJoinRequestsOptions, userIds> |
Returns: Promise<unknown>
Inherited from: GroupBase
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>
Inherited from: GroupBase
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>
Inherited from: GroupBase
Defined in: structures/Group.ts:444
canSelfManage
▸ canSelfManage(): Promise<boolean>
Returns whether the authenticated user can manage the group or not
Returns: Promise<boolean>
Inherited from: GroupBase
Defined in: structures/Group.ts:142
changeOwner
▸ changeOwner(userId
: number): Promise<unknown>
Parameters:
Name | Type |
---|---|
userId |
number |
Returns: Promise<unknown>
Inherited from: GroupBase
Defined in: structures/Group.ts:375
claim
▸ claim(): Promise<unknown>
Returns: Promise<unknown>
Inherited from: GroupBase
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>
Inherited from: GroupBase
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>>
Inherited from: GroupBase
Defined in: structures/Group.ts:590
createSocialLink
▸ 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 }>
Inherited from: GroupBase
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 }>
Inherited from: GroupBase
Defined in: structures/Group.ts:550
declineJoinRequest
▸ declineJoinRequest(userId
: number): Promise<unknown>
Parameters:
Name | Type |
---|---|
userId |
number |
Returns: Promise<unknown>
Inherited from: GroupBase
Defined in: structures/Group.ts:292
declineJoinRequests
▸ declineJoinRequests(userIds
: number[]): Promise<unknown>
Parameters:
Name | Type |
---|---|
userIds |
number[] |
Returns: Promise<unknown>
Inherited from: GroupBase
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>
Inherited from: GroupBase
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>
Inherited from: GroupBase
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>
Inherited from: GroupBase
Defined in: structures/Group.ts:451
deleteRole
▸ deleteRole(roleId
: number): Promise<unknown>
Parameters:
Name | Type |
---|---|
roleId |
number |
Returns: Promise<unknown>
Inherited from: GroupBase
Defined in: structures/Group.ts:597
deleteSocialLink
▸ deleteSocialLink(id
: number): Promise<unknown>
Parameters:
Name | Type |
---|---|
id |
number |
Returns: Promise<unknown>
Inherited from: GroupBase
Defined in: structures/Group.ts:521
deleteWallPost
▸ deleteWallPost(id
: number): Promise<unknown>
Parameters:
Name | Type |
---|---|
id |
number |
Returns: Promise<unknown>
Inherited from: GroupBase
Defined in: structures/Group.ts:557
getAllRolesPermissions
▸ getAllRolesPermissions(): Promise<GetAllRolesPermissions>
Returns: Promise<GetAllRolesPermissions>
Inherited from: GroupBase
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>>
Inherited from: GroupBase
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>>
Inherited from: GroupBase
Defined in: structures/Group.ts:186
getFunds
▸ getFunds(): Promise<number>
Gets the currently available funds in the group
Returns: Promise<number>
Inherited from: GroupBase
Defined in: structures/Group.ts:151
getGroup
▸ getGroup(): Promise<Group>
Returns: Promise<Group>
Inherited from: GroupBase
Defined in: structures/Group.ts:200
getGuestPermissions
▸ getGuestPermissions(): Promise<GroupRolePermissionsOptions>
Returns: Promise<GroupRolePermissionsOptions>
Inherited from: GroupBase
Defined in: structures/Group.ts:496
getIsMember
▸ getIsMember(userId
: number): Promise<null | GroupMember>
Parameters:
Name | Type |
---|---|
userId |
number |
Returns: Promise<null | GroupMember>
Inherited from: GroupBase
Defined in: structures/Group.ts:224
getIsPendingJoin
▸ getIsPendingJoin(): Promise<boolean>
Returns: Promise<boolean>
Inherited from: GroupBase
Defined in: structures/Group.ts:370
getIsUserPrimaryGroup
▸ getIsUserPrimaryGroup(userId
: number): Promise<null | GroupMember>
Parameters:
Name | Type |
---|---|
userId |
number |
Returns: Promise<null | GroupMember>
Inherited from: GroupBase
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 } }>
Inherited from: GroupBase
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>>
Inherited from: GroupBase
Defined in: structures/Group.ts:270
getMember
▸ getMember(userId
: number): Promise<null | GroupMember>
Parameters:
Name | Type |
---|---|
userId |
number |
Returns: Promise<null | GroupMember>
Inherited from: GroupBase
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>>
Inherited from: GroupBase
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>>
Inherited from: GroupBase
Defined in: structures/Group.ts:332
getPayouts
▸ getPayouts(): Promise<GetGroupPayouts>
Returns: Promise<GetGroupPayouts>
Inherited from: GroupBase
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>
Inherited from: GroupBase
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>
Inherited from: GroupBase
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>
Inherited from: GroupBase
Defined in: structures/Group.ts:158
getRolePermissions
▸ getRolePermissions(roleId
: number): Promise<GroupRolePermissionsOptions>
Parameters:
Name | Type |
---|---|
roleId |
number |
Returns: Promise<GroupRolePermissionsOptions>
Inherited from: GroupBase
Defined in: structures/Group.ts:481
getRoles
▸ getRoles(): Promise<GroupRole[]>
Returns: Promise<GroupRole[]>
Inherited from: GroupBase
Defined in: structures/Group.ts:319
getSelfMembership
▸ getSelfMembership(): Promise<GetSelfGroupMembership>
Returns: Promise<GetSelfGroupMembership>
Inherited from: GroupBase
Defined in: structures/Group.ts:313
getSettings
▸ getSettings(): Promise<GetGroupSettings>
Returns: Promise<GetGroupSettings>
Inherited from: GroupBase
Defined in: structures/Group.ts:229
getSocialLinks
▸ getSocialLinks(): Promise<GetSocialLinks>
Returns: Promise<GetSocialLinks>
Inherited from: GroupBase
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>
Inherited from: GroupBase
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>>
Inherited from: GroupBase
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>>
Inherited from: GroupBase
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>
Inherited from: GroupBase
Defined in: structures/Group.ts:362
kickMember
▸ kickMember(userId
: number): Promise<unknown>
Parameters:
Name | Type |
---|---|
userId |
number |
Returns: Promise<unknown>
Inherited from: GroupBase
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>
Inherited from: GroupBase
Defined in: structures/Group.ts:409
removeAsPrimary
▸ removeAsPrimary(): Promise<unknown>
Returns: Promise<unknown>
Inherited from: GroupBase
Defined in: structures/Group.ts:580
setAsPrimary
▸ setAsPrimary(): Promise<unknown>
Returns: Promise<unknown>
Inherited from: GroupBase
Defined in: structures/Group.ts:584
updateDescription
▸ updateDescription(description
: string): Promise<UpdateGroupDescription>
Parameters:
Name | Type |
---|---|
description |
string |
Returns: Promise<UpdateGroupDescription>
Inherited from: GroupBase
Defined in: structures/Group.ts:242
updateIcon
▸ updateIcon(file
: unknown): Promise<unknown>
Parameters:
Name | Type |
---|---|
file |
unknown |
Returns: Promise<unknown>
Inherited from: GroupBase
Defined in: structures/Group.ts:256
updateMember
▸ updateMember(userId
: number, roleId
: number): Promise<unknown>
Parameters:
Name | Type |
---|---|
userId |
number |
roleId |
number |
Returns: Promise<unknown>
Inherited from: GroupBase
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>
Inherited from: GroupBase
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>>
Inherited from: GroupBase
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>
Inherited from: GroupBase
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>
Inherited from: GroupBase
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 }>
Inherited from: GroupBase
Defined in: structures/Group.ts:249
updateSocialLink
▸ updateSocialLink(options
: Pick<UpdateSocialLinkOptions, url | id | type | title>): Promise<unknown>
Parameters:
Name | Type |
---|---|
options |
Pick<UpdateSocialLinkOptions, url | id | type | title> |
Returns: Promise<unknown>
Inherited from: GroupBase
Defined in: structures/Group.ts:528