description |
---|
TouchGuild is a NodeJS library for interfacing with Guilded. |
NodeJS 16.16.0 or higher is required.
{% tabs %} {% tab title="npm" %}
npm install touchguild@latest
{% endtab %}
{% tab title="yarn" %}
yarn add touchguild@latest
{% endtab %}
{% tab title="ppm" %}
pnpm add touchguild@latest
{% endtab %} {% endtabs %}
const TouchGuild = require('touchguild'); // import for CommonJS
// import * as TouchGuild from 'touchguild' // import for ESM & TS
const client = new TouchGuild.Client({token: 'insert token here'});
client.on('ready', ()=> {
console.log(`Logged as ${client.user.username}`);
});
client.on('error', (err)=> {
console.error("Whoops, somethin' went wrong..", err);
});
client.connect();
{% hint style="info" %} Note: CommonJS, ESM & Typescript are supported. {% endhint %}
Nightly builds are pre-release builds, they're having new features in real time. Once there's enough features, we're releasing them as a brand new 'stable build'.
You can get new features before the stable release.
{% tabs %} {% tab title="npm" %}
npm install touchguild@nightly
{% endtab %}
{% tab title="yarn" %}
yarn add touchguild@nightly
{% endtab %}
{% tab title="ppm" %}
pnpm add touchguild@nightly
{% endtab %} {% endtabs %}
npm install dinographicpixels/touchguild#nightly
- Run the command
- Go to
node_modules/touchguild
- Run:
npm run build
inside the touchguild folder - Now, it's ready.
You need to reproduce those steps everytime you update to a newer nightly build.
{% hint style="warning" %} Be aware that Nightly builds aren't stable and can have still have major bugs. If you face issues, feel free to report it by creating an issue on TouchGuild's GitHub, please specify that you're using a Nightly build. {% endhint %}
{% hint style="info" %} You can check Nightly Features here. {% endhint %}