DocsInstallation
Installation
Get started with meowcord by installing it in your project.
Prerequisites
Before you begin, make sure you have the following installed:
- Node.js (version 16.9.0 or higher)
- npm or yarn package manager
You'll also need a Discord bot token. If you don't have one yet, follow these steps:
- Go to the Discord Developer Portal
- Click on "New Application" and give it a name
- Navigate to the "Bot" tab and click "Add Bot"
- Under the Token section, click "Copy" to copy your bot token
Installing meowcord
You can install meowcord using npm:
Terminal
npm install meowcord
Or using yarn:
Terminal
yarn add meowcord
Basic Setup
Create a new file named index.js
and add the following code:
index.js
const {Meow, Intents} = require("meowcord")
const bot = new Meow({
intents: [Intents.Guilds, Intents.GuildMessages, Intents.MessageContent],
prefix: "!",
meowSettings: {
returnBotInfosInConsole: true
},
})
bot.start("YOUR_BOT_TOKEN");
bot.basicCommand({
cmdName: "ping",
cmdCode: async (message) => {
const ping = Date.now() - message.createdTimestamp;
message.reply(`🏓 Pong! My ping is currently ${ping}ms`);
}
});
Replace YOUR_BOT_TOKEN
with your actual Discord bot token.
Running Your Bot
To start your bot, run the following command in your terminal:
Terminal
node index.js
If everything is set up correctly, you should see a success message in your console, and your bot should come online in Discord.