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, { const member = <Member> await Member.autoInit(bot, {
cacheName: 'member', cacheName: 'member',
endpoint: 'GUILD_MEMBER', endpoint: 'GUILD_MEMBER',
restURLfuncArgs: ['668753256419426314', '333432936390983680'] restURLfuncArgs: ['', '']
}) })
console.log('getted (cached) ' + member.nick) console.log('getted (cached) ' + member.nick)
setInterval(async () => { setInterval(async () => {
//refreshed check //refreshed check
console.log('refreshed check: ' + member.nick) console.log('refreshed check: ' + member.nick)
//cached //cached
console.log('cache: '+(<Member> cache.get('member', '668753256419426314:333432936390983680')).nick) console.log('cache: '+(<Member> cache.get('member', '')).nick)
}, 10000) }, 10000)
setInterval(async() => { setInterval(async() => {
member.refresh(bot, { member.refresh(bot, {
cacheName: 'member', cacheName: 'member',
endpoint: 'GUILD_MEMBER', endpoint: 'GUILD_MEMBER',
restURLfuncArgs: ['668753256419426314', '333432936390983680'] restURLfuncArgs: ['', '']
}) })
//refreshed //refreshed
console.log('refreshed: ' + member.nick) console.log('refreshed: ' + member.nick)