Meowcord Logo
meowcord
DocsThe Meow Client

The Meow Client

Learn about the core Meow client and its capabilities.

Creating a Client

The Meow client is the core of your Discord bot. Here's how to create a new client instance:

index.js
const { Meow, Intents } = require("meowcord");

const bot = new Meow({
  intents: [Intents.Guilds, Intents.GuildMessages, Intents.MessageContent],
  prefix: "!",
  meowSettings: {
    returnBotInfosInConsole: true,
    mobileStatus: false,
    disableLogs: false
  },
});

Client Options

The Meow client constructor accepts several options:

  • intents: An array of Discord gateway intents your bot needs (required)
  • prefix: The command prefix your bot will use (default: "!")
  • meowSettings: Additional settings for the client

meowSettings Options

The meowSettings object accepts the following options:

  • returnBotInfosInConsole: Whether to log bot information to the console (default: false)
  • mobileStatus: Whether the bot should appear as online on mobile (default: false)
  • disableLogs: Whether to disable console logs (default: false)

Starting the Client

After creating your client, you need to start it by providing your Discord bot token:

index.js
bot.start("YOUR_BOT_TOKEN");

This will connect your bot to Discord and make it ready to receive commands and events.

Client Properties

The Meow client exposes several properties that you can access:

index.js
// Access the underlying Discord.js client
const discordClient = bot.discordClient;

// Get the client's prefix
const prefix = bot.prefix;

// Get a list of all commands
const commands = bot.commands;

Discord.js Integration

The Meow client is built on top of Discord.js, and you can access the underlying Discord.js client through the client property:

index.js
// Get the ping of the bot
const ping = bot.discordClient.ws.ping;
console.log(`Bot ping: ${ping}ms`);

// Get the number of servers the bot is in
const serverCount = bot.discordClient.guilds.cache.size;
console.log(`Bot is in ${serverCount} servers`);