Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/higa/deno/client/managers/index.ts>GuildManager

A package to interract with the Discord API coded by myself
Latest
class GuildManager
import { GuildManager } from "https://deno.land/x/higa@0.1.2/deno/client/managers/index.ts";

Constructors

new
GuildManager(
token: string,
tokenType: string,
version: APIVersions,
)

Properties

readonly
version: APIVersions

API Version

Methods

addGuildMember(
guildId: string,
userId: string,
): Promise<GuildMember>

Add a user to a guild

addGuildMemberRole(
guildId: string,
userId: string,
roleId: string,
reason?: string,
): Promise<GuildMember>

Adds a role to a guild member

BeginGuildPrune(
guildId: string,
reason?: string,
): Promise<GuildPruneCountResponse>

Begins a prune of members in a guild

Creates a guild

createGuildBan(
guildId: string,
userId: string,
): Promise<Ban>

Creates the ban of a user in a guild.

createGuildChannel(guildId: string, option: CreateGuildChannelOptions): Promise<Channel>

Creates a guild channel.

createGuildRole(
guildId: string,
options?: GuildRoleOptions,
reason?: string,
): Promise<Role>

Creates a role in a guild

deleteGuild(guildId: string): Promise<void>

Delete a guild

deleteGuildIntegrations(
guildId: string,
integrationId: string,
reason?: string,
): Promise<void>

Deletes a integrations of a guild.

deleteGuildRole(
guildId: string,
roleId: string,
reason?: string,
): Promise<void>

Deletes a role from a guild

getGuild(guildId: string): Promise<Guild>

Gets a guild by its ID

getGuildBan(guildId: string, userId: string): Promise<Ban>

Gets the ban of a user in a guild.

getGuildBans(guildId: string, options?: GetGuildBansOptions): Promise<Ban[]>

Gets the bans of a guild

getGuildChannels(guildId: string): Promise<Channel[]>

Gets all the channels in a guild.

getGuildIntegrations(guildId: string): Promise<Integration[]>

Gets the integrations of a guild.

getGuildInvites(guildId: string): Promise<Invite[]>

Gets the invites of a guild.

getGuildMember(guildId: string, userId: string): Promise<GuildMember>

Get a guild member.

getGuildPreview(guildId: string): Promise<GuildPreview>

Gets the guild preview.

Gets the number of members that would be removed in a prune operation

getGuildRoles(guildId: string): Promise<Role[]>

Gets the roles of a guild.

getGuildVanityUrl(guildId: string): Promise<Invite>

Gets the guild's vanity URL.

getGuildVoiceRegions(guildId: string): Promise<VoiceRegion[]>

Gets the voice regions of a guild.

getGuildWelcomeScreen(guildId: string): Promise<WelcomeScreen>

Gets the welcome screen of a guild.

getGuildWidget(guildId: string): Promise<GetGuildWidget>

Gets the guild widget.

getGuildWidgetSettings(guildId: string): Promise<GuildWidgetSettings>

Gets the widget settings of a guild.

listActiveThreads(guildId: string): Promise<ListActiveThreadsResponse>

List active threads in a guild

listGuildMembers(guildId: string, option?: ListGuildMembersOptions): Promise<GuildMember[]>

Lists all the members in a guild.

modifyCurrentMember(
guildId: string,
reason?: string,
): Promise<GuildMember>

Modify the current user's guild member

modifyCurrentUserVoiceState(guildId: string, options: ModifyCurentUserVoiceStateOption): Promise<void>

Modify the current user voice state

modifyGuild(guildId: string, option: ModifyGuildOptions): Promise<Guild>

Modify a guild

modifyGuildChannelPosition(guildId: string, option: ModifyGuildChannelPositionOptions): Promise<void>

Modify the position of a guild channel

modifyGuildMember(
guildId: string,
userId: string,
reason?: string,
): Promise<GuildMember>

Modify a guild member

ModifyGuildRole(
guildId: string,
reason?: string,
): Promise<Role>

Modifys a role in a guild

modifyGuildRolePosition(
guildId: string,
reason?: string,
): Promise<Role[]>

Modify the positions of a set of role objects for the guild

Modified the welcome screen of a guild.

modifyUserVoiceState(
guildId: string,
userId: string,
): Promise<void>

Modify a user voice state

RemoveGuildBan(
guildId: string,
userId: string,
reason?: string,
): Promise<Ban>

Removes the ban of a user in a guild.

removeGuildMember(
guildId: string,
userId: string,
reason?: string,
): Promise<void>

Removes a guild member

removeGuildMemberRole(
guildId: string,
userId: string,
roleId: string,
reason?: string,
): Promise<GuildMember>

Removes a role to a guild member

searchGuildMembers(guildId: string, option?: SearchGuildMembersOptions): Promise<GuildMember[]>

Searches for members in a guild.