1.2.0 • Published 11 months ago

gogecord v1.2.0

Weekly downloads
-
License
ISC
Repository
github
Last release
11 months ago

Gogecord

A lightweight library for interacting with the Discord API. Written in TypeScript and compiled to JavaScript, this library provides developers with the necessary tools to create powerful Discord bots quickly and easily.

Features

  • TypeScript Support: Fully typed library with TypeScript for better development experience and safety.
  • JavaScript Compatibility: The library is compiled to JavaScript, making it easy to use in both TypeScript and JavaScript projects.
  • Bot Development: Ideal for building custom bots that interact with Discord servers efficiently.

Installation

You can install Gogecord via npm:

npm install gogecord

Usage

Example for TypeScript

import { Client } from 'gogecord';

const client = new Client({
    intents: ['GuildBans', 'GuildMembers', 'GuildMessages', 'GuildPresences', 'Guilds', 'MessageContent'],
    token: 'app_token'
});

client.on('ready', (client) => {
    console.log('Logged in as', client.user.username);
});
client.on('messageCreate', (client, message) => {
    if (message.content == 'hi') message.reply({ content: 'hi!' });
    if (message.content == 'bye') message.reply({ content: 'bye!' });
});

Example for JavaScript

const { Client } = require('gogecord');

const client = new Client({
    intents: ['GuildBans', 'GuildMembers', 'GuildMessages', 'GuildPresences', 'Guilds', 'MessageContent'],
    token: 'app_token'
});

client.on('ready', (client) => {
    console.log('Logged in as', client.user.username);
});
client.on('messageCreate', (client, message) => {
    if (message.content == 'hi') message.reply({ content: 'hi!' });
    if (message.content == 'bye') message.reply({ content: 'bye!' });
});
1.2.0

11 months ago

1.1.0

11 months ago

1.0.3

12 months ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago