-
Notifications
You must be signed in to change notification settings - Fork 149
Guild
SinisterRectus edited this page Mar 4, 2017
·
43 revisions
Objects Accessible via Caches
- Channels
- Emojis
- Members
- Messages
- Roles
- TextChannels
- VoiceChannels
Properties Inherited From Container
| Name | Type | Mutable | Description |
|---|---|---|---|
| client | Client | Client object to which the Discord object is known | |
| parent | * | Parent Discord object |
Properties Inherited From Snowflake
| Name | Type | Mutable | Description |
|---|---|---|---|
| createdAt | number | Unix time in seconds at which the object was created by Discord | |
| id | string | Snowflake ID for the object | |
| timestamp | string | ISO 8601 date and time at which the object was created by Discord |
| Name | Type | Mutable | Description |
|---|---|---|---|
| afkChannel | GuildVoiceChannel | X | Voice channel to where members are moved when they are AFK |
| afkTimeout | number | X | AFK timeout in seconds |
| bannedUsers | function | Iterator for the banned users in the guild | |
| channelCount | number | How many Channels are cached for the guild. | |
| channels | function | Iterator for the guild's cached Channels. | |
| connection | VoiceConnection? | The handle for this guild's voice connection, if one exists | |
| defaultChannel | GuildTextChannel | The guild's default text channel | |
| defaultRole | Role | The guild's '@everyone' role | |
| emojiCount | number | How many Emojis are cached for the guild. | |
| emojis | function | Iterator for the guild's cached Emojis. | |
| icon | string? | X | Hash representing the guild's icon |
| iconUrl | string? | URL that points to the guild's icon | |
| invites | function | Iterator for the guild's invites (not cached) | |
| joinedAt | string | Date and time at which the client joined the guild | |
| large | boolean | Whether the guild has a lot of members | |
| me | Member | The client's member object for this guild | |
| memberCount | number | How many Members are cached for the guild. | |
| members | function | Iterator for the guild's cached Members. | |
| messageCount | number | How many Messages are cached for the guild. | |
| messages | function | Iterator for the guild's cached Messages. | |
| mfaLevel | number | Guild required MFA level | |
| name | string | X | Name of the guild |
| notificationsSetting | number | Default message notifications setting for members | |
| owner | Member | X | The member that owns the server |
| region | string | X | String representing the guild's voice region |
| roleCount | number | How many Roles are cached for the guild. | |
| roles | function | Iterator for the guild's cached Roles. | |
| shardId | number | The ID of the shard on which this guild's events will be transmitted | |
| splash | string? | Hash representing the guild's custom splash | |
| textChannelCount | number | How many TextChannels are cached for the guild. | |
| textChannels | function | Iterator for the guild's cached TextChannels. | |
| totalMemberCount | number | How many members exist in the guild (can be different from cached memberCount) | |
| unavailable | boolean | Whether the guild data is unavailable | |
| verificationLevel | number | Guild verification level | |
| vip | boolean | Whether the guild is featured by Discord | |
| voiceChannelCount | number | How many VoiceChannels are cached for the guild. | |
| voiceChannels | function | Iterator for the guild's cached VoiceChannels. |
| Prototype | Interface | Description |
|---|---|---|
| banUser(user[, days]) | HTTP | Bans a user from the guild and optionally deletes their messages from 1-7 days. |
| createRole() | HTTP | Creates a new role in the guild. |
| createTextChannel(name) | HTTP | Creates a new text channel in the guild. |
| createVoiceChannel(name) | HTTP | Creates a new voice channel in the guild. |
| delete() | HTTP | Deletes the guild. |
| getPruneCount([days]) | HTTP | Returns how many members would be removed if 1-30 day prune were performed (default: 1 day). |
| kickUser(user) | HTTP | Kicks a user from the guild |
| leave() | HTTP | Leaves the guild. |
| listVoiceRegions() | HTTP | Returns a table of guild voice regions. |
| pruneMembers([days]) | HTTP | Removes members who have not been seen in 1-30 days (default: 1 day). Returns the number of pruned members. |
| unbanUser(user) | HTTP | Unbans a user from the guild. |