Guild
Extends
ObjectToLower
<Omit
<APIGuild
,"stickers"
|"emojis"
|"roles"
>>.DiscordBase
.Object
Type parameters
Type parameter | Value |
---|---|
State extends StructStates | "api" |
Constructors
new Guild(client, data)
Parameters
Parameter | Type |
---|---|
client | UsingClient |
data | APIGuild | GatewayGuildCreateDispatchData |
Returns
Guild
<State
>
Inherited from
ObjectToLower<Omit<APIGuild, 'stickers' | 'emojis' | 'roles'>>.constructor
Source
seyfert/src/structures/Guild.ts:24
Properties
Property | Modifier | Type | Inherited from |
---|---|---|---|
afkChannelId | public | null | string | ObjectToLower.afkChannelId |
afkTimeout | public | | 60 | 300 | 900 | 1800 | 3600 | ObjectToLower.afkTimeout |
api | public | APIRoutes | DiscordBase.api |
applicationId | public | null | string | ObjectToLower.applicationId |
approximateMemberCount | public | undefined | number | ObjectToLower.approximateMemberCount |
approximatePresenceCount | public | undefined | number | ObjectToLower.approximatePresenceCount |
banner | public | null | string | ObjectToLower.banner |
cache | public | Cache | DiscordBase.cache |
channels | public | Object | - |
channels.create | readonly | (body : RESTPostAPIGuildChannelJSONBody ) => Promise <AllChannels > | - |
channels.delete | public | (id : string , reason ?: string ) => Promise <AllChannels > | - |
channels.edit | public | (id : string , body : RESTPatchAPIChannelJSONBody , reason ?: string ) => Promise <AllChannels > | - |
channels.editPositions | public | (body : RESTPatchAPIGuildChannelPositionsJSONBody ) => Promise <never > | - |
channels.fetch | public | (id : string , force : boolean ) => Promise <AllChannels > | - |
channels.list | public | (force : boolean ) => Promise <AllChannels []> | - |
client | public | UsingClient | DiscordBase.client |
createdAt | public | Date | DiscordBase.createdAt |
createdTimestamp | public | number | DiscordBase.createdTimestamp |
defaultMessageNotifications | public | GuildDefaultMessageNotifications | ObjectToLower.defaultMessageNotifications |
description | public | null | string | ObjectToLower.description |
discoverySplash | public | null | string | ObjectToLower.discoverySplash |
emojis | public | Object | - |
emojis.create | public | (body : Omit <RESTPostAPIGuildEmojiJSONBody , "image" > & Object ) => Promise <void > | - |
emojis.edit | public | (emojiId : string , body : RESTPatchAPIGuildEmojiJSONBody , reason ?: string ) => Promise <GuildEmoji > | - |
emojis.fetch | public | (emojiId : string , force : boolean ) => Promise <GuildEmoji > | - |
emojis.list | public | (force : boolean ) => Promise <GuildEmoji []> | - |
explicitContentFilter | public | GuildExplicitContentFilter | ObjectToLower.explicitContentFilter |
features | public | GuildFeature [] | ObjectToLower.features |
hubType | public | null | GuildHubType | ObjectToLower.hubType |
icon | public | null | string | ObjectToLower.icon |
iconHash | public | undefined | null | string | ObjectToLower.iconHash |
id | public | string | ObjectToLower.id |
joinedAt | public | StructPropState <number , State , "create" > | - |
large | public | StructPropState <boolean , State , "create" > | - |
maxMembers | public | undefined | number | ObjectToLower.maxMembers |
maxPresences | public | undefined | null | number | ObjectToLower.maxPresences |
maxStageVideoChannelUsers | public | undefined | number | ObjectToLower.maxStageVideoChannelUsers |
maxVideoChannelUsers | public | undefined | number | ObjectToLower.maxVideoChannelUsers |
memberCount | public | StructPropState <number , State , "create" > | - |
members | public | Object | - |
members.add | public | (id : string , body : RESTPutAPIGuildMemberJSONBody ) => Promise <undefined | GuildMember > | - |
members.ban | public | (id : string , body ?: RESTPutAPIGuildBanJSONBody , reason ?: string ) => Promise <void > | - |
members.edit | public | (id : string , body : RESTPatchAPIGuildMemberJSONBody , reason ?: string ) => Promise <GuildMember > | - |
members.fetch | public | (memberId : string , force : boolean ) => Promise <GuildMember > | - |
members.kick | public | (id : string , reason ?: string ) => Promise <void > | - |
members.list | public | (query ?: RESTGetAPIGuildMembersQuery , force : boolean ) => Promise <GuildMember []> | - |
members.resolve | public | (resolve : GuildMemberResolvable ) => Promise <undefined | GuildMember > | - |
members.search | public | (query ?: RESTGetAPIGuildMembersSearchQuery ) => Promise <GuildMember []> | - |
members.unban | public | (id : string , body ?: RESTPutAPIGuildBanJSONBody , reason ?: string ) => Promise <void > | - |
mfaLevel | public | GuildMFALevel | ObjectToLower.mfaLevel |
moderationRules | public | Object | - |
moderationRules.create | public | (body : RESTPostAPIAutoModerationRuleJSONBody ) => Promise <AutoModerationRule > | - |
moderationRules.delete | public | (ruleId : string , reason ?: string ) => Promise <never > | - |
moderationRules.edit | public | (ruleId : string , body : RESTPatchAPIAutoModerationRuleJSONBody , reason ?: string ) => Promise <AutoModerationRule > | - |
moderationRules.fetch | public | (ruleId : string ) => Promise <AutoModerationRule > | - |
moderationRules.list | public | () => Promise <AutoModerationRule []> | - |
name | public | string | ObjectToLower.name |
nsfwLevel | public | GuildNSFWLevel | ObjectToLower.nsfwLevel |
owner | public | undefined | boolean | ObjectToLower.owner |
ownerId | public | string | ObjectToLower.ownerId |
partnered | public | boolean | - |
permissions | public | undefined | string | ObjectToLower.permissions |
preferredLocale | public | string | ObjectToLower.preferredLocale |
premiumProgressBarEnabled | public | boolean | ObjectToLower.premiumProgressBarEnabled |
premiumSubscriptionCount | public | undefined | number | ObjectToLower.premiumSubscriptionCount |
premiumTier | public | GuildPremiumTier | ObjectToLower.premiumTier |
publicUpdatesChannelId | public | null | string | ObjectToLower.publicUpdatesChannelId |
region | public | string | ObjectToLower.region |
rest | public | ApiHandler | DiscordBase.rest |
roles | public | Object | - |
roles.create | public | (body : RESTPostAPIGuildRoleJSONBody ) => Promise <GuildRole > | - |
roles.delete | public | (roleId : string , reason ?: string ) => Promise <GuildRole > | - |
roles.edit | public | (roleId : string , body : RESTPatchAPIGuildRoleJSONBody , reason ?: string ) => Promise <GuildRole > | - |
roles.editPositions | public | (body : RESTPatchAPIGuildRolePositionsJSONBody ) => Promise <GuildRole []> | - |
roles.list | public | (force : boolean ) => Promise <GuildRole []> | - |
rulesChannelId | public | null | string | ObjectToLower.rulesChannelId |
safetyAlertsChannelId | public | null | string | ObjectToLower.safetyAlertsChannelId |
splash | public | null | string | ObjectToLower.splash |
stickers | public | Object | - |
stickers.create | public | (payload : CreateStickerBodyRequest , reason ?: string ) => Promise <Sticker > | - |
stickers.delete | public | (stickerId : string , reason ?: string ) => Promise <void > | - |
stickers.edit | public | (stickerId : string , body : RESTPatchAPIGuildStickerJSONBody , reason ?: string ) => Promise <Sticker > | - |
stickers.fetch | public | (stickerId : string , force : boolean ) => Promise <Sticker > | - |
stickers.list | public | () => Promise <Sticker []> | - |
systemChannelFlags | public | GuildSystemChannelFlags | ObjectToLower.systemChannelFlags |
systemChannelId | public | null | string | ObjectToLower.systemChannelId |
templates | public | Object | - |
templates.create | public | (body : RESTPostAPIGuildTemplatesJSONBody ) => Promise <GuildTemplate > | - |
templates.delete | public | (code : string ) => Promise <GuildTemplate > | - |
templates.edit | public | (code : string , body : AddUndefinedToPossiblyUndefinedPropertiesOfInterface <Partial <RESTPostAPIGuildTemplatesJSONBody >>) => Promise <GuildTemplate > | - |
templates.fetch | public | (code : string ) => Promise <GuildTemplate > | - |
templates.list | public | () => Promise <GuildTemplate []> | - |
templates.sync | public | (code : string ) => Promise <GuildTemplate > | - |
unavailable? | public | StructPropState <boolean , State , "create" > | - |
vanityUrlCode | public | null | string | ObjectToLower.vanityUrlCode |
verificationLevel | public | GuildVerificationLevel | ObjectToLower.verificationLevel |
verified | public | boolean | - |
webhooks | public | Object | - |
webhooks.list | public | () => Promise <Webhook []> | - |
welcomeScreen | public | undefined | Object | ObjectToLower.welcomeScreen |
widgetChannelId | public | undefined | null | string | ObjectToLower.widgetChannelId |
widgetEnabled | public | undefined | boolean | ObjectToLower.widgetEnabled |
Accessors
maxEmojis
Returns
Source
seyfert/src/structures/Guild.ts:50
maxStickers
Returns
Source
seyfert/src/structures/Guild.ts:37
Methods
bannerURL()
bannerURL gets the current guild banner as a string.
Parameters
Parameter | Type | Description |
---|---|---|
options ? | CDNUrlOptions | Image options for the banner url. |
Returns
undefined
| string
Banner url or void
Link
https://discord.com/developers/docs/reference#image-formatting
Source
seyfert/src/structures/extra/BaseGuild.ts:67
fetch()
Fetch guild on API
Parameters
Parameter | Type |
---|---|
…args | [] |
Returns
Promise
<Guild
<"api"
>>
Source
seyfert/src/structures/extra/BaseGuild.ts:32
fetchOwner()
Parameters
Parameter | Type | Default value |
---|---|---|
force | boolean | false |
Returns
Promise
<null
> | Promise
<GuildMember
>
Source
seyfert/src/structures/Guild.ts:63
iconURL()
iconURL gets the current guild icon.
Parameters
Parameter | Type |
---|---|
options ? | CDNUrlOptions |
Returns
undefined
| string
Link
https://discord.com/developers/docs/reference#image-formatting
Source
seyfert/src/structures/extra/BaseGuild.ts:41
splashURL()
splashURL gets the current guild splash as a string.
Parameters
Parameter | Type | Description |
---|---|---|
options ? | CDNUrlOptions | Image options for the splash url. |
Returns
undefined
| string
Splash url or void.
Link
https://discord.com/developers/docs/reference#image-formatting
Source
seyfert/src/structures/extra/BaseGuild.ts:54
toString()
Returns
string