Skip to content

MayoCompagnie/Leonie

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Léonie bot

Welcome on Léonie GitHub Repo !

You can find all of information of Leonie in this README !

TypeScript Discord.js Discord.js


Summary


Starting

Install dependencies

⚠️ You must have NodeJS on your pc !!

Consult NodeJS website if you does not have NodeJS.

When you have NodeJS and download files, run this command:

npm install

Dependencies are installed !

Configuration

For configurate the bot, you must create a config folder.

mkdir config

And create an .env file on config folder

cd config
touch .env

Now, when you have create .env file, give information on your bot

LEONIE_TOKEN = "your_token_bot_here"
LEONIE_DEV_TOKEN = "your_token_dev_bot_here"
SCRET_SERVER_ID = "your_server_id_for_dev"

Nice ! Configuration are finish !

Starting the bot

When you are ready, use this command:

npm run dev

Your bot is Online ! (Unless you did something wrong)

Commands

Slash Commands

How Slash Commands does work on Léonie ? It's simple !

Go to SlashCommands folder !

Léonie use SlashCommandBuilder class of discord.js !

So check the documentation if you want to create another slash commands !

A Slash Commands file looks like this:

import {
    ChatInputCommandInteraction,
    Client,
    SlashCommandBuilder
} from 'discord.js';

export default {
    data: new SlashCommandBuilder()
        .setName('command')
        .setDescription("Description of command")
    run: async (client: Client, interaction: ChatInputCommandInteraction) => {
        // Your code here
        }
    }
};

Nice ! You know how to create other slash commands !

Message Commands

How Message Commands does work on Léonie ? It's simple !

Go to Commands folder !

A Message Commands file looks like this:

import { Client, Message } from 'discord.js';

export default {
    name: 'commands',
    help: ['c'],
    description: 'Description command',
    run: (client: Client, message: Message) => {
        // Your code here
    }
};

Nice ! You know how to create other message commands !

Additionnal informations

This bot made by Mayo.

About

Répertoire du bot Lénonie !

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published