Table of Contents
- Non-Object Methods
- Properties
- Methods
- getAvatarURL([size, protocol])
- getMembers([addresses, ]callback)
- join([callback])
- leave([callback])
- postAnnouncement(headline, content[, hidden][, callback])
- scheduleEvent(name, type, description, time[, server, callback])
- editEvent(id, name, type, description, time[, server, callback])
- deleteEvent(id[, callback])
- setPlayerOfTheWeek(steamID[, callback])
- kick(steamID[, callback])
- getHistory([page, ]callback)
- getAllAnnouncements([time, ]callback)
- editAnnouncement(announcementID, headline, content[, callback])
- deleteAnnouncement(announcementID[, callback])
- getJoinRequests(callback)
- respondToJoinRequests(steamIDs, approve[, callback])
- respondToAllJoinRequests(approve[, callback])
- getAllComments(from, count, callback)
- deleteComment(commentID, callback)
A class which stands for a Steam group. This class cannot be instantiated directly; it must be received from a call to getSteamGroup.
Non-Object Methods
As of v3.5.0, if you don't want to bother with setting up a CSteamGroup object, methods on this page marked with a non-object method name can be called directly on your SteamCommunity instance, with the group's SteamID being the first parameter. For example:
var SteamCommunity = require('steamcommunity');
var community = new SteamCommunity();
community.getGroupMembers("103582791434202956", function(err, members) {
/* do something... */
});
Properties
steamID
A SteamID object containing the group's SteamID. Visit a group at https://steamcommunity.com/gid/SteamID
name
The group's name (cannot be changed)
url
The group's URL (this can be changed). Visit a group at https://steamcommunity.com/groups/GROUPURL
headline
The group's headline (this can be changed)
summary
The group's summary content (this can be changed)
avatarHash
The hash of the group's avatar
members
How many members the group had when getSteamGroup was called
membersInChat
How many group members were in group chat when getSteamGroup was called
membersInGame
How many group members were in-game when getSteamGroup was called
membersOnline
How many group members were online on Steam when getSteamGroup was called
Methods
getAvatarURL([size, protocol])
size- What size to get the avatar at. Possible values arefull,medium, or empty (small). Default empty.protocol- The protocol to use. Possible values forprotocolarehttp://,https://, or//(protocol aware). Defaulthttp://.
Returns a URL where you can download this group's avatar.
getMembers([addresses, ]callback)
addresses- Optional. An array of IP addresses (inx.x.x.xformat) that will be rotated between when paging through the results. See below for details.callback- Called when the member list is availableerr-nullon success, anErrorobject on failuremembers- An array ofSteamIDobjects
Non-object method name: getGroupMembers
v3.5.0 or later is required to use the addresses argument.
Retrieves a list of all users in this group. For large groups this could take around 30 seconds, possibly longer.
Steam returns at most 1000 users per page. Therefore, node-steamcommunity will need to make ceil(totalMembers / 1000) HTTP requests to fulfill this request. steamcommunity.com will start rate-limiting us after around 60 requests. If you supply an array of IP addresses which are accessible to this machine as the addresses argument, then node-steamcommunity will rotate between them for each request.
Important: If using non-object methods, then you'll need to use differently-named methods depending on whether or not you want to use addresses.
- To not use
addresses:community.getGroupMembers(groupID, callback)
- To use
addresses:community.getGroupMembersEx(groupID, addresses, callback)
join([callback])
callback- Called when the request completeserr-nullon success, anErrorobject on failure
Non-object method name: joinGroup
Joins a group. If the group is restricted, requests to join.
leave([callback])
callback- Called when the request completeserr-nullon success, anErrorobject on failure
Non-object method name: leaveGroup
Leaves a group.
postAnnouncement(headline, content[, hidden][, callback])
headline- The title of the announcementcontent- What the announcement sayshidden- Optional.trueto post this as a hidden announcement. Defaultfalse.callback- Called when the request completeserr-nullon success, anErrorobject on failure
Non-object method name: postGroupAnnouncement
Posts an announcement to a group, provided you have permission to do so.
scheduleEvent(name, type, description, time[, server, callback])
name- The event's name/headlinetype- See belowdescription- A description for the eventtime-nullto start it immediately, otherwise aDateobject representing a time in the futureserver- If this is a game event (see below), this can be a string containing the game server's IP address or an object containingipandpasswordproperties. If not a game event, this should be null or undefined.callback- Called when the request completeserr-nullon success, anErrorobject on failure
Non-object method name: scheduleGroupEvent
Schedules a new event for the group. type can be one of the strings shown below, or an AppID to schedule a game-specific event.
ChatEvent- ChatOtherEvent- A lil somethin somethinPartyEvent- Party!MeetingEvent- Important meetingSpecialCauseEvent- Special cause (charity ball?)MusicAndArtsEvent- Music or Art type thingSportsEvent- Sporting endeavorTripEvent- Out of town excursion
editEvent(id, name, type, description, time[, server, callback])
id- The 64-bit numeric ID of the event you want to edit (as a string)name- The event's name/headlinetype- See belowdescription- A description for the eventtime-nullto start it immediately, otherwise aDateobject representing a time in the futureserver- If this is a game event (see below), this can be a string containing the game server's IP address or an object containingipandpasswordproperties. If not a game event, this should be null or undefined.callback- Called when the request completeserr-nullon success, anErrorobject on failure
Non-object method name: editGroupEvent
v3.20.0 or later is required to use this method
Edits an existing Steam group event. Parameters are identical to those in scheduleEvent.
deleteEvent(id[, callback])
id- The 64-bit numeric ID of the event you want to delete (as a string)callback- Optional. Called when the request completeserr-nullon success, anErrorobject on failure
Non-object method name: deleteGroupEvent
v3.21.0 or later is required to use this method
Deletes an existing Steam group event.
setPlayerOfTheWeek(steamID[, callback])
steamID- ASteamIDobject representing the group's new Player of the Weekcallback- Called when the request completeserr-nullon success, anErrorobject on failureoldPOTW- ASteamIDrepresenting the former Player of the WeeknewPOTW- ASteamIDrepresenting the new Player of the Week
Non-object method name: setGroupPlayerOfTheWeek
Changes the group's current Player of the Week.
kick(steamID[, callback])
steamID- ASteamIDobject representing the player to kick from the groupcallback- Called when the request completeserr-nullon success, anErrorobject on failure
Non-object method name: kickGroupMember
Kicks a player from the group.
getHistory([page, ]callback)
page- The page of history that you're requesting, starting at 1callback- Called when requested data is availableerr-nullon success, anErrorobject on failurehistory- An object containing group history for this pagefirst- The index of the first history item on this page, starting at 1last- The index of the last history item on this pagetotal- How many total history items there areitems- An array of group history objectstype- A string containing the item history type. This is the type displayed on the history page, without spaces. For example,NewMember,InviteSent, etc.date- ADateobject containing the date and time when this action took place. Since the history page doesn't display any years, the year could possibly be incorrect.user- ASteamIDobject containing the SteamID of the user who either performed or received this action. For example, onNewMemberthis is the new group member, onInviteSentthis is the invite recipient, onNewAnnouncement, this is the authoractor- Not present on all history types. This is the user who performed the action ifuseris the receipient of the action
Non-object method name: getGroupHistory
v3.5.0 or later is required to use this method.
Requests a page of group history (visible at https://steamcommunity.com/groups/yourgroup/history).
getAllAnnouncements([time, ]callback)
time- Optional. ADateobject. If specified, only announcements posted after this time are returned.callback- Called when requested data is availableerr-nullon success, or anErrorobject on failureannouncements- An array of announcement objectsheadline- The announcement's titlecontent- The content of the announcementdate- ADateobject for when this was postedauthor- The Steam profile name of the authoraid- The ID of the announcement
**Non-object method name: getAllGroupAnnouncements
v3.18.0 or later is required to use this method.
Gets all announcements posted to the group.
editAnnouncement(announcementID, headline, content[, callback])
announcementID- The ID of the announcement, as a stringheadline- The new title for the announcementcontent- The new content for the announcementcallback- Optional. Called when the request completes.err-nullon success, or anErrorobject on failure
Non-object method name: editGroupAnnouncement
v3.18.0 or later is required to use this method.
Edits an announcement in the group.
deleteAnnouncement(announcementID[, callback])
announcementID- The ID of the announcement, as a stringcallback- Optional. Called when the request completes.err-nullon success, or anErrorobject on failure
Non-object method name: editGroupAnnouncement
v3.18.1 or later is required to use this method.
Deletes an announcement in the group.
getJoinRequests(callback)
callback- Required. Called when the request completes.err-nullon success, or anErrorobject on failurerequests- An array ofSteamIDobjects, where each object represents a user who has requested to join the group
Non-object method name: getGroupJoinRequests
v3.32.0 or later is required to use this method.
Gets a listing of everyone who has requested to join this group. Is useless for non-restricted (i.e., public or invite-only) groups.
respondToJoinRequests(steamIDs, approve[, callback])
steamIDs- An array of eitherSteamIDobjects or strings that can parse intoSteamIDobjectsapprove- Eithertrueto approve joining the group for these users, orfalseto deny itcallback- Optional. Called when the request completes.err-nullon success, or anErrorobject on failure
Non-object method name: respondToGroupJoinRequests
v3.32.0 or later is required to use this method.
Approves or denies joining the group for specific users who have requested to join. Those users must have an outstanding group-join request, and the group must be restricted.
respondToAllJoinRequests(approve[, callback])
approve- Eithertrueto approve joining the group for all who have requested it currently, orfalseto deny itcallback- Optional. Called when the request completes.err-nullon success, or anErrorobject on failure
Non-object method name: respondToAllGroupJoinRequests
v3.32.0 or later is required to use this method.
Approves or denies joining the group for all users who currently have outstanding join requests. Useless for non-restricted groups.
getAllComments(from, count, callback)
from- The offset where you want to start. 0 to start with the first (most recent) commentcount- The number of comments you want to retrievecallback- Called when the request completes.err-nullon success, or anErrorobject on failurecomments- An array of comments. Each comment is an object containing these properties:authorName- The comment author's persona nameauthorId- Either the comment author's 64-bit Steam ID, or their vanity URLdate- ADateobject of when this comment was submittedcommentId- The ID of this commenttext- The HTML content of this comment
**Non-object method name: getAllGroupComments
v3.34.0 or later is required to use this method
Gets a listing of comments in a Steam group.
deleteComment(commentID, callback)
commentID- The ID of the comment you want to deletecallback- Optional. Called when the request completes.err-nullon success, or anErrorobject on failure
**Non-object method name: deleteGroupComment
v3.34.0 or later is required to use this method
Deletes a comment in a Steam group, provided you have permission to do so (i.e. are the author or a group moderator/admin with the appropriate permission).