Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/denocordts/src/structures/mod.ts>Guild

An Object Oriented Discord API wrapper for Deno.
Latest
class Guild
Re-export
import { Guild } from "https://deno.land/x/denocordts@1.2.0/src/structures/mod.ts";

Constructors

new
Guild(data: APIGuild, client: Base)

Properties

afkChannelId: GuildProperties["afkChannelId"]
afkTimeout: GuildProperties["afkTimeout"]
approximateMemberCount: GuildProperties["approximateMemberCount"]
approximatePresenceCount: GuildProperties["approximatePresenceCount"]
banner: GuildProperties["banner"]
optional
channels: (TextChannel | ThreadChannel | GuildNewsChannel)[]
defaultMessageNotifications: GuildProperties["defaultMessageNotifications"]
description: GuildProperties["description"]
discoverySplash: GuildProperties["discoverySplash"]
emojis: GuildProperties["emojis"]
explicitContentFilter: GuildProperties["explicitContentFilter"]
features: GuildFeature[]
hubType: GuildProperties["hubType"]
icon: string | null
iconHash: GuildProperties["iconHash"]
id: GuildProperties["id"]
maxMembers: GuildProperties["maxMembers"]
maxPresences: GuildProperties["maxPresences"]
maxVideoChannelUsers: GuildProperties["maxVideoChannelUsers"]
mfaLevel: GuildProperties["mfaLevel"]
name: string
nsfwLevel: GuildProperties["nsfwLevel"]
owner: GuildProperties["owner"]
ownerId: GuildProperties["ownerId"]
permissions: GuildProperties["permissions"]
preferredLocale: GuildProperties["preferredLocale"]
premiumProgressBarEnabled: GuildProperties["premiumProgressBarEnabled"]
premiumSubscriptionCount: GuildProperties["premiumSubscriptionCount"]
premiumTier: GuildProperties["premiumTier"]
publicUpdatesChannelId: GuildProperties["publicUpdatesChannelId"]
deprecated
readonly
region
roles: GuildProperties["roles"]
rulesChannelId: GuildProperties["rulesChannelId"]
splash: string | null
stickers: GuildSticker[]
systemChannelFlags: GuildProperties["systemChannelFlags"]
systemChannelId: GuildProperties["systemChannelId"]
unavailable: GuildProperties["unavailable"]
vanityUrlCode: GuildProperties["vanityUrlCode"]
verificationLevel: GuildProperties["verificationLevel"]
welcomeScreen: GuildProperties["welcomeScreen"]
widgetChannelId: GuildProperties["widgetChannelId"]
widgetEnabled: GuildProperties["widgetEnabled"]

Methods

addRoleToGuildMember(unnamed 0: { userId: Snowflake; roleId: Snowflake; reason?: string; })
changeChannelPosition(unnamed 0: { channelId: Snowflake; position: number; parentId?: Snowflake; lockPermissions?: boolean; reason?: string; })
changeClientNickname(unnamed 0: { nickname: string; reason?: string; })
createBan(unnamed 0: { userId: Snowflake; reason?: string; })
createChannel(unnamed 0: { name: string; channelType: keyof ChannelType; topic?: string; bitrate?: number; userLimit?: number; slowMode?: number; position?: number; parentId: Snowflake; nsfw?: boolean; autoArchiveDuration?:
| 60
| 1440
| 4320
| 10080
; reason?: string; }
)
createRole(unnamed 0: { name: string; permission: (keyof PermissionFlagsBits)[]; color?: ColorResolvable; displaySeparatelyInSidebar?: boolean; mentionable?: boolean; reason?: string; })
deleteIntegration(integrationId: string): Promise<void>

Delete Integration

deleteRole(unnamed 0: { roleId: Snowflake; reason?: string; })
deleteSticker(stickerId: string): Promise<void>
fetchGuildBan(unnamed 0: { userId: Snowflake; })
fetchGuildBans(limit?: number)

Used to fetch Guild Bans, Will fetch top 10 if limit isn't specified

Returns a List of Integrations for the Guild

modifyRole(unnamed 0: { name: string; permission?: (keyof PermissionFlagsBits)[] | bigint; color?: ColorResolvable; displaySeparatelyInSidebar?: boolean; mentionable?: boolean; reason?: string; roleId: Snowflake; })
modifySticker(unnamed 0: { name: string; description: string; tags: string; stickerId: string; })
removeGuildBan(unnamed 0: { userId: Snowflake; reason?: string; })
removeGuildMember(unnamed 0: { userId: Snowflake; reason?: string; })
removeRoleFromGuildMember(unnamed 0: { reason?: string; userId: Snowflake; roleId: Snowflake; })