Skip to content

Latest commit

 

History

16 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Built with Love Made with Javascript

NPM version NPM downloads Patreon

npm installnfo

lgcord.js is a simple library for interacting with the Discord API. It is written in TypeScript and is designed to be easy to use and easy to understand.

Installation

npm install lgcord.js

Example

const { Client, INTENTS } = require("lgcord.js");

const client = new Client([
  INTENTS.GUILDS,
  INTENTS.GUILD_MESSAGES,
  INTENTS.GUILD_MESSAGE_REACTIONS,
]);

client.on("ready", (ready) => {
  console.log(`Logged in as ${ready.user.username}`);
});

client.login("bot token");

Events Available:

  • messageCreate reply to a message or get info a message sent/receieved by the bot
  • messageDelete get info of a message when deleted
  • messageUpdate get info of a message if it gets updated/edited

MORE EVENTS DOCS WILL BE ADDED

Examples :

  • Embed Example
const { DiscordEmbed } = require("lgcord.js");

let embed = new DiscordEmbed()
  .setTitle("Hello World")
  .setColor("Color")
  .setDescription("Bot using lgcord.js")
  .setFooter("Footer")
  .setTimestamp();

  message.reply({
  embeds: [embed],
});
  • Button Example
const {
  DiscordMessageActionRow,
  DiscordMessageButton,
  DiscordButtonStyle,
} = require("lgcord.js");

let row = new DiscordMessageActionRow().addComponents(
  new DiscordMessageButton()
    .setStyle(DiscordButtonStyle.PRIMARY)
    .setLabel("LGCordjs")
    .setCustomId("dksdk")
);

message.reply({
  components: [row],
});

Support me!!

ko-fi

About

A discord bot which is coded on the new api wrapper lgcord.js

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Sponsor this project

Packages

Contributors

Languages