Skip to content

Commit

Permalink
[FEATURE]: add migration scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Behzad-rabiei committed Jan 24, 2024
1 parent a0e7820 commit 18a75a8
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 31 deletions.

This file was deleted.

4 changes: 0 additions & 4 deletions src/migrations/utils/isBotLogic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,12 @@ function pushMembersToArray(arr: IGuildMember[], guildMembersArray: GuildMember[
export default async function isBotLogic(connection: Connection, client: Client, guildId: Snowflake) {
logger.info({ guild_id: guildId }, 'add-isBot-to-guilbMember-schema migration is running');
try {
console.log(guildId)
const botGuildMembers = [];
const noneBotGuildMembers = [];

const guild = await client.guilds.fetch(guildId);
console.log(guild.id)
const membersToStore: IGuildMember[] = [];
console.log(1)
const fetchedMembers = await guild.members.fetch();
console.log(2)
const guildMembers = pushMembersToArray(membersToStore, [...fetchedMembers.values()]);

console.log(guildMembers.length, guildId)
Expand Down

0 comments on commit 18a75a8

Please sign in to comment.