2.1.5 • Published 3 years ago
@helperdiscord/cache v2.1.5
@helperdiscord/cache
This is a caching library for discord based on the pg-native library.
const { Cache } = require('@helperdiscord/cache');
const { REST } = require('@klasa/rest'); // a rest client you can use
const rest = new REST({ version: 8 });
rest.token = process.env.DISCORD_TOKEN;
const cache = new Cache(process.env.POSTGRES_URI, { cache: true, rest: rest });
const doge = cache.users.get('395782478192836608'); // will return a user object (from cache) or null
const forceDoge = await cache.users.fetch('395782478192836608'); // will return a user object or null
cache.users.del('395782478192836608'); // will remove the user with the id "395782478192836608" from the user cache
Note: You need libpq bindings for this to work
2.1.5
3 years ago
2.1.2
3 years ago
2.1.4
3 years ago
2.1.3
3 years ago
2.1.1
3 years ago
2.0.2
3 years ago
2.1.0
3 years ago
2.0.1
3 years ago
2.0.0
3 years ago
1.1.0
3 years ago
1.0.0
3 years ago
0.4.1
3 years ago
0.4.0
3 years ago
0.3.0
3 years ago
0.2.1
3 years ago
0.2.2
3 years ago
0.2.0
3 years ago
0.1.2
3 years ago
0.1.1
3 years ago
0.1.0
3 years ago