const { Client } = require("@guildedjs/guilded.js");
// import { Client } from "@guildedjs/guilded.js";
const client = new Client();
client.on("ready", () => console.log(`Bot is successfully logged in`));
client.on("messageCreate", (message) => {
if (message.content === "poggers") {
return message.channel.send("poggers indeed");
}
});
client.login({
email: "email",
password: "password",
});
📝 About
@guildedjs/guilded.js
is a library written in TypeScript usable in either TypeScript or JavaScript projects. It provides structures, abstraction, and utilities for interaction between the guilded API and your userbot.
Off the bat there are very noticable similarities between this package and discord.js
structure-wise. This is intentional in order to make the migration or copying of your codebase to a Guilded bot smooth and predictable. We've adopted the same managers/cache structure that they've implemented because we find that it's what works well without complications. While our structure is influenced by them, there are underlying differences with how we handle things like websockets, events, and utilities. In addition to that, the library is split up into multiple packages (this being the main one) and written in TypeScript over JavaScript.
📥 Installation
Recommended that you use node v12+
npm install @guildedjs/guilded.js
yarn add @guildedjs/guilded.js
📃 Documentation
Documentation is located here
📦 Dependencies
-
@guildedjs/guilded-api-typings
(dev dep): used for typing the REST and WS payloads -
@guildedjs/common
: Utilities between@guildedjs
packages -
@guildedjs/rest
: Rest structure for@guildedjs
packages -
@guildedjs/embeds
: Embed builder/utility -
@guildedjs/webhook-client
: Webhook Client -
@discordjs/collection
: Map utility -
ws
: WebSocket interaction
✋ Contributing
Please see the main README.md for info on how to contribute to this package or the other @guildedjs
packages.
🤝 Acknowledgements
-
Discord.js
- Inspiration and caching strategy
⚖️ LICENSING
Licensed under the MIT License