UNPKG
@nicat.dcw/discord-roles
Version:
latest (0.0.1)
0.0.1
🧃 Light Weight Discord Linked Roles Module with Discord API Interaction
@nicat.dcw/discord-roles
/
src
/
utils
/
storage.js
11 lines
(9 loc)
•
273 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
const
store =
new
Map
();
module
.
exports
=
async
(userId, tokens) => {
await
store.
set
(
`discord-
${userId}
`
, tokens); }
//async function storeDiscordTokens(userId, tokens) {
//}
async
function
getDiscordTokens
(
userId
) {
return
store.
get
(
`discord-
${userId}
`
); }