This commit is contained in:
yky4589 2020-10-25 17:20:11 +09:00
parent abaeb6d966
commit 0ed7e64550

View file

@ -13,21 +13,21 @@ bot.connect(TOKEN, [GatewayIntents.GUILD_MEMBERS, GatewayIntents.GUILD_PRESENCES
const member = <Member> await Member.autoInit(bot, {
cacheName: 'member',
endpoint: 'GUILD_MEMBER',
restURLfuncArgs: ['668753256419426314', '333432936390983680']
restURLfuncArgs: ['', '']
})
console.log('getted (cached) ' + member.nick)
setInterval(async () => {
//refreshed check
console.log('refreshed check: ' + member.nick)
//cached
console.log('cache: '+(<Member> cache.get('member', '668753256419426314:333432936390983680')).nick)
console.log('cache: '+(<Member> cache.get('member', '')).nick)
}, 10000)
setInterval(async() => {
member.refresh(bot, {
cacheName: 'member',
endpoint: 'GUILD_MEMBER',
restURLfuncArgs: ['668753256419426314', '333432936390983680']
restURLfuncArgs: ['', '']
})
//refreshed
console.log('refreshed: ' + member.nick)