mirror of
https://github.com/discordeno/discordeno.git
synced 2026-05-28 06:20:12 +00:00
fix: dumb class binding error
This commit is contained in:
3
plugins/cache/src/sweepers.ts
vendored
3
plugins/cache/src/sweepers.ts
vendored
@@ -39,13 +39,14 @@ export function enableCacheSweepers<B extends Bot>(bot: BotWithCache<B>) {
|
||||
bot,
|
||||
});
|
||||
|
||||
const setMember = bot.members.set;
|
||||
const setMember = bot.members.set.bind(bot.members);
|
||||
bot.members.set = function (id, member) {
|
||||
return setMember(id, {
|
||||
...member,
|
||||
cachedAt: Date.now(),
|
||||
} as Member);
|
||||
};
|
||||
|
||||
bot.members.startSweeper({
|
||||
filter: function memberSweeper(member, _, bot: BotWithCache<B>) {
|
||||
// Don't sweep the bot else strange things will happen
|
||||
|
||||
Reference in New Issue
Block a user