@ayame/member-gateway

0.1.1 • Public • Published

@ayame/member-gateway

Per-member settings gateway for Ayame.

Install

$ npm install @ayame/member-gateway

Usage

Before creating the Ayame client register the plugin.

const { AyameClient } = require("ayame");

AyameClient.use(require("@ayame/member-gateway"));

When creating your client specify that you want the members gateway

new AyameClient({ gateways: { members: true } });
// Or to use a different provider that's not the default. E.g use redis to handle members.
new AyameClient({ gateways: { members: "redis" } });

And then all members get a settings property like normal.

member.settings.update({ xp: 420, level: 69 });

return msg.send(`Your level is: ${member.settings.get("level", 0)}`);

License

Released under the MIT License

Package Sidebar

Install

npm i @ayame/member-gateway

Weekly Downloads

1

Version

0.1.1

License

MIT

Unpacked Size

5.92 kB

Total Files

10

Last publish

Collaborators

  • ravener
  • freetnt5852