ODClientManager class
We are still working the API Reference! This page might be incomplete or doesn't contain all details!
Overview
This is an Open Ticket client manager.
It is responsible for managing the discord.js client. Here, you can set the status, register slash commands and much more!
If you want, you can also listen for custom events on the ODClientManager.client variable (discord.Client)
Properties
activity class ➜ api.ODClientActivityManager
The status manager is responsible for setting the bot status.
client type ➜ discord.Client
The discord.js discord.Client. Only use it when initiated!
initiated boolean ➜ boolean
Is the bot initiated?
intents array ➜ api.ODClientIntents[]
List of required bot intents. Add intents to this list using the onClientLoad event.
loggedIn boolean ➜ boolean
Is the bot logged in?
mainServer type ➜ null|discord.Guild
The main server of the bot. Provided by serverId in the config
partials array ➜ api.ODClientPartials[]
List of required bot partials. Add intents to this list using the onClientLoad event. ❌ Only use when neccessery!
permissions array ➜ api.ODClientPermissions[]
List of required bot permissions. Add permissions to this list using the onClientLoad event.
privileges array ➜ api.ODClientPriviligedIntents[]
List of required bot privileged intents. Add intents to this list using the onClientLoad event.
ready boolean ➜ boolean
Is the bot ready?
readyListener type ➜ null|(() => Promise)
(❌ DO NOT OVERWRITE ❌) Internal Open Ticket function to continue the startup when the client is ready!
rest type ➜ discord.REST
The discord.js REST client. Used for stuff that discord.js can't handle :)
slashCommands class ➜ api.ODSlashCommandManager
The slash command manager is responsible for all slash commands & their events inside the bot.
textCommands class ➜ api.ODTextCommandManager
The text command manager is responsible for all text commands & their events inside the bot.
Methods
constructor() function ➜ api.ODClientManager
(no description)
View Parameters (1)
debug: class ➜api.ODDebugger- Parameter Description Lorem Ipsum.
checkBotInGuild() function ➜ boolean
Check if the bot is in a specific guild
View Parameters (1)
guild: type ➜discord.Guild- Parameter Description Lorem Ipsum.
checkGuildPerms() function ➜ boolean
Check if a specific guild has all required permissions (or Administrator)
View Parameters (1)
guild: type ➜discord.Guild- Parameter Description Lorem Ipsum.
fetchChannel() function ➜ Promise
A simplified shortcut to get a discord.Channel :)
View Parameters (1)
id: string ➜string- Parameter Description Lorem Ipsum.
fetchGuild() function ➜ Promise
A simplified shortcut to get a discord.Guild :)
View Parameters (1)
id: string ➜string- Parameter Description Lorem Ipsum.
fetchGuildCategoryChannel() function ➜ Promise
A simplified shortcut to get a discord.CategoryChannel :)
View Parameters (2)
guildId: type ➜string|discord.Guild- Parameter Description Lorem Ipsum.id: string ➜string- Parameter Description Lorem Ipsum.
fetchGuildChannel() function ➜ Promise
A simplified shortcut to get a discord.GuildBasedChannel :)
View Parameters (2)
guildId: type ➜string|discord.Guild- Parameter Description Lorem Ipsum.id: string ➜string- Parameter Description Lorem Ipsum.
fetchGuildChannelMessage() function ➜ Promise
A simplified shortcut to get a discord.Message :)
View Parameters (3)
guildId: type ➜string|discord.Guild- Parameter Description Lorem Ipsum.channelId: type ➜string|discord.TextChannel- Parameter Description Lorem Ipsum.id: string ➜string- Parameter Description Lorem Ipsum.
fetchGuildMember() function ➜ Promise
A simplified shortcut to get a discord.GuildMember :)
View Parameters (2)
guildId: type ➜string|discord.Guild- Parameter Description Lorem Ipsum.id: string ➜string- Parameter Description Lorem Ipsum.
fetchGuildRole() function ➜ Promise
A simplified shortcut to get a discord.Role :)
View Parameters (2)
guildId: type ➜string|discord.Guild- Parameter Description Lorem Ipsum.id: string ➜string- Parameter Description Lorem Ipsum.
fetchGuildTextChannel() function ➜ Promise
A simplified shortcut to get a discord.TextChannel :)
View Parameters (2)
guildId: type ➜string|discord.Guild- Parameter Description Lorem Ipsum.id: string ➜string- Parameter Description Lorem Ipsum.
fetchUser() function ➜ Promise
A simplified shortcut to get a discord.User :)
View Parameters (1)
id: string ➜string- Parameter Description Lorem Ipsum.
getGuilds() function ➜ discord.Guild[]
Get all servers the bot is part of.
initClient() function ➜ void
Initiate the client variable & add the intents & partials to the bot.
login() function ➜ Promise
Log-in with a discord auth token.
sendUserDm() function ➜ Promise
A simplified shortcut to send a DM to a user :)
View Parameters (2)
user: type ➜string|discord.User- Parameter Description Lorem Ipsum.message: interface ➜api.ODMessageBuildResult- Parameter Description Lorem Ipsum.
Defaults
We're still working on this part of the documentation!
Examples
We're still working on this part of the documentation!